I keep having a problem when importing json documents when i'm targetting a date or timestamp field.
So when generating import documents I populate timestamp fields with an ISO-8601 formatted date, and importing semes fine. When I open the document, the date works and is visible.
However, when I view an imported entry in the API browser, every single date field is null.
If i open an entry in the editor and don't actually change the date at all and save the entry, then the date field starts showing up in the API explorer, even though it didn't actually change.
Now, I'm not sure if this is a general bug that happens, but I've now seen it on two different imports into separate prismic repos - also, I've only ever tried this on an "is" locale - so this might be a locale issue.
If you import an incorrect format for these fields, the name will appear but no value will be entered for the field. Look at the correct formats for each one.
thanks… i was blind over the field not being a ISO8601 formatted field… just expected it, since this is a json document, and it sort of looked like the correct format.
it would be nice if prismic would let you know or warn when you try to import something which isn’t really valid.
Yes, this is would definitely be something that would be really useful to have. I will tag the @features-team so they can consider this in the feature request tracker. Although this, we don’t have plans to work on this right now, we will let you know here if this changes.
Pau
closed , flag & select 'Something Else' to reopen.
5
This is being tracked as an open feature request.
If you have another use-case for this feature, you can 'Flag' this topic to reopen. Please use the button to show your support for the feature and check out our Feature Request Guidelines.