View Issue Details

IDProjectCategoryView StatusLast Update
0007774OXID eShop (all versions)8. --- Twig engine ---public2025-03-05 08:41
ReporterOxidSimonGassenschmidt Assigned To 
PrioritynormalSeverityminorReproducibilityalways
Status closedResolutionwon't fix 
Product Version7.1.0 
Summary0007774: Subfolder with Shop-ID for templating
DescriptionIn Smarty (tested in 6.5) and Twig child themes (tested in 7.1 and 7.2 with apex), you can use subfolders with the ID of the desired store to have different templates for subshops.

You cannot use this structure in a theme that is not a child theme.

As soon those folder existes the chain for this subshop is broken, so even if you have a working child-theme, if in parent theme those folder existes error is present.
Steps To Reproducehave apex theme or own theme
create in folder 2/tpl/layout/header.html.twig a file or copy it from apex.
create a subshop and have the subshop and theme active there
open frontend of this subshop

you will have a not working theme.
Additional Information[2025-02-24 15:08:28] OXID Logger.ERROR: Template "page/shop/start" nicht gefunden ["[object] (OxidEsales\\Twig\\Resolver\\TemplateChain\\TemplateNotInChainException(code: 0): Error building inheritance chain for the template `@__main__/page/shop/start.html.twig`. at /var/www/oxideshop/vendor/oxid-esales/twig-component/src/Resolver/TemplateChain/TemplateChainValidator.php:21)\n[stacktrace]\n#0 /var/www/oxideshop/vendor/oxid-esales/twig-component/src/Resolver/TemplateChain/TemplateChainBuilderAggregate.php(38): OxidEsales\\Twig\\Resolver\\TemplateChain\\TemplateChainValidator->validateTemplateChain(Object(OxidEsales\\Twig\\Resolver\\TemplateChain\\DataObject\\TemplateChain), Object(OxidEsales\\Twig\\Resolver\\TemplateChain\\TemplateType\\DataObject\\ShopTemplateType))\n#1 /var/www/oxideshop/vendor/oxid-esales/twig-component/src/Resolver/TemplateChain/TemplateChainResolver.php(35): OxidEsales\\Twig\\Resolver\\TemplateChain\\TemplateChainBuilderAggregate->getChain(Object(OxidEsales\\Twig\\Resolver\\TemplateChain\\TemplateType\\DataObject\\ShopTemplateType))\n#2 /var/www/oxideshop/vendor/oxid-esales/twig-component/src/TwigEngine.php(44): OxidEsales\\Twig\\Resolver\\TemplateChain\\TemplateChainResolver->getLastChild('page/shop/start...')\n#3 /var/www/oxideshop/vendor/oxid-esales/oxideshop-ce/source/Internal/Framework/Templating/TemplateRenderer.php(28): OxidEsales\\Twig\\TwigEngine->render('page/shop/start...', Array)\n#4 /var/www/oxideshop/vendor/oxid-esales/oxideshop-ce/source/Core/ShopControl.php(435): OxidEsales\\EshopCommunity\\Internal\\Framework\\Templating\\TemplateRenderer->renderTemplate('page/shop/start...', Array)\n#5 /var/www/oxideshop/vendor/oxid-esales/oxideshop-ee/Core/ShopControl.php(204): OxidEsales\\EshopCommunity\\Core\\ShopControl->render(Object(OxidEsales\\Eshop\\Application\\Controller\\StartController))\n#6 /var/www/oxideshop/vendor/oxid-esales/oxideshop-ce/source/Core/ShopControl.php(316): OxidEsales\\EshopEnterprise\\Core\\ShopControl->render(Object(OxidEsales\\Eshop\\Application\\Controller\\StartController))\n#7 /var/www/oxideshop/vendor/oxid-esales/oxideshop-ee/Core/ShopControl.php(91): OxidEsales\\EshopCommunity\\Core\\ShopControl->formOutput(Object(OxidEsales\\Eshop\\Application\\Controller\\StartController))\n#8 /var/www/oxideshop/vendor/oxid-esales/oxideshop-ce/source/Core/ShopControl.php(240): OxidEsales\\EshopEnterprise\\Core\\ShopControl->formOutput(Object(OxidEsales\\Eshop\\Application\\Controller\\StartController))\n#9 /var/www/oxideshop/vendor/oxid-esales/oxideshop-ce/source/Core/ShopControl.php(123): OxidEsales\\EshopCommunity\\Core\\ShopControl->process('OxidEsales\\\\Esho...', NULL, NULL, NULL)\n#10 /var/www/oxideshop/vendor/oxid-esales/oxideshop-ce/source/Core/Oxid.php(27): OxidEsales\\EshopCommunity\\Core\\ShopControl->start()\n#11 /var/www/oxideshop/source/index.php(16): OxidEsales\\EshopCommunity\\Core\\Oxid::run()\n#12 /var/www/oxideshop/source/oxseo.php(29): require('/var/www/oxides...')\n#13 {main}\n"] []
TagsNo tags attached.
ThemeNot defined
BrowserNot defined
PHP VersionNot defined
Database VersionNot defined

Activities

SvenBrunk

2025-03-05 08:40

administrator   ~0017845

Last edited: 2025-03-05 08:41

Child themes in the described way are no longer supported as of OXID 7 and the twig template engine in general. See documentation (https://docs.oxid-esales.com/developer/en/latest/development/modules_components_themes/theme/child_theme.html)