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

Error when including twig files without absolute links #137

Open
HJPoyntz opened this issue Jul 28, 2022 · 1 comment
Open

Error when including twig files without absolute links #137

HJPoyntz opened this issue Jul 28, 2022 · 1 comment

Comments

@HJPoyntz
Copy link

What steps will reproduce the problem?

Screenshot 2022-07-28 at 15 17 35

With the following file structure.
If I inside of masterTwig.twig include twig-test/A.twig.
Then, inside of A.twig, I reference B.twig with a relative path {% include "B.twig" %}.

What's expected?

This should give me the content of B.twig.
It should also looking inside of the folder twigTest, however it looks in the folder twigContainer

What do you get instead?

The error message that is thrown is:

`Unable to find template "B.twig"(looked into: twigContainer)

Additional info

Q A
Yii version 2.0
Yii Twig version 2.4
Twig version
PHP version 8.1
Operating system MacOS
@developedsoftware
Copy link

I think this is solved by the proposed solution #128

Perhaps you should post this issue here instead as I think this is a twig issue and not yii's implentation of twig (i might be wrong) ?

https://github.com/twigphp/Twig/issues

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

No branches or pull requests

2 participants