Gravatar being included in structured data?

#51803
  • Resolved Greg
    Rank Math free

    In reviewing the structured data for my site, I noticed in all the blog post author > image > url ‘s there is a link to a gravatar image. I would imagine this is being created by RM as my site has Gravatar’s disabled and i Would think this wordpress setting should be honored?

    If an image is truly necessary for SEO, I would want the icon locally hosted on my site, but I definitely do not want to be linking out to gravatar anywhere on my site.

    Please advise. Thx!

    • This topic was modified 3 years, 11 months ago by Greg.
Viewing 15 replies - 1 through 15 (of 31 total)
  • Hello,

    Thank you for contacting Rank Math and sorry for any inconvenience that might have been caused due to that.

    Rank Math uses the image that has been set under Rank Math > Titles & Meta > Local SEO > Logo. Could you please share a link to the affected blog post so that we can check this further?

    Looking forward to helping you. Thank you.

    ​​​​​​​

    Greg
    Rank Math free

    That’s not even close to the section I mentioned.

    Are you insinuating that the company’s logo is supposed to be appearing is the ld+json data as the post author’s picture?

    I’m not sure why you always want customer’s site information… surely you have a test site you can validate this on?

    Look at the ld+json data…
    @graph
    —–> @type:blog
    —–> url:…
    —–> headline:…
    —–> description…
    —–> blogPost
    —–> —–> @type: BlogPosting
    —–> —–> headline:…
    —–> —–> name…
    —–> —–> url…
    —–> —–> mainEntityOfPage…
    —–> —–> dateModified…
    —–> —–> datePublished…
    —–> —–> author
    —–> —–> —–> @type: Person
    —–> —–> —–> name…
    —–> —–> —–> url…
    —–> —–> —–> description…
    —–> —–> —–> image
    —–> —–> —–> —–> @type:ImageObject
    —–> —–> —–> —–> url:https:\/\/secure.gravatar.com\/avatar\/….

    Hello,

    Thank you for contacting Rank Math today.

    I had already tested this on my end but I could not reproduce it which makes me think that you have another plugin/ theme code generating this schema data.

    Looking forward to helping you. Thank you.

    ​​​​​​

    Greg
    Rank Math free

    Hello,

    I have updated the sensitive data as requested. Can you please check further?

    Thank you.

    Greg
    Rank Math free

    Tried disabling ALL plugins including caches and viewing the site through a maintenance URL which I verified was not serving cached data and confirmed it…

    Then loaded it on another fresh site with no other plugins loaded (added to sensitive data) and confirmed the problem exists…

    Then spun up a brand new site with a different theme and confirmed the problem exists…

    This is two brand new sites with no other plugins… all you have to do to confirm the problem is install Rankmath… go in the wordpress settings and disable gravatars and visit the HOME PAGE of the site… note that on the URL I provided, it does not include the gravatar on /home/ which is the same page as the base domain / is but does include it on the base domain…

    Todd
    Rank Math free

    Hi Greg,

    If that doesn’t work, we might need to take a closer look at the settings. Please include your WP logins in the designated Sensitive Data section.
    Sensitive Data Section

    It is completely secure and only our support staff has access to that section. If you want, you can use the below plugin to generate a temporary login URL to your website and share that with us instead:
    https://wordpress.org/plugins/temporary-login-without-password/

    You can use the above plugin in conjunction with the WP Security Audit Log to monitor what changes our staff might make on your website (if any):
    https://wordpress.org/plugins/wp-security-audit-log/

    We really look forward to helping you.

    Greg
    Rank Math free

    I mean that’s all fine and dandy… but like I mentioned, was able to replicate the issue on 2 fresh sites with no plugins… just about the only setting changed was that one I mentioned on one of the sites… ?

    Ok login attached to sensitive items…

    Greg
    Rank Math free

    Hello,

    I have updated the sensitive data as requested. Can you please check further?

    Thank you.

    Hello,

    Thank you for contacting Rank Math today.

    The Gravatar link seem to be coming from a comment by a WordPress Commenter under your Hello world post and not Rank Math. Please check and let us know.

    Looking forward to helping you. Thank you.

    ​​​​​​

    Todd
    Rank Math free

    Hello,

    I wanted to add that it is completely normal for the Gravatar link to appear beside the “Person” Schema. The logo can be added separately from WordPress Dashboard > Rank Math > Titles & Meta > Local SEO.

    It will show up in the Schema as well along with the person Schema of commentators.

    Hope that helps and please do not hesitate to let us know if you need our assistance with anything else.

    Greg
    Rank Math free

    I’m so thoroughly confused now…

    In reply to Michael Davis:
    I’m not referring to a visible hyperlink on a previous post, but rather the ld+json metadata… why would the gravatar of a post commentor be listed as the gravatar of the post author in the metadata?

    Todd: This makes no sense either… It’s not normal for it to show up if I explicitly turned off the option for gravatars as that would be why I turned off the option?

    My question remains how do we turn this off? There was no mention of it in this support thread but it appears that you reloaded the plugin, changed the theme, and did other unknown changes while logged in, and it does look like the gravatar is no longer in the ld+json but again this was a test site I provided and I need to know what the fix is for the production site…

    Also again I would suggest that RankMath followed the existing wordpress option. Being there is already an option that is singly for this purpose, it’s a logical assumptinn that someone who goes out of their way to disable gravatars within wordpress would not want gravatars in the meta data.

    Thx

    Todd
    Rank Math free

    Hi,

    Please add this code to your theme’s functions.php file to remove the author picture and hence the gravatar from your Schema.

    add_filter( 'rank_math/snippet/rich_snippet_article_entity', function( $entity ) {
    	unset( $entity['author']['image'] );
    	return $entity;
    });

    Hope that helps and please do not hesitate to let us know if you need our assistance with anything else.

    Greg
    Rank Math free

    Filter isn’t working… no idea why… cleared cache and bypassed CDN and nope… Also tried adding the 50, 1 and still nope…

    Also I pulled it up in Google’s structured data testing tool and nope..

    But even worse when I pulled it up on the Google tool, I noticed that the author metadata includes the AUTHOR archive page url… even while author archives are disabled in the settings!

    Greg
    Rank Math free

    Again not sure why the filter isn’t working but I even found the source of the problem for you if you’d rather just fix the code in a rankmath update… In the first bold part you’re getting the author URL without first checking if author archives are disabled in the RM settings. Perhaps it should default to the site’s main URL if author archives are turned disabled?

    And the second bold part, you’re getting the avatar URL MANUALLY by looking up the user_email without even checking if the site has gravatars disabled. Shouldn’t there be a test like:
    $show_gravatar = $instance[‘show_gravatar’] == 1 ? true : false;
    if ( version_compare( get_bloginfo( ‘version’ ), ‘4.2’, ‘>=’ ) ) {
    if ($show_gravatar) {
    $image = get_avatar_url( get_the_author_meta( ‘user_email’ ), 96 );
    }
    }

    —–

    public function get_author() {
    $author = [
    ‘@type’ => ‘Person’,
    ‘name’ => get_the_author_meta( ‘display_name’ ),
    ‘url’ => esc_url( get_author_posts_url( get_the_author_meta( ‘ID’ ) ) ),
    ];

    if ( get_the_author_meta( ‘description’ ) ) {
    $author[‘description’] = wp_strip_all_tags( get_the_author_meta( ‘description’ ), true );
    }

    if ( version_compare( get_bloginfo( ‘version’ ), ‘4.2’, ‘>=’ ) ) {
    $image = get_avatar_url( get_the_author_meta( ‘user_email’ ), 96 );
    if ( $image ) {
    $author[‘image’] = [
    ‘@type’ => ‘ImageObject’,
    ‘url’ => $image,
    ‘height’ => 96,
    ‘width’ => 96,
    ];
    }
    }

    return $author;
    }

    Greg
    Rank Math free

    AND I just noticed that these posts are also not being affected by the other 3 filters y’all helped with before to not show an updated modification date on posts…

    I honestly don’t even know why RankMath insists on littering sites with all this broken metadata… there are literally HUNDREDS of tickets with the same questions and I’m yet to see that these actually improve SEO. Yoast doesn’t even include any of the sillyness on their own page: https://search.google.com/structured-data/testing-tool/u/0/#url=https%3A%2F%2Fyoast.com

    Please advise how to remove all this extra stuff from my site… The ENTIRE Blog section with ALL the blog data… The one example I found searching doesn’t seem to work either…
    add_filter( ‘rank_math/json_ld/blog_enabled’, ‘__return_false’, 10, 1 );

Viewing 15 replies - 1 through 15 (of 31 total)

You must be logged in to reply to this ticket.