Blog / Shopify & e-commerce /

Finding structured data errors in your Shopify theme

You run a product page through a validator and it shows two Product blocks, a price that doesn’t match the page, and a warning you don’t understand. Where did they all come from?

Structured data can help describe a product page, but duplicate or inaccurate markup creates confusion. On Shopify, the theme, an app and a custom snippet can all be outputting product information at the same time, and none of them knows about the others.

Key takeaways

  • Find every structured-data block on the rendered page and identify who owns each one.
  • Compare price, currency, availability, name and URL with what a visitor sees.
  • Fix the source of the wrong output instead of adding another patch.
  • Retest after theme updates.

Start with the rendered page

I’d always begin with the rendered page, not the theme code. Look at every structured-data block that comes out: theme JSON-LD, review app markup, anything a developer pasted in years ago.

Then compare the values with what a visitor sees. Price, currency, availability, product name and canonical URL should all match. If the page says “in stock” and the markup says “out of stock”, the markup is wrong, and that’s what a validator can’t tell you.

More than one block isn’t automatically an error

A product page may expose more than one block of JSON-LD. That’s not necessarily a problem. What matters is that the blocks don’t contradict each other, and don’t describe the same entity twice with conflicting values.

If you find a conflict, ask where each block comes from. View the page source and look for the app or theme snippet that outputs it.

Fix the owner, not the symptom

If an app owns the markup, don’t patch the theme blindly. First identify which component generated the wrong value, then fix it there or turn that output off. Layering a second patch on top of the first is how stores end up with three blocks and no idea why.

Keep the visible product details accurate too. Structured data should describe the page. It should never invent an offer that the page doesn’t make.

Use the validator for what it’s good at

A validator shows syntax problems and eligibility issues. It can’t decide whether the visible product information is accurate. So I use it as a first check, and then compare against the page by eye.

Test a representative page from each template after changes: a simple product, a product with variants, and one that’s sold out. That’s where the odd cases hide.

Test the odd cases

A clean simple product proves very little. Variants can change the price and availability that the markup reports, and a sold-out item should say so in the markup as well as on the page. If you sell bundles or items with several offers, check those templates specifically. It’s slower than running one URL through a validator, but it’s where mistakes hide.

Watch for theme updates

If you added custom code to the theme, check whether a theme update will overwrite it. Keep a note of where your edits live, so a routine update doesn’t silently undo them or double them up.

Check the evidence

Search Console may report product or other structured-data issues for specific URLs. Inspect a few affected pages and read the details. A warning isn’t automatically a ranking problem, so separate errors from optional fields and prioritise anything invalid or misleading.

Common traps

  • Treating a validator’s green tick as proof the data is right.
  • Assuming one page’s problem applies to every URL.
  • Patching markup in the theme when an app produces it.
  • Changing several things at once, so you can’t tell what fixed it.

Each wastes time. Go back to the page and check what actually changed.

A small routine

After a redesign, app install, theme update or platform change, revisit a few product pages and keep a short record of what you checked. When you’ve made a fix, view the page source one more time to be sure the blocks now agree.

How many structured-data blocks does your best-selling product page output, and do you know where each one comes from? Open the source and count.