-
Notifications
You must be signed in to change notification settings - Fork 6
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Content: Item Cannot Be Saved if the Number Field has a Default Value of 0 #3154
Comments
@zcolah based on my investigation any default value does not get applied to an automatically generated content item during the creation of a new single page model. This is because in the current workflow when creating a new single page model, it immediately creates a content item as soon as the user clicks the create model button. So, when the user then adds fields with default values, that automatically generated content item will not have the default values. I would like to make it very clear that this only happens for automatically generated content items during the creation of a new single page model, if the user tries to make a new content item the default values will be applied. I am not sure if the original design for the field default value is for it to only be applied when creating a new content item but a possible solution to this that I could think of is when the user opens a content item, check each field's value, if it is currently null (which means they haven't modified that field's value yet) and there's a default value set, then apply that default value to the empty field. There are some caveats for the proposed solution above though
|
If this were a critical issue, it would likely have been raised by now. While it is a valid concern, it’s important to note that the system is not breaking or corrupting data and is operating within its defined rules. When the content item is created, it starts without fields, so no default values are populated. For now, we can leave the system as is until a user request or issue arises. I don’t believe any organization would create a single-page model and expect the first auto generated item to be populated with default values. Typically, the developer sets up the model, codes the template, inputs the initial version of the content, and then hands it over to the marketing team. Hence lets de prioritize this. |
Problem:
If I increased and then decreased back to 0 it let me save the field.
A user set a number field as required and with a default value of 0. However when they tried to save the variant it treated the 0 as a missing required field and threw an error and did not allow the user to save the content item/
Solution:
The user should be able to save the item, as the number field technically had a value aka 0. They do not need to manually re-enter 0 for it to save.
The text was updated successfully, but these errors were encountered: