ld+json description error

#5792
  • Resolved Gemuz
    Rank Math free

    valid:
    <meta name=”description”
    <meta property=”og:description”
    <meta name=”twitter:description”

    invalid:
    <script type=”application/ld+json”> … description

    This markup is generated by the plugin and an error in it.

    • This topic was modified 5 years, 7 months ago by Gemuz. Reason: add img
    • This topic was modified 5 years, 7 months ago by Gemuz. Reason: manual description (screen)
    • This topic was modified 5 years, 7 months ago by Gemuz. Reason: manual description (screen)
Viewing 15 replies - 1 through 15 (of 15 total)
  • Hello,

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

    I have just tested your page on the Google structured testing tool but I could not reproduce any errors, are you using a different tool to validate the page?

    Looking forward to helping you. Thank you.

    ​​​​​​​

    Gemuz
    Rank Math free

    Hello,

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

    Thank you.

    Gemuz
    Rank Math free

    ld+json generates an incorrect description.
    The description is taken from the post the first lines, not a manual description.
    I attached a picture, there you can see what the description should be.

    Gemuz
    Rank Math free

    Included other template, but the error remained unchanged.
    Template in this is not to blame.

    Gemuz
    Rank Math free

    Hello,

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

    Thank you.

    Hi Gemuz,

    Thanks for the access.

    The plugin is working correctly. The article description for the rich snippet is extracted from the main content of your post. You only have a PDF shortcode as the main content and this is what is getting loaded as the post description since the structured data testing tool cannot load the file from the shortcode.

    I have also attached another screenshot of the meta description from Rank Math which is loading correctly on the page source and on the testing tool.

    I would suggest that you add a description of the file on the main content of the page for use on the rich snippet.

    I hope this info helps. Thank you.

    Gemuz
    Rank Math free

    Hello,

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

    Thank you.

    Gemuz
    Rank Math free

    Yes, I would agree with you, but … I have a manual description. Why is it ignored by the plugin?

    Todd
    Rank Math free

    Hi,

    I just tested it using this website and the meta description is the same as you set in the backend

    https://totheweb.com/learning_center/tool-test-google-title-meta-description-lengths/

    Here’s a screenshot for your reference:
    meta description

    Do you expect to see something else as a meta description?

    Gemuz
    Rank Math free

    Todd, I gave you an example of the fact that the plugin always generates a description from the post ignoring the manual description. To verify, use this link: https://search.google.com/structured-data/testing-tool/u/0/
    The fact that the rest of the structure testers do not use the ld+json does not say that the plugin works correctly.

    ld+json “description” = name=”description” = proper work

    Todd
    Rank Math free

    Hi,

    The description for rich snippets needs to be set from the Rich Snippets tab.

    Here’s a screenshot for description.
    rich snippets

    Currently, it is defaulting to your excerpt because you haven’t entered one manually.

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

    P.S: The proper word is JSON-LD.

    Gemuz
    Rank Math free

    How I was wrong. I had a manual description and it worked, but I did not insert a manual description into a rich snippet. Past seo plugin automatically added markup to JSON-LD.
    This is my big mistake and delusion!
    Your plugin is beautiful! You are the best.

    Is it possible to make the manual description automatically added to the rich snippet? I use only markup article.

    HI there,

    I am glad that this now works as expected.

    To be able to automatically assign the meta description to the rich snippet description, I would suggest that you create some custom logic within the following filter:

    /**
     * Filter to Short-circuit Schema if a 3rd party is interested in generating their own data.
     * Replace $schmea_type with schema name like article, review, etc.
     * @param array $entity Snippet Data
     * @return array
     */
    add_filter( "rank_math/snippet/rich_snippet_{$schema_type}", function( $entity ) {
    	return $entity;
    });

    I hope this info helps. Thank you.

    Gemuz
    Rank Math free

    fix

    Todd
    Rank Math free

    Hello,

    We are glad that it is working now 🙂

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

The ticket ‘ld+json description error’ is closed to new replies.