Publishing new pages gives “critical error”
-
I’m trying to publish a few new pages for an organization’s site but every time I go to publish them, it results in the “There has been a critical error on this website.” message. I’ve done some troubleshooting and I’m pretty sure it’s an issue with the custom theme, since reverting to a default theme fixes the problem. I’ve tried checking PHP version compatibility but the site is running PHP 7.4.3 and the compatibility checker only checks up to 7.3. I also tried raising PHP memory limit, increasing recursion and backtrack limits, and clearing the cache – no change.
I turned on debugging and got a few notices but I’m not sure what to do with them, my experience with backend is limited and I don’t want to start fiddling with library files that could break the site. I’ll paste the messages below for reference. Any insight on what exactly is happening here, and any suggestions for fixes, are greatly appreciated.
Debug Log Messages
[15-Mar-2022 17:46:04 UTC] PHP Notice: add_theme_support( ‘post-formats’ ) was called incorrectly. You need to pass an array of post formats. Please see Debugging in WordPress for more information. (This message was added in version 5.6.0.) in /www/sirtcentre.com/core/wp-includes/functions.php on line 5768[15-Mar-2022 17:46:04 UTC] PHP Deprecated: array_key_exists(): Using array_key_exists() on objects is deprecated. Use isset() or property_exists() instead in /www/sirtcentre.com/drive/themes/sirt/lib/timber/vendor/twig/twig/lib/Twig/Template.php on line 421
[15-Mar-2022 17:46:40 UTC] PHP Fatal error: Uncaught Twig_Error_Syntax: Unexpected tag name “function” (expecting closing tag for the “block” tag defined near line 4) in “page.twig” at line 13 in /www/sirtcentre.com/drive/themes/sirt/lib/timber/vendor/twig/twig/lib/Twig/Parser.php:174`
- The topic ‘Publishing new pages gives “critical error”’ is closed to new replies.