Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Can't work overriding for symfony 4.3 templates/bundles #201

Closed
Pasuvan opened this issue Oct 4, 2019 · 2 comments · May be fixed by #202
Closed

Can't work overriding for symfony 4.3 templates/bundles #201

Pasuvan opened this issue Oct 4, 2019 · 2 comments · May be fixed by #202

Comments

@Pasuvan
Copy link

Pasuvan commented Oct 4, 2019

Hi, already I put the question for Symfony portal, Please can you check that below link
symfony/symfony#33845

@dpmR
Copy link

dpmR commented Oct 15, 2019

I am facing the same problem. After digging into the code I think I found the root of the problem.

if ('@' === $name[0]) {

=> $name contains 'views/@BundleName' instead of '@Bundle' so it does not jump into locateBundleResource

Also in

$bundleName = substr($name, 1);
the 'views/' part needs to be removed.

With this changes made I can set a new path_pattern which then works:

liip_theme:
  ...
  path_patterns:
    app_resource:
      - '%kernel.project_dir%/templates/themes/%%current_theme%%/%%template%%'
      - '%kernel.project_dir%/templates/themes/default/%%template%%'
    bundle_resource:
      - '%kernel.project_dir%/templates/themes/%%current_theme%%/bundles/%%bundle_name%%/%%template%%'
      - '%kernel.project_dir%/templates/themes/default/bundles/%%bundle_name%%/%%template%%'

@Pasuvan
Copy link
Author

Pasuvan commented Oct 16, 2019

Thanks @dpmR it's worked

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants