getgrav / grav

Modern, Crazy Fast, Ridiculously Easy and Amazingly Powerful Flat-File CMS powered by PHP, Markdown, Twig, and Symfony
https://getgrav.org
MIT License
14.58k stars 1.41k forks source link

The "Grav/Common/Twig/TwigExtension" extension is not enabled. #3317

Closed rodrigogiraoserrao closed 3 years ago

rodrigogiraoserrao commented 3 years ago

Today I updated grav to 1.7.12 from something like 1.7.6 (or above) plus a couple of plugins.

Suddenly, some pages of my website broke, showing a runtime error saying

The "Grav/Common/Twig/TwigExtension" extension is not enabled.

These seemed to be pointing at my usages of the markdown twig tag, which had been working flawlessly up until that point.

Anyone know what might be happening?

The error seems to say I need to enable something, so did the update disable something I don't even remember turning on in the first place?

NotBlind57 commented 3 years ago

I'm having a similar problem, updated from 1.7.11, alongside with Admin panel and Problems plugins. And "Languages" settings in site configuration are behaving like I haven't changed them to suit my needs, preventing me from changing the website language with the Language Selector plugin.

rodrigogiraoserrao commented 3 years ago

Currently the error I am getting can be seen by taking a look at mathspp.com/test3317.

I created a basic twig template that makes use of the {% markdown %} tag here; in particular, take a look at lines 32-34.

And I used it to create a basic page with a single line of content: github.com/mathspp/mathspp/blob/master/pages/test3317/test.en.md

I also tried moving that template to the base Quark theme but it didn't change the error.

mahagr commented 3 years ago

This line needs to be changed to fix the issue: https://github.com/getgrav/grav/commit/5efe4478616b4fcb25b8156f42d869c7bd0803b4#diff-39b977d3fadf2937b839a5283945310caf210ea4042c968507f0a53d427e578cR50

rodrigogiraoserrao commented 3 years ago

This line needs to be changed to fix the issue: 5efe447#diff-39b977d3fadf2937b839a5283945310caf210ea4042c968507f0a53d427e578cR50

Thanks for the prompt fix. Just to be sure, to fix this issue now, I just need to do the change on the highlighted line, not the whole diff?

mahagr commented 3 years ago

Just the highlighted line. Everything else was just comments or tests.