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:
{% set recaptchaUrl = newsletter.recaptchaUrl %}
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:
{% set recaptchaUrl = newsletter.recaptchaUrl %}
We have discussed this in Discord, and it does not appear to be anything related to October CMS.
PHP reports an error about a missing file (and function) when the file exists…
One way to repair your installation when vendor libraries are corrupt:
Rename ~/vendor
to ~/vendor2
Delete the ~/.composer.lock
file
Run composer update
in the command line
If it works, delete the vendor2
directory
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?
Same thing for me and I have a large site down as a result. This is a significant problem now.
Downgrading twig to 3.8.0 worked for me!
composer req twig/twig:3.8.0
I had to do this too, I have the same error, and only the downgrade resolved it.
@marco.grueter i had this same issue, the downgrade solve it for now. Thank You!
@daft for when a update on this ? Thank you!
Oh no, @ngyzsolt, you tried to warn us!
It looks like a breaking change coming from Twig - this has been patched in v3.6.14.
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
@kallef @azvm @axomat @marco.grueter @Maria_UtopigStudio @renick @ngyzsolt
Great, thank you! Updated my project, removed twig which upgraded it to 3.9.0 and everything works fine on v3.6.16.
is this supposed to be fixed in v3.6.16? i get the error “Undefined variable $context” in several cases.
btw. I’m using v3.6.16
that looks good. You can then ignore the email
Thank you for the ultrafast reaction!
Hi, If I symple press Update to 3.6.17 in Backend, the error is dissapearing.
Is it necessary to run composer rem twig/twig?
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)
Thank you,
Zs
This is only neccessary if you applied the, very temporary, workaround and downgraded the twig version to 3.8.0. Twig will be downloaded as a dependency for ocms, no need to request it separatly or remove it.
I also had the temporary Twig 3.8 workaround.
Can confirm that removing Twig 3.8 as dependency from composer + a regular update to October 3.6.17 fixed the issue.
Thx for the quick fix here!