Review response structured data still not properly handled in 7.2.1

Thanks for finally updating structured data handling on Woocommerce.

There is still one bug remaining:

  • If an admin responds to comment, that comment will get a rating of 0. Structured data handling in X creates a “regular comment” from that by appending the response to the actual comment structured data. This results in Google reporting a structured data error as a review with a “0” rating is not valid.

It seems that you (still) roll your own here? Why don’t you use the perfectly capable structured data handling module in Woocommerce that does handle (also this) condition correctly.

The correct way here should be to NOT build structured data for responses with no rating.

Hey @mrboats,

It’s 0 when the admin replies because there is no interface to add review stars/rating to the reply/comment. I believe the admin reply must not have a rating at all but the decision will ultimately be made by our dev team so I’ll post this in our issue tracker.

Regarding your question:

Yes, we have our own. We need to override WooCommerce’s Review structure mainly for styling purposes. We then add the Review Schema in the custom structure.

To your second question:

Can you provide details and screenshots on this? I tested the default WordPress theme and WooCommerce and it didn’t detect a Review Schema. Do we need to enable something in WooCommerce?

Thanks.

Hi,

No other theme seems to need to roll their own to handly styling? Perhaps your devs need to take a look at how this is implemented in other themes as long as they introduce errors by rolling their own. I’m not a coder so cannot day what you need to do, but there is no setting for structured data and other themes do get this right.

Here is a screenshot of the structured data error reported by Google plus your incorrect code:

Hey @mrboats,

Template override is necessary if you want to rearrange or customize WooCommerce. A lot of themes do that not only us. It’s not proper to list them here.

We recognize the problem with our theme with regards to the Review Schema error. I already reported that.

Regarding Review Schema in other themes, I could not speak about that but I tested some popular themes and they don’t even have the Review Schema. Sure they don’t have errors because there’s no Review Schema added.

Once this schema problem in our theme is fixed, our themes will be one of the few (at-least based on my personal testing of popular themes) that has a WooCommerce Review Schema. WooCommerce does not have that out of the box. I just asked previously because I might have missed something but you confirmed that there’s no special setup for the Review Schema and there’s none available out of the box.

Thanks.

There is a method in Woocommerce for generating the review structured data. If I choose an default theme (such as twenty(something), the review structured data is handled correctly and by the method in Woocommerce? As structured data is not shown to users, I don’t really see why you need to handle it due to customization?

Actually, on a bit further testing, seems even single reviews have a problem with 7.2.2. See attached screenshot from Google Structured data testing tool.

Hi @mrboats,

Would you mind providing a sample URL where we can test it? I’m checking on this issue and I can’t reproduce the last error you have provided, but it seems Woocommerce related as mentioned here https://support.google.com/webmasters/thread/17156844?hl=en

Also, I checked on Twenty themes and I don’t really see a reply function for the reviews, so I assume Woocommerce doesn’t really utilize it, hence I recommend not bypassing it by directly replying through admin. The Woocommerce review feature are intentionally implemented for single-threaded reviews without replies regardless of theme. I think that’s where customization is needed since it’s outside Woocommerce default implementation of review structure (no replies). But I will further check that.

The generate_review_data() is primarily for generating JSON Schema data, which is yes, the same information as to how the schema is added to comment structures. Perhaps we can just completely remove our added/integrated schema and let Woocommerce or users handle it. Still, I don’t see any issue on my tests in either twenty themes and on our theme (when I checked the product review through google snippet tool). Let us know.

Thanks!

OK, but if this is your “extra” feature, it would be great if you handled it correctly.

Hi @mrboats,

Thanks for the URL, but I can’t reproduce the error you’re getting on your last screenshot. This is what I got

Would you mind providing an exact procedure on how to reproduce it?

As for the first issue, I can confirm that it’s caused by replying to the review through admin. It’s not an extra feature, the only thing that in between the theme and Woocommerce are template integrations. The review functionality is still as is as Woocommerce provided in which no reply feature for reviews, so reply shouldn’t be bypassed through admin since even Woocommerce review doesn’t even have a reply feature on its front’s review.

There may be an existing plugin that can extend Woocommerce review functionality like in these https://www.cloudways.com/blog/review-plugins-for-woocommerce/ (not my site or URL), and or I can add this as a feature request. Currently, it’s limited to and must only stick to the standard functionality of Woocommerce provided as the level of integration is just on the template level. But all in all, with default review, I don’t see issues with the snippet. But we’ll investigate this further , we’re always open to improvement :slight_smile:

Thanks!

Hi @mrboats,

I did some update on this one by completely removing schema for admin reply, mixing review and standard comment schema causes more warnings. That is at least just for product review section. Please check a demo page that you can test in the secure note.

Thanks!

Hi,

Yes, strange, now I cannot duplicate it any more myself??? Didn’t do anything and there is no cache involved?? OK so let’s close this then, baffled but the response still ofcourse shows up as an error.

Thanks.
If you need anything else we can help you with, don’t hesitate to open another thread.

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.