You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
blocks: SeoPDPV2 from page.sections — jsonLDs [{}] placeholder and explicit noIndexing:false block deco-cx's SEO derivation #665
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):
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>.
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.
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).
Activity