Skip to content
Grav 2.1 is out: every page speaks Markdown. Read the announcement →

Server error Undefined array key 1

Solved by Natalia Bazilenco View solution

Started by Natalia Bazilenco 3 years ago · 1 replies · 538 views
3 years ago

Hello everyone, this is the second time this month that an error has appeared on my website:
Server Error
Sorry, something went terribly wrong!

0 - An exception has been thrown during the rendering of a template ("Undefined array key 1").
For further details please review your logs/ folder, or enable displaying of errors in your system configuration.

I'm using the Quark theme.

Plugins and system updated

What in logs ina admin panel:

CRITICAL An exception has been thrown during the rendering of a template ("Undefined array key 1").

In logs on hosting:

grav.CRITICAL: An exception has been thrown during the rendering of a template ("Undefined array key 1"). - Trace: #0 /vendor/twig/twig/src/Template.php(420): Twig\Template->displayWithErrorHandling(Array, Array) #1 /vendor/twig/twig/src/Environment.php(497) : eval()'d code(268): Twig\Template->display(Array) #2 /vendor/twig/twig/src/Template.php(214): TwigTemplate4119757e4b837b134251ac71bb4e36a01d4724759f2eedafd849fefef32419271225928728->block_item(Array, Array) #3

and etc
Any help please.

last edited 03/25/23 by Natalia Bazilenco
3 years ago Solution

The error was fixed by switching the version php. Was 7.3x Now enable 7.4x
Of course, it is not clear why the website stopped working with the minimum version. Before that everything was ok.

Suggested topics

Topic Participants Replies Views Activity
Support · by Marcel, 5 days ago
0 85 5 days ago
Support · by JakobDB, 6 days ago
1 91 6 days ago
Support · by ramenos, 7 days ago
3 103 6 days ago
Support · by gravinator, 2 weeks ago
3 229 7 days ago
Support · by Roger Parkinson, 2 weeks ago
3 308 2 weeks ago