Invalid schema

#453799
  • Resolved Shatha
    Rank Math free

    Hi there!

    When I checked the new “merchant listings” report on Google Search Console, I saw that all products are invalid because of the following:

    1- Invalid value in field “priceSpecification” (in “offers”)
    2- Missing field “priceType” (in “offers.priceSpecification”)

    The solution is to display the price by either the price or priceSpecification.price property as Google stated here:

    https://developers.google.com/search/docs/appearance/structured-data/product#offer-details

    How can I remove the priceSpecification.price property from the product schema using Rank Math?

    Notes:

    1- We migrated from Yoast to Rank Math but the merchant listings issue was reported on Google Search Console before the migration.

    2- It’s a WooCommerce store and we use the WooCommerce product schema.

Viewing 8 replies - 1 through 8 (of 8 total)
  • Hello,

    Thanks for contacting us, and sorry for any inconvenience that might have been caused due to that.

    This actually a bug coming from Google itself and they seem to have rolled out a fix already:

    https://support.google.com/webmasters/thread/179252156/i-am-getting-error-in-my-merchant-listing-which-says-missing-field-pricetype?hl=en

    Make sure both Rank Math and Woocommerce are updated, clear your website cache and check again in the Rich Result Test in the next few days.

    You may keep an eye of our changelog from here: https://rankmath.com/changelog/free/

    To completely remove the priceSpecification that is causing the issue, you may refer to this filter code:

    add_filter( 'rank_math/snippet/rich_snippet_product_entity', function( $entity ) {
            unset($entity['offers']['priceSpecification']);
    	return $entity;
    });

    Here is how you can add filters/hooks to your WordPress site: https://rankmath.com/kb/wordpress-hooks-actions-filters/

    Let us know how that goes. Looking forward to helping you.

    Thank you.

    Shatha
    Rank Math free

    Thanks for your reply.

    I don’t think it’s a bug coming from Google because I have another website where the schema is fine. I’m hesitant to use the filter code you mentioned because it may break something else on my website.

    Since we migrated from Yoast to Rank Math last week, is there any possibility that this is the cause of the problem? How can I get rid of all Yoast traces?

    I tried to navigate to Import & Export from WordPress Dashboard > Rank Math > Status & Tools > Other Plugins Section > Clear but I kept getting an error message “clean up of Yoast SEO data failed”

    Clean up of Yoast data failed

    Hello,

    If the Yoast clean-up function isn’t working, please refer to this guide instead: https://yoast.com/help/how-can-i-uninstall-my-plugin/#database

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

    Shatha is totally right, rank math is outputting in the shema for the “offers” both the price and the priceSpecification object. The documentation at google states that its either one or the other.
    Using a filter to overcome a bug is not ideal, any chance you can fix that at the plug-in level?

    Shatha
    Rank Math free

    I managed to uninstall Yoast completely and I updated Rank Math and WooCommerce. However, I still have the same problem (my schema still has two price properties). As Tiago said using a filter to handle this problem is not ideal, are you going to release a new update of Rank Math that can fix this problem?

    Hello @tiagoalmeida,

    Thank you so much for reaching out to us. We are happy to have you here.


    @tiagoalmeida
    , @shatha,

    Google’s Rich Result test is still seeing it as an error which is currently a bug from their end so for now, our dev team recommends removing it temporarily using a filter code.

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

    Shatha
    Rank Math free

    Does the new update of rank math (v1.0.99) fix this problem?

    Hello,

    The latest update of Rank Math doesn’t contain a fix for the issue.

    As my colleague mentioned above, the bug is coming is from Google’s end. So we may not release a fix for this issue as it’s perfectly fine from our end.

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

    Thank you.

    Hello,

    Since we did not hear back from you for 15 days, we are assuming that you found the solution. We are closing this support ticket.

    If you still need assistance or any other help, please feel free to open a new support ticket, and we will be more than happy to assist.

    Thank you.

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

The ticket ‘Invalid schema’ is closed to new replies.