Skip to content
● Meet Grav Guard: keep every Grav site you run secure and up to date, all from one place. Free for up to 3 sites. Read more →

Upgrade to 2.0 -> "Unknown "urlencode" function in "partials/base.html.twig"

Solved by pamtbaau View solution

Started by Roger Parkinson 3 months ago · 3 replies · 703 views
3 months ago

I upgraded from 1.73 to 2 and the first thing I saw was this error message.

Is urlencode no longer available?

3 months ago Solution

I don't think Twig filter urlencode has ever been available, but url_encode is...

Maybe you never noticed that urlencode didn't exist, because in the Grav 1.7.x era, Twig errors were happily silenced.

Btw. Grav 2.x (using Twig 3) now shows a proper error when using urlencode and suggests you might mean use url_encode instead.

last edited 08/31/26 by pamtbaau
3 months ago

If your issue has been solved, then please mark the post that lead to the solution as "solved" by ticking the "Solution" icon in the lower right corner of that post. By doing so, others will know what solved the issue.

Thanks.

last edited 09/04/26 by pamtbaau

Suggested topics

Topic Participants Replies Views Activity
Support · by TomW, 2 weeks ago
8 225 8 hours ago
Support · by alex, 2 months ago
8 666 22 hours ago
Support · by Supple, 5 days ago
1 97 1 day ago
Support · by TomW, 1 week ago
3 158 3 days ago
Support · by TomW, 6 days ago
2 105 5 days ago