I just updated my recent project from 3.5.0 to 3.6.11 from the admin platform (Settings → System Updates → Check for Updates → Update).
It was successful, but when I opened the frontend, I faced the following error: An exception has been thrown during the rendering of a template (“Call to undefined function twig_get_attribute()”).
If I change to this.site.locale, still have a probleme. Event if I remove this part of code. Then the following part when I use twig, I face the issue:
I’m having exactly the same problem when updating a project from 3.5.14 to 3.6.13. I already did what you suggested (remove vendor and run composer update again) and I keep having the same problem, Call to undefined function twig_get_attribute(). I tried executing composer clear-cache. I even deleted ALL the files in the project, downloaded again from the repo, and executed composer update, and it keeps giving the same error. What can I do?
Twig v3.9 appears to be a significant departure from Twig v3.8. There are some issues with placeholder usage in October CMS v3.6.14.
It looks like Symfony attempted to avoid including breaking changes, but since October is heavily coupled with Twig’s internals, this is unavoidable.
As a result, we’ve released another patch, v3.6.17, which effectively drops support for Twig v3.8. The suggested workaround fix (above) will break the installation moving forward, so please remove it from your composer file when updating to v3.6.17.
composer rem twig/twig
We apologise for this circumstance. Unfortunately, it is outside our control and trying to include backward compatibility support for Twig v3.8 is too complex beyond reason.
In Summary:
For October CMS v3.5 and below, use Twig v3.8
For October CMS v3.6 or above, use Twig v3.9 onwards
After running the command above, I got the following error: Removal failed, twig/twig is still present, it may be required by another package. See composer why twig/twig.
october/rain 3.x-dev requires twig/twig (~3.0)
symfony/http-kernel 6.0.x-dev conflicts twig/twig (<2.13)