Troubleshooting
Almost every “the plugin doesn’t work” report turns out to be one of the items on this page. Walk it top to bottom.
The page renders without any layout (blank or default)
Section titled “The page renders without any layout (blank or default)”Cause: the category, product or landing page has no base layout assigned.
The plugin is a replacement layer — it replaces an existing layout. It does not pick one from nothing. If the underlying entity has no layout assignment, there is nothing to replace and Shopware has nothing to render.
Fix: assign a base layout the normal Shopware way:
- Category → open the category → CMS page picker.
- Product → open the product → Layout tab.
- Landing page → open the landing page → CMS page picker (or set a Default landing page layout).
The alternative layout doesn’t appear
Section titled “The alternative layout doesn’t appear”Walk the checks in this order:
1. Is the rule actually attached to the alternative layout?
Section titled “1. Is the rule actually attached to the alternative layout?”Open the layout in Shopping Experiences → Layout assignment → Assign layout → Rules tab. The rule should be in the list. If the modal has no Rules tab at all, the plugin’s admin bundle hasn’t loaded — clear cache and hard-reload.
2. Does the rule contain unsupported conditions?
Section titled “2. Does the rule contain unsupported conditions?”Look at the Status column in the Rules tab:
- ✓ All supported — good.
- ⚠ Partially supported — unsupported conditions are skipped silently; double-check the supported ones still produce the match you want.
- ✗ None supported — the rule cannot match. The layout will never be picked.
See Custom rule conditions for the supported list.
3. Is Is homepage in an AND with Sales Channel?
Section titled “3. Is Is homepage in an AND with Sales Channel?”The most common configuration mistake. The combination matches only on the channel’s root navigation. For listings and other category pages, the rule does not match.
Fix: see the multi-sales-channel pitfall. Usually: drop Is homepage and use just Sales Channel.
4. Is the replacement mode allowing the swap?
Section titled “4. Is the replacement mode allowing the swap?”Open Settings → Extensions → Advanced Layouts Assigner, pick the affected sales channel, and check the mode:
- Category page → if set to With default layout but the category uses a custom layout, the plugin will not act. Switch to All or add the custom layout to Replaceable layouts.
- Product page → if set to Without assigned layout but the product has a specific layout, the plugin will not act. Switch to All or to one of the other modes.
- Landing page → if set to With default layout but the landing page uses a custom layout, the plugin will not act. Switch to All or extend the allow-list.
See Replacement modes.
5. Are the replacement types empty for the base’s kind?
Section titled “5. Are the replacement types empty for the base’s kind?”In the Replacement types card, check the row matching the base layout’s type (not the alternative’s). If the row is empty, the plugin doesn’t look up alternatives for that kind. Add the alternative’s type to that row.
Example: base is a Listing page (type product_list), alternative is a Landing page (landingpage). The Listing page row must list Landing page.
See Replacement types.
6. Are you over the 500-layout cap?
Section titled “6. Are you over the 500-layout cap?”The plugin evaluates at most 500 rule-bound layouts per request (LIMIT_TOTAL in PageLoadedSubscriber). If you have more, layouts past the cap (in rule.priority ASC order) are skipped. Lower the priority value on the rules that should win first.
See Performance.
The alternative shows on too many pages
Section titled “The alternative shows on too many pages”Cause: the rule is too broad. Likely culprits:
- A rule with only
Always validwill match every page. - A rule with no conditions at all (or only unsupported ones) is treated as ✗ unsupported and skipped — but a partially-supported rule may match more broadly than you think because the unsupported conditions are silently dropped.
Fix: add a Sales Channel condition. Add an Is homepage condition if you really do want homepage-only. Inspect the Status column in the Layout assignment modal.
The wrong alternative shows
Section titled “The wrong alternative shows”Cause: multiple layouts match for this request, and the wrong one wins.
The matcher picks the first match in rule.priority ASC order. Lower priority wins first.
Fix: set the desired layout’s rule to a lower priority value than its competitors (Settings → Rules → Edit rule → Priority).
The Rules tab is missing from the Layout assignment modal
Section titled “The Rules tab is missing from the Layout assignment modal”The plugin’s admin bundle didn’t load.
Fixes:
- Confirm the plugin is activated under Extensions → My extensions.
- Clear the admin cache:
bin/console cache:clear. - Hard-reload the admin (Ctrl+Shift+R) to drop the cached JS.
- If you self-build administration, rerun
bin/build-administration.sh. - Check that your user role has access to the new ACL keys.
The three custom rule conditions don’t appear in the rule builder
Section titled “The three custom rule conditions don’t appear in the rule builder”Same fix as above — the admin bundle didn’t load. Conditions are registered at admin runtime.
Replacement works in the storefront but not in the CMS navigation widget XHR
Section titled “Replacement works in the storefront but not in the CMS navigation widget XHR”This widget XHR has its own check (onCategoryEntityLoaded) gated on the replacement mode. If your Category page mode is With default layout and the category uses a custom layout, the widget XHR won’t be touched either. See 5. Are the replacement types empty and 6. Is the replacement mode allowing above.
After changing replacement modes, nothing changed on the storefront
Section titled “After changing replacement modes, nothing changed on the storefront”Clear the storefront cache: bin/console cache:clear (and possibly your HTTP cache / Varnish). The plugin’s settings are read via Shopware’s SystemConfigService, which is cached per request — a stale page in HTTP cache will outlive a settings change.
Related
Section titled “Related”- How it works — the model. Re-read this first if checks 1–5 above leave you stumped.
- Multi-sales-channel recipe — the canonical setup with the most common pitfall called out.
- Replacement flow internals — for plugin developers debugging behaviour.