-
Notifications
You must be signed in to change notification settings - Fork 4.2k
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
Hiding all metaboxes prevents POST
request to post.php
to save meta fields
#67207
Comments
I think the culprit is here: gutenberg/packages/edit-post/src/components/layout/index.js Lines 229 to 245 in b58cce6
Previously, the 'normal' and 'advanced' metaboxes areas were still rendered and hidden with CSS. |
cc @stokesman |
Reading the dev note about the split view for metaboxes, there's no mention that the rendering of the HTML has changed. As in: When panels visibility is disabled in the Preferences:
This impacts, for example, any plugin that uses hidden input fields in their metaboxes to save meta and thus trigger the POST request. It sounds like a breaking change that was overlooked and not documented. |
Of course, avoiding to render the HTML and run extra code is a performance benefit. However, I'm not sure this behavior can be changed without deprecating saving meta via hidden input fields in the metaboxes area and allowing a grace period for plugins to adapt. |
I was not able to reproduce this issue. Is there a step I'm missing?
eb7297de708aa91d873579ffe93133ef.mp4 |
@t-hamano thanks for testing. I'm not sure why you can't reproduce on your environment. |
Ah, after a few tests, I was able to reproduce this issue stably. It may have been due to my environment. |
Description
Since WordPress 6.7, when all the metaboxes are hidden in the preferences, the
POST
request topost.php
to save meta fields is not fired anymore as it used to (e.g. in 6.6.2).This creates problems with plugins, e.g. Yoast SEO, that use a sidebar to allow users to change some post metadata.
In general, this is a different behaviour from what used to happen so any mechanism relying on that request being fired could be affected.
Step-by-step reproduction instructions
POST
request is fired topost.php
, so the changed value is not savedUp until 6.6.2, a
POST
request was fired topost.php
even with hidden metaboxes, so the new value was saved.Important to notice: the value change in the hidden field works as expected, only the
POST
request is not fired anymore.Notable finding:
if the user visits Preferences > General > Advanced, enables the metabox and then disables it again, then doesn't reload the page, the changed value will be saved instead. The problem happens only if all metaboxes are hidden since the editor page has been loaded and the relevant settings have not been touched.
Screenshots, screen recording, code snippet
https://www.loom.com/share/bdf879f26d67454caca89aa7b6c3de0b (created by a Yoast support engineer for this issue)
Environment info
Please confirm that you have searched existing issues in the repo.
Please confirm that you have tested with all plugins deactivated except Gutenberg.
Please confirm which theme type you used for testing.
The text was updated successfully, but these errors were encountered: