Home > Mobile >  Difference in Twig Rendering between Local <-> Staging
Difference in Twig Rendering between Local <-> Staging

Time:10-24

We have a problem on a staging system which the same code, same composer.lock, composer install done, cache flushed.

I even activated FroshDevelopmentHelper on Staging and set it to ENV=dev to be able to see more debugging infos.

On Staging:

<!-- BLOCK BEGIN base_body_inner (custom/plugins/OurTheme/src/Resources/views/storefront/base.html.twig) -->

On Local (there the feature works):

<!-- BLOCK BEGIN base_body_inner (vendor/store.shopware.com/moorlfoundation/src/Resources/views/storefront/base.html.twig) 

We also ensure a consistent plugin loading order by setting the installed_at, but that is also the same order on both system

The database was also copied from Staging (just base URL changed after the local import) rebuilt storefront and admin.

Does anybody have a pointer what else could influcence the loading order or cause such a problem?

EDIT:

I added some debug code here:

vi vendor/shopware/core/Framework/Adapter/Twig/NamespaceHierarchy/BundleHierarchyBuilder.php  52

asort($extensions);
dd($extensions);  # added

This gives me different results on both systems.

Before Shopware loaded the templates according to installation date - now the XKCD Comic about breaking a workflow by a fix

Follow up: Set template priority for 3rd party plugins

See also: https://issues.shopware.com/issues/NEXT-23822

  • Related