Skip to content

blocks: SeoPDPV2 from page.sections — jsonLDs [{}] placeholder and explicit noIndexing:false block deco-cx's SEO derivation #665

Open

Description

@aline-pereira

Problem (follow-up to #652)

With 7.78.0 a commerce/sections/Seo/SeoPDPV2.tsx placed in page.sections now resolves as the page SEO (#652), but two values that deco-cx's own SeoPDPV2 loader handles still block the derivation on a real decofile (deco-sites/oficina-tanstack, PDP block pages-productpage-ce4850591828):

  1. jsonLDs: [{}] placeholder. The CMS block carries "jsonLDs": [{}]. extractSeoFromProps treats any non-empty jsonLDs array as real structured data and skips deriveCommerceSeoFromJsonLD, so title, description, canonical, image and og:type are never derived from jsonLD (the PDP Loader) — the page falls back to the site's default <head>.
  2. Explicit noIndexing: false. The block sets "noIndexing": false; extractSeoFromProps copies it, and deriveCommerceSeoFromJsonLD only fills noIndexing when it is undefined, so jsonLD.seo.noIndexing (true on ?skuId=) is ignored. deco-cx: noIndexing = props.noIndexing || !jsonLD || jsonLD.seo?.noIndexing.
  3. type. deco-cx's section always renders <Seo type="product">; with a missing product (jsonLD null) the derive returns early and the head falls back to og:type=website / twitter:card=summary.

Measured against www.oficina.com: PDP <head> diverged entirely (1) and /…/p?skuId=21924 was index, follow instead of noindex, nofollow (2).

Proposal

In extractSeoFromProps / deriveCommerceSeoFromJsonLD for the commerce SEO types: drop empty objects from jsonLDs before deciding, OR noIndexing with the loader's per deco-cx, and set type: "product" for SeoPDP/SeoPDPV2.

Site-side workaround today: a section loader for commerce/sections/Seo/SeoPDPV2.tsx (deco-sites/oficina-tanstack#479, src/setup/section-loaders.ts).

🤖 Generated with Claude Code

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions