Magento 2 SEO Alert: Fixing Invalid Review Author Schema for Rich Snippets
Magento 2's Hidden SEO Blocker: Resolving Invalid Review Author Schema for Enhanced Rich Snippets
As e-commerce migration experts at Shopping Mover, we constantly monitor the Magento ecosystem for critical updates and insights that impact store performance and search visibility. A recent GitHub issue (magento/magento2#41043) has brought to light a significant, albeit non-critical, structured data problem within Magento 2's default product review snippets that every merchant and developer should be aware of.
The Core Problem: Misconfigured Review Author Markup
The issue stems from how Magento 2 currently renders the author of a customer review on product pages. By default, the itemprop="author" attribute for a schema.org/Review object is applied directly to a plain text string representing the reviewer's nickname. For example:
= $escaper->escapeHtml($_review->getNickname()) ?>
According to Google's Review structured-data documentation and schema.org guidelines, the 'author' property must be a Person or Organization object, not a simple string. This discrepancy leads to an "Invalid object type for field 'author'" warning in Google Search Console. While Google currently classifies this as a non-critical issue, it prevents author-based review snippets from appearing and carries the risk of being reclassified as critical in the future, potentially impacting your product page's rich results visibility.
The Solution: Wrapping the Author in a Schema.org/Person Object
The proposed fix, detailed in the associated pull request, is a straightforward template markup adjustment. It involves wrapping the reviewer's nickname within a schema.org/Person object, ensuring compliance with Google's requirements:
= $escaper->escapeHtml($_review->getNickname()) ?>
This change correctly nests the itemprop="name" within the Person scope, distinct from other itemprop="name" attributes on the page. It's a pure .phtml template fix within the Magento_Review module, specifically affecting the list.phtml template, and requires no behavioral PHP changes or new unit/integration tests. The fix has been manually verified using Google's Rich Results Test and Schema Markup Validator, demonstrating that the 'author' is correctly recognized as a Person object, resolving the warning.
Impact for Magento Stores and Developers
- Improved SEO & Rich Snippets: Correcting this markup ensures your product reviews are fully compliant, increasing the likelihood of appearing with richer, more detailed snippets in Google search results. This can significantly boost click-through rates and organic traffic.
- Future-Proofing: Addressing this "non-critical" warning now protects your store from potential negative impacts if Google reclassifies the issue as critical in the future.
- Developer Action: Magento developers and agencies should consider implementing this fix in their custom themes or via module overrides to ensure their clients' stores are fully optimized. This is particularly relevant for those undergoing Magento 1 to Magento 2 migrations, where every SEO advantage counts.
The issue has been officially reproduced and confirmed by the Magento engineering team (engcom-Bravo), underscoring its validity and the need for a resolution. While the issue is confirmed, the resolution is pending official inclusion in a future Magento release. Until then, proactive implementation is a recommended best practice for any Magento 2 store prioritizing SEO and rich results.
At Shopping Mover, we emphasize that every detail, especially regarding structured data, contributes to a robust online presence. Ensuring your Magento 2 store's structured data is impeccable is crucial for standing out in competitive search results.