Skip to content

Overriding templates from Sylius bundles does not work #9802

Closed
@bitbager

Description

Sylius version affected: 1.3.0

Description
Overriding templates from Sylius bundles does not work.

Steps to reproduce
After I create a file under templates/bundles/SyliusShopBundle/Homepage/index.html.twig path and I change the content to blank, I still get the Sylius vendor's homepage index template rendered. The weird thing is that overriding templates from Twig bundle (exceptions) works fine.

Possible Solution
I think this might have something to do with the old templates structure, custom namespaces or theme loader for Sylius bundles.

Tip
If I remove the core template from vendor, then the custom template from templates/bundles/Homepage/index.html.twig is loaded. It seems like the vendor has a higher priority than the app.
Might seem obvious, but the bug was detected on Sylius-Standard and replicated in the PluginSkeleton.

Metadata

Assignees

Labels

Potential BugPotential bugs or bugfixes, that needs to be reproduced.

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions