-
Notifications
You must be signed in to change notification settings - Fork 897
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
Yoast SEO sidebar doesn't save the metadata on block editor when the Yoast SEO metabox is disabled #21851
Comments
I got here from WordPress/gutenberg#67207 which has been acknowledged as a regression and a fix is in the works. It seems the earliest that WP can release with the fix will be in 6.7.2 sometime after December 2. In case the issue is more urgent for Yoast, it seems possible to patch with something like the following: add_action( 'enqueue_block_editor_assets', 'hotfix_initialize_meta_boxes' );
function hotfix_initialize_meta_boxes() {
$initializer = <<<JS
( ( { dispatch, select, subscribe } ) => {
const unsub = subscribe( () => {
const isEditorReady = select( wp.editor.store ).__unstableIsEditorReady();
const isInitialized = select( wp.editPost.store ).areMetaBoxesInitialized();
if ( isEditorReady ) {
if ( isInitialized ) {
unsub();
} else {
dispatch( wp.editPost.store ).initializeMetaBoxes();
}
}
} );
} )( wp.data );
JS;
wp_add_inline_script( 'wp-edit-post', $initializer );
} Given that Yoast renders React components, I think it may be done alternatively with hooks ( |
I am closing this issue as an issue has already been opened at the Gutenberg repo: WordPress/gutenberg#67207. The issue is not specific to the Yoast SEO plugin and it can be reproducible for other plugins with metabox set as disabled and having a sidebar. |
Please give us a description of what happened
If Yoast SEO metabox is disabled, then Yoast SEO sidebar doesn't save the metadata like SEO title, meta description. Also, this data does not appear in the page source and remains missing from the post overview page as well.
This issue with saving data applies not only to the SEO title/description but also to all our settings added via the sidebar.
To Reproduce
Step-by-step reproduction instructions
Expected results
Actual results
Screenshots, screen recording, code snippet
https://www.loom.com/share/bdf879f26d67454caca89aa7b6c3de0b
Technical info
Used versions
The text was updated successfully, but these errors were encountered: