Resolving Shopware 6.7 SEO URL Generation Issues for Variant Products

Resolving Shopware 6.7 SEO URL Generation Issues for Variant Products

A recent discussion on the Shopware forum brought to light a critical issue faced by merchants and developers after updating their Shopware stores from version 6.6.x.x to 6.7.x.x: the inability to generate SEO-friendly URLs for newly created variant products. This problem resulted in generic /detail/[ID] fallback URLs, significantly impacting search engine visibility and user experience.

The original poster, Pseiko01, described the situation where only new articles with variants were affected, displaying the message "Es sind noch keine SEO-URLs vorhanden" (No SEO URLs available). Interestingly, existing variant articles and non-variant products continued to function normally. Initial troubleshooting attempts, including disabling a third-party SEO plugin, did not resolve the issue, leading to confusion about its root cause.

The community quickly engaged, with matthiasewald suggesting checks for duplicate URLs (a common cause for URL generation failures) and recommending a full run of the SEO indexer with log monitoring. However, the most comprehensive and ultimately successful diagnosis came from Luctech, who clarified that the problem was a known issue related to Shopware's internal SEO-URL-Indexer, specifically after the Shopware 6.7 update.

Luctech explained that Shopware 6.7 introduced changes in how variant URLs are generated. Consequently, for newly created variant articles, the SEO index was not being automatically populated, leading to the observed empty SEO URL fields. Old articles, by contrast, retained their existing entries in the seo_url database table, explaining why they were unaffected.

To address this, Luctech provided a detailed, step-by-step troubleshooting guide:

  • 1. Rebuild the SEO Index via Backend: Navigate to Settings → System → Caches & Indizes and click "Indizes aktualisieren" (Update Indexes). This can resolve the issue for some installations.
  • 2. Force Index Reconstruction via CLI: For a more robust solution, especially after major updates, access your Shopware root directory via SSH and execute the command:
    php bin/console dal:refresh:index
  • 3. Verify SEO Template Configuration: This step proved to be the crucial one for Pseiko01. Go to Settings → Shop → SEO and inspect the template for product detail pages. After a 6.7 update, template variables might become invalid. It's essential to ensure the template includes the product number to guarantee unique URLs for variants. The recommended template structure is:
    {{ product.translated.name }}/{{ product.productNumber }}
    The productNumber ensures that each variant gets a distinct and valid URL. The original poster found their template only contained {{ product.translated.name }}.
  • 4. Manually Save Affected Variants: After rebuilding the index and verifying the template, open any problematic variant article in the administration panel and save it. This action can manually trigger the URL generation process for that specific product.

Pseiko01 confirmed that adjusting the SEO template (Point 3 from Luctech's advice) by adding /{{ product.productNumber }} resolved their issue, allowing SEO URLs for variant products to be generated correctly once again. This thread serves as an invaluable resource for anyone encountering similar SEO URL generation problems after a Shopware 6.7 upgrade, highlighting the importance of correct SEO template configuration for variant products.

Start with the tools

Explore migration tools

See options, compare methods, and pick the path that fits your store.

Explore migration tools