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

An exception has been thrown during the rendering of a template ("Call to undefined function twig_get_attribute()"). #153

Closed
stovesy opened this issue Dec 18, 2023 · 2 comments

Comments

@stovesy
Copy link

stovesy commented Dec 18, 2023

After a recent composer/update, I'm getting the above error.

What steps will reproduce the problem?

{{ this.registerCssFile("@web/css/report.css") }}

What's expected?

No error

What do you get instead?

An exception has been thrown during the rendering of a template ("Call to undefined function twig_get_attribute()").

Additional info

Twig 3.9.0
Yii Framework 2 twig extension 2.4.2 September 04, 2022

Error is at line 54 of Template.php
return \twig_get_attribute($env, $source, $object, $item, $arguments, $type, $isDefinedTest, $ignoreStrictCheck);

@morten-thomassen
Copy link

This happened to me today. Downgrading twig has (temporarily) bypassed the issue:

composer require "twig/twig:3.8.0"

But obviously I would like to see a proper fix implemented

@diffy0712
Copy link
Contributor

@schmunk42 @samdark
I think #155 released in 2.4.3 already fixed this issue, and once released #154 in 2.5.0 will provide support for twig3.9 as well.
I think this issue is resolved.

BLaDZer added a commit to BLaDZer/blogger-synergy-2024 that referenced this issue Oct 14, 2024
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

4 participants