Skip to content

TanStack migration: Commerce Seo sections in SKIP_RESOLVE_TYPES cause generic page titles #425

Description

@JonasJesus42

Problem

After migrating from Deco Fresh to TanStack Start, PDP and catch-all routes render with generic page titles instead of product-specific SEO metadata.

Root cause: the Commerce Seo block type is listed in SKIP_RESOLVE_TYPES, so the section resolver skips it and returns no data. The page title falls back to a generic default.

Symptoms

  • Product pages show a generic site title instead of the product name.
  • document.title does not change on SPA navigation to PDP routes.
  • og:title and meta description tags are empty or generic.

Fix pattern

Replace the Seo commerce block with a site section that has its own server loader:

  1. Create a site section (e.g. SeoSection) that accepts title and description as CMS props.
  2. Add a loader to the section that returns { title, description } fetched from the product context.
  3. Register the new section in both sections.gen.ts AND section-loaders.ts.
  4. Remove the Commerce Seo block from SKIP_RESOLVE_TYPES or ensure it is resolved via the new section.

Without registering in BOTH files, the section either fails to load or its loader never runs.

Reference

See PR #12 in the site repo for a working implementation of this pattern.

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