Open maurisrx opened 5 months ago
Hi @maurisrx
Thanks for using the Yoast SEO plugin and also for creating the issue.
I enabled the Open graph and X card via the Yoast SEO settings page and added the filter function you have shared above on the active theme's function.php. I initially noticed this issue even without the Yoast SEO plugin installed. However, when activating the Yoast SEO plugin, I noticed the icons on the front end from WordPress are loading correctly.
I also noticed that the TinyMCE editor is loading on the front end, and the Yoast and other WP icons are loading without any issues after that. See the screenshot below for your reference:
So, can you please try to reactivate the Yoast SEO plugin to check whether it helps?
Thanks @josevarghese for the test and reply!
I mistakenly assumed the wrong theme it has conflict with. The actual theme the issue has conflict with is storefront
. Do you think I should also contact the Storefront theme support to let them know the issue?
Hi @maurisrx
I again tested using the Storefront theme and noticed that the admin menu bar icons are loading without any issues. . So can you try this on another website, which is hosted on another server? As you already know, you can create free sites using the instawp.com and Local WP
Details of the testing environment at which I tested: PHP version: 8.2.10 WP version: 6.5.2 Yoast SEO: 22.5 Web server: nginx/1.16.0
@josevarghese Thanks for getting back to me. Let me try to create a site there to replicate the issue.
@josevarghese I managed to replicate the issue consistently in an instawp site with storefront
and astra
theme:
Here are the testing environment details:
PHP version: 8.0.29 WP version: 6.5.2 Yoast SEO: 22.5
Is there a way I can give you the login link to the instawp site privately?
Hi @maurisrx
Thanks for getting back to us. Now, I can replicate the issue on some themes like Astra and Twenty Twenty-Four. However, the issue is not reproducible on themes like Twenty Twenty-Two and Twenty Twenty-Three.
Also, I noticed why I could not replicate the issue before on the theme 'Storefront' as I added a meta description via the Yoast SEO > Settings > Content types > Post > meta description field. It seems like the issue occurs only when none of the values are present in the meta-description field. So, to confirm the same, can you please edit the page and try to add some text either to the meta description or to the "Social description" field within the Social tab and check whether the issue persists or not?
Thanks a lot @josevarghese for the confirmation.
I can confirm that filling out and saving the meta description field for affected post types via Yoast SEO > Settings > Content types > {post type} > meta description field
resolve the issue.
With empty meta description field:
With filled out meta description field:
Thanks for letting us know. So kindly add a meta description to the page or post at which you are adding wp_editor() as a workaround.
Details about the issue (for developers): If the meta description or the social description field is empty and if we have added the wp_editor() to show on the page/post, then the admin bar icons are not showing on the themes like Astra and Twenty Twenty-Four.
Steps to reproduce:
Add the filter mentioned by the user below:
add_filter( 'the_content', function( $content ) {
ob_start();
$content = '';
$editor_id = 'test';
$settings = array(
'media_buttons' => false,
'textarea_rows' => 10,
'required' => 'required',
'quicktags' => false,
);
wp_editor( $content, $editor_id, $settings );
return $content . ob_get_clean();
} );
Please give us a description of what happened
To Reproduce
Step-by-step reproduction instructions
Open Graph data
&X card data
settings from this URLwp-admin/admin.php?page=wpseo_page_settings
wp_editor()
instance on front end, add the following snippet to add tinymce editor to a frontend content. It can be added via code snippets plugin or active theme’s functions.php:wp_editor()
instance on the frontend.Expected results
Actual results
Steps to fix the issue
I've looked at the Yoast SEO source code and found that doing these steps will fix the issue.
src/presenters/twitter/description-presenter.php:32
andsrc/presenters/open-graph/description-presenter.php:33
inside Yoast SEO (wordpress-seo) plugin file.$this->presentation->twitter_description
to$this->presentation->context->indexable->twitter_description
and$this->presentation->open_graph_description
to$this->presentation->context->indexable->open_graph_description
in the files respectively.$this->presentation
refers toYoast\WP\SEO\Presentations\Indexable_Post_Type_Presentation
object.Open_Graph\Description
atsrc/integrations/front-end-integration.php:97
andTwitter\Description
atsrc/integrations/front-end-integration.php:127
also fix the issue.Screenshots, screen recording, code snippet
Technical info
Used versions