Edit post meta field throws #185 react-dom error
Describe the bug
I've a plugin that creates a new section includes DateTimePicker component in the sidebar of any page/post that has Gutenberg editor activated. The plugin will change the metadata value on onChange callback of the DateTimePicker components, includes:
.
.
wp.data.dispatch('core/editor').editPost({ meta: { NAME: VALUE } });
.
.
To reproduce Steps to reproduce the behavior:
- Go to Gutenberg editor (pages or posts).
- Open the Chrome console, how?
- In the console, copy and paste this:
wp.data.dispatch('core/editor').editPost({meta: {_myprefix_text_metafield: 'new value'}}). - You will see:
Error: Minified React error #185; visit https://reactjs.org/docs/error-decoder.html?invariant=185 for the full message or use the non-minified dev environment for full errors and additional helpful warnings.
Expected behavior The meta field should be updated with the added value.
Screenshots
Desktop (please complete the following information):
- OS: Windows 8.1 (64-bit)
- Browser: Chrome
- Version: 78.0.3904.108
Desktop (please complete the following information):
- OS: Windows 8.1 (64-bit)
- Browser: Firefox
- Version: 70.0.1
Additional context
- Noticed the issue after upgrading WordPress to version
5.3 - I have tested that with deactivating all WP plugins.
- Tried to install the latest
GutenbergWP plugin, but didn't work.
@MohammadAlBanna I couldn't reproduce any specific issue. Does it require your plugin for the issue to occur?
I did test using WP5.4, so maybe it's something that's now resolved. Let me know if you're still experiencing it.
As there doesn't seem to be any more information on this, let's close for now. The issue can always be reopened if there are more details later.