-
Notifications
You must be signed in to change notification settings - Fork 4
Description
Hello! I'm working on a PrestaShop 1.7 store using the Warehouse theme. I've implemented a module that injects structured data via JSON-LD. While the valid Product block is correctly rendered and includes all required fields (offers, price, availability, etc.), Google Rich Results continues to report an error: “Unnamed item” or “Invalid Product item” on the product page.
Here’s what I’ve done so far:
Manually inspected all relevant template files, including:
product-jsonld.tpl, product-list-jsonld.tpl, footer.tpl, and all footer variants
Scanned the entire theme and modules using a custom PHP script that looks for @type: "Product" and @type: "ImageObject" blocks
Confirmed the valid JSON-LD block is present, complete and correct
The invalid block is visible in the final HTML source code, but it’s not found in any static file or template
The block seems to be injected dynamically, possibly by a third-party module or via JavaScript
No structured data related to this block is coming from known SEO modules or schema templates
I’ve also tried:
Inspecting the DOM using JavaScript (MutationObserver and console.trace())
Grepping hooks such as displayHeader, displayFooter, displayProductAdditionalInfo
Searching the cache, modules and JS for runtime injection
Disabling modules selectively, with limited results
So far, nothing has revealed where this rogue Product block is being injected from.
Question: What’s the most effective method to identify a dynamically injected JSON-LD block in PrestaShop when it’s not defined in any template or module file and only appears in runtime HTML?
Would love input from anyone who’s tackled similar structured data debugging in PrestaShop!
Thanks in advance.