You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Creating a Date field with the name "date" in a Blueprint results in nothing being saved when you pick a date and publish the changes.
How to Reproduce
Create a collection. Add a Date field with the name "date". Create a new entry, pick a date, save. Refresh and the date will still be set to the default of the current date because nothing was saved.
Environment
Statamic 3.0.19 Solo
Laravel 7.28.4
PHP 7.4.9
statamic/ssg 0.2.0
Install method (choose one):
I tested via two methods. The starter kit I used was the Blog starter kit. I noticed that the Blog collection works correctly with the "date" field, but creating a new collection with a "date" field does not work as described above.
Fresh install from statamic/statamic
Starter kit
The text was updated successfully, but these errors were encountered:
The date field is reserved for literally the "date" feature.
You need to enable dates in the collection settings.
I ended up figuring this out. Do you think it would be beneficial if this was mentioned in the docs (either directly on the Date Field Type page or some other page that lists all the reserved field type names) and/or if the CMS gave you some notification of it instead of failing silently? Maybe I just missed something.
Same for any other reserved fields that may be out there.
Bug Description
Creating a Date field with the name "date" in a Blueprint results in nothing being saved when you pick a date and publish the changes.
How to Reproduce
Create a collection. Add a Date field with the name "date". Create a new entry, pick a date, save. Refresh and the date will still be set to the default of the current date because nothing was saved.
Environment
Statamic 3.0.19 Solo
Laravel 7.28.4
PHP 7.4.9
statamic/ssg 0.2.0
Install method (choose one):
I tested via two methods. The starter kit I used was the Blog starter kit. I noticed that the Blog collection works correctly with the "date" field, but creating a new collection with a "date" field does not work as described above.
statamic/statamic
The text was updated successfully, but these errors were encountered: