Open shabnam611 opened 2 days ago
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 (useSelect
/useDispatch
) and added to the plugins sidebar component.
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