firecmsco / firecms

Awesome Firebase/Firestore-based CMS. The missing admin panel for your Firebase project!
https://firecms.co
Other
1.14k stars 185 forks source link

[regression bug] Default optional image URL is stored as empty string instead of `null` #513

Closed SimpleCreations closed 1 year ago

SimpleCreations commented 1 year ago

Bug description

Marked this as a regression because the issue was not present in 2.0.0-beta.4

An empty string is not a valid URL, so it shouldn't be assigned to a field intended to store a URL. If the image field is optional, null should be used to indicate a lack of image.

Steps to reporduce

Expected behavior

Actual behavior

fgatti675 commented 1 year ago

Fixed in version 2.0.5 :)

SimpleCreations commented 1 year ago

Hi @fgatti675! I'm not sure if it's related, but I still have the following issue with optional images: if I attach a file, and then delete it right away using the "minus" button, the "save" button becomes greyed out even though the form is filled correctly (the image is optional).