Undefined variable $context on Twig


today i updated project from 3.6.13 to 3.6.16 after that site break with errors:

Anyone have any idea where the problem is?

I also have this problem all over the place today after updating.

There is a related post about this: Compatibility Issue When Updating to Twig v3.9 - #17 by daft

Twig made some significant changes in their latest v3 release today.

edit: Found how to reproduce it, use a partial inside a put:

{% put scripts %}
    {% partial 'site/how-its-made' %}
{% endput %}

edit 2: There is a fix for this issue coming in v3.6.17


@daft thanks 3.6.17 works fine!

1 Like

Thanks for the swift fix, working now with 3.6.17 :slight_smile:

1 Like