-
-
Notifications
You must be signed in to change notification settings - Fork 3k
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
Fields default to null value #977
Comments
This could also be fixed along with #725. |
I would be interested in working on this issue if it is still free. |
@MichaelRomani That would be great. There was some related discussion in #725 as well. |
@MichaelRomani I'm going to post your last comment from Gitter here, easier to track things:
And @tech4him1's response:
Finally, my thoughts: The confusion here is my fault - I linked #895 in the summary without providing context (now updated). That issue is about "editor components", a.k.a. Shortcodes, breaking when empty, but the underlying issue has nothing to do with shortcodes - the fields in those shortcodes are regular widgets, the same as those used outside of shortcodes. #895 is just one manifestation of the issue described in the summary. @MichaelRomani this means that this issue is way less complicated than it probably seemed - you don't have to muck around with that crazy markdown widget at all (I hope). We just need the field value to be the right type, e.g. an empty String widget's value should be an empty string, not Does that make sense? |
Shawn, thank you for the clarification. I was reading into the connected issue(s) too much and not focusing on the main issue described. So to clarify, the field values for all of the widgets within Editor Widgets, if the value is null, the value should be set to the correct 'empty' type, ie. empty object, empty string, etc... ? Also, should I be updating the redux store's image, data, body, title values on load to be empty strings (aside from date which is already being set on load)? Thanks. |
Closed by #1126. |
- Do you want to request a feature or report a bug?
enhancement
- What is the current behavior?
Fields default to a null value, which just causes weird things to happen sometimes.
- If the current behavior is a bug, please provide the steps to reproduce.
See #895 for one manifestation of this bug. Note: that issue involves default values of widgets inside of Markdown editor shortcodes, but this bug is not limited to that context, and is not known to be specific to Markdown editor shortcodes at all.
- What is the expected behavior?
Default values should probably be provided by each widget, with the fallback remaining as null. For example, the string widget and markdown widget should always default to a blank string value.
- Please mention your CMS, node.js, and operating system version.
CMS 1.0.3
The text was updated successfully, but these errors were encountered: