-
-
Notifications
You must be signed in to change notification settings - Fork 9.6k
Since Symfony 3.0.2, the twig->render method doesn't work with absolute path #17777
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
Comments
I started looking into this. My problem is there's no clear reference on what kind of paths should be supported by the TemplateNameParser from the FrameworkBundle. Some of the test cases in #15272 are inferred from the existing code (which might be wrong). |
I won't be able to look into this before the weekend. |
I'm seeing a regression where the latest 2.8.x-dev is no longer able to parse the following snippet, whereas 2.8.2 is. Possibly the same cause?
Edit: did some testing, can confirm that this was caused by the changes in #15272. The regular expression changed in that PR did not match |
@wesleylancel What error exactly do you experience? |
@xabbuh: I'll look up the exact error tomorrow but it says it can't the template in views/@FOSUserBundle or something. Before the PR it simply didn't parse it because the regexp didn't match and it was passed off to Twig, now it does but it can't actually get all the parts correctly so the TemplateReference contains incorrect data. |
@wesleylancel The list of affected versions of Symfony is listed in #17683. |
I'm looking into fixing this now. @wesleylancel I'd appreciate if you shared the stack trace |
…mplate paths (jakzal) This PR was merged into the 2.3 branch. Discussion ---------- [FrameworkBundle] Fix a regression in handling absolute template paths | Q | A | ------------- | --- | Bug fix? | yes | New feature? | no | BC breaks? | no | Deprecations? | no | Tests pass? | yes | Fixed tickets | #17777 #17683 | License | MIT | Doc PR | - Regression introduced by #15272. Commits ------- d8c493f [FrameworkBundle] Fix a regression in handling absolute and namespaced template paths
@francoispluchino in our workflow issues are closed as soon as a related PR is merged. There's no need to keep them open. Older branches are merged into newer ones on a regular basis. |
@jakzal Ok, thank you for the precisions! |
Indeed, only Symfony 2.3 was released recently. Don't worry though, 2.7-3.0 will be released soon and will include this fix. |
Environment:
Since Symfony 3.0.2, the Symfony\Component\Templating\EngineInterface::render method doesn't work with absolute path to the template file (Unable to find template error).
Step to reproduce (from sratch):
The text was updated successfully, but these errors were encountered: