firecms icon indicating copy to clipboard operation
firecms copied to clipboard

Unexpected value: {} for on_create timestamp

Open faizanabidnaqvi opened this issue 3 years ago • 1 comments

Hi @fgatti675

There is a new issue that has been occurring in v1.0.0 for me. I have an entity with the on_create timestamp field that is already set. The field is as follows:

createdOn: {
            dataType: "timestamp",
            title: "Creation Date",
            disabled: true,
            autoValue: "on_create"
        },

When I make changes to the entity and press save, I get this 'Unexpected value: {}' message under the 'Created Date' field and the 'Unsaved changes' popup shows up. If I press the Ok' button from there, the entity does get saved correctly. It is annoying in cases where our users have to update several entities and have to press 'Ok' to this popup every time. Screenshot 2022-08-10 at 3 58 30 PM

Also note that if we press 'cancel' on the unsaved changes popup, the dialog stays open and if we press save once again from there the 'createdOn' field gets saved as a map with '{}' value.

I didn't see this issue in some previous versions but I don't remember which version this exactly started happening on.

faizanabidnaqvi avatar Aug 10 '22 13:08 faizanabidnaqvi

This issue happens with 1.0.2 as well. I also noted that the issue will occur with all kinds of 'timestamp' fields, even those which are not auto value.

It doesn't happen with 1.0.0-rc05.

faizanabidnaqvi avatar Aug 10 '22 20:08 faizanabidnaqvi

I had a new issue with 1.0.0-rc05 not showing anything at all after I upgraded dependencies and deleted yarn.lock. However, when I use 1.0.3-pre.2 it worked.

This issue (unexpected value for dates) didn't occur in 1.0.3-pre.2 but it was occurring before so I think it was something to do with yarn.lock. So if anyone faces this issue, I think upgrading dependencies and deleting yarn.lock, and reinstalling should fix it.

It will be nice if 1.0.3 can be released soon. :)

faizanabidnaqvi avatar Nov 30 '22 14:11 faizanabidnaqvi

Hi @faizanabidnaqvi , 1.0.3 has been released :)

fgatti675 avatar Jan 05 '23 20:01 fgatti675