EARTHLOOMGuides   Apps

How to find and fix conflicting JSON-LD schema on a web page

Modern sites often load SEO plugins, theme microdata, and app scripts that each inject their own JSON-LD. The result: two Organization blocks with different logos, missing priceValidUntil on Product, or BreadcrumbList items in the wrong order. Google reads all of them and may pick the wrong one or flag errors. This guide shows how to inventory every block, attribute it to its source, spot conflicts, and produce a remediation list.

Why this is harder than it looks

Browser dev tools show the raw script tags but not which plugin wrote them. General validators (Rich Results Test, Schema.org validator) merge everything into one view and do not tell you that Yoast emitted the Organization while the theme emitted a duplicate with a different @id. You cannot fix what you cannot attribute. The process must separate server-rendered markup from client-injected scripts, parse microdata alongside JSON-LD, and flag Google-specific requirements like availability values, ISO dates, and image URL formats.

Step by step

  1. Extract every JSON-LD and microdata block from the live DOM. Open the page, then fetch its HTML again (same origin) to compare server-rendered vs client-injected markup. Parse all <script type="application/ld+json"> tags - tolerate trailing commas, comments, CDATA wrappers, and entity-encoded quotes. Parse microdata (itemscope/itemprop) into equivalent JSON-LD objects, following itemref chains. Record the character offset of each block for later reference.
  2. Attribute each block to its likely source. For every block, collect signals: the containing script's id or class, nearby HTML comments (WP plugin comments like <!-- Yoast SEO -->), @id fingerprint patterns (yoast-schema, rankmath), script src paths (/wp-content/plugins/woocommerce/), and known heuristics for WooCommerce, AIOSEO, theme frameworks. Assign a confidence level (high/medium/low) and list the reasons. Never claim certainty - label as "likely from Yoast" not "is Yoast".
  3. Group by @type family and flag singletons. Collect all blocks sharing the same top-level @type or @graph entry type. For singleton families - Organization, WebSite, WebPage, SiteNavigationElement - any count >1 is a conflict. For repeatable types (Product, BreadcrumbList, FAQPage), check each instance for completeness. Note when two blocks have the same @id - that is a hard collision.
  4. Validate each block against Google requirements. Run requirement tables per type family: required fields (name, url, logo for Organization; name, image, offers.price, offers.availability for Product), one-of groups (description OR description), recommended fields, and format checks. Verify price is a number, currency is ISO 4217, availability uses schema.org enum (InStock, OutOfStock, PreOrder), dates are ISO 8601 and not expired, ratingValue is 0-5, reviewCount is integer, image URLs are absolute HTTPS. Flag missing required, wrong format, and typos in @type (e.g., "Organisation").
  5. Identify cross-block contradictions. Compare fields across blocks of the same type. Common conflicts: different logo URLs, different sameAs arrays, conflicting openingHoursSpecification, price vs priceSpecification mismatch, BreadcrumbList position gaps or duplicates. For each contradiction, list the two sources, the field, and the two values. Prioritize fixes that affect rich-result eligibility (logo, price, availability).
  6. Export a developer-ready fix list. Produce a JSON or CSV with: block ID, source attribution, @type, validation errors (missing required, format), conflicts (field, value A, value B, source A, source B), and suggested action (remove block, merge fields, update plugin setting, edit theme file). Include the character offset so developers can locate the exact script tag in the source. Sort by severity: invalid JSON first, then missing required, then contradictions.

Common mistakes

Where SchemaPatch fits in

SchemaPatch is a browser extension (Edge, Firefox) that injects an analysis function on click. It extracts all JSON-LD and microdata, attributes each block to its likely plugin or theme, validates against Google requirement tables, flags duplicates and cross-block contradictions, and exports a JSON fix list with source attribution and character offsets. No background scripts, no telemetry, no remote code - analysis runs entirely in the tab.

SchemaPatch support and FAQ

FAQ

Why does the extension re-fetch the page URL?

To compare the server-rendered HTML with the live DOM. Scripts that inject JSON-LD after load (common with consent managers or tag managers) only appear in the DOM, not the original HTML. The diff reveals client-side injection.

Can it fix the schema automatically?

No. It produces a fix list with exact locations and suggested actions. A developer or site owner must edit the plugin settings, theme files, or custom code. Automatic edits risk breaking other functionality.

Does it work on pages that require login?

Yes, because it runs in your authenticated tab. The re-fetch uses your session cookies (same-origin), so it sees the same markup you see. It never sends page content to any external server.