Skip to content
Grav 2.0 is officially stable. Read the announcement →

Community guidelines

Please keep discussions civil and on-topic. Repeated violations may lead to a temporary ban.

Support

Old Grav installation crashes on startup, how to update?

Solved by Karmalakas View solution

Started by Thomas Green 3 years ago · 4 replies · 376 views
3 years ago

Returning to a Grav site I last used in 2019 I get this error: Whoops \ Exception \ ErrorException (E_DEPRECATED)
Unparenthesized a ? b : c ? d : e is deprecated. Use either (a ? b : c) ? d : e or a ? b : (c ? d : e)

The error report says the offence is in /home/tgworksh/public_html/grav6/vendor/twig/twig/src/Node/Node.php

Looks like I need to update Grav. But the update system is only available after logging in, and I can't log in because of the error.

How should I proceed?

3 years ago Solution

First of all, backup your grav6 folder.
Download Grav and upload the contents to that grav6 without the user folder (user folder contains all your themes, plugins and settings, so try keeping the original contents)
Most likely your old theme will also not work, because of the changes in newer Grav version. If that will be the case, you can try the second option from this post:

Or you can add the following settings to system.yaml to disable auto-escaping:

YAML
twig:
autoescape: false
strict_mode:
twig_compat: true
3 years ago

@ThosGreen,

Success.

Would you mind sharing what exactly solved your issue? Installing a fresh Grav, or updating the Twig compatibility settings?

last edited 05/07/23 by pamtbaau
3 years ago

I installed a fresh Grav and renamed the 'user' folder to 'userX'. Then I copied the user folder over from the non-working version, and all went well. To my relief.

👍 1

Suggested topics

Topic Participants Replies Views Activity
Support · by Thomas, 1 week ago
2 53 10 hours ago
Support · by Anna, 3 days ago
2 60 13 hours ago
Support · by Justin Young, 14 hours ago
1 30 14 hours ago
Support · by Duc , 1 week ago
2 65 5 days ago
Support · by Colin Hume, 1 week ago
2 56 5 days ago