• 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`

Viewing 2 replies - 1 through 2 (of 2 total)
  • Moderator t-p

    (@t-p)

    Your theme sirt seems to be the error.

    Access your server via SFTP or FTP, or a file manager in your hosting account’s control panel (consult your hosting provider’s documentation for specifics on these), navigate to /wp-content/themes/ and rename or delete the directory of your currently active theme. That will force your site to use the default theme (Twenty Twenty-one, etc.).

    If that resolves the issue, next report the issue at that theme’s support forum.

    Thread Starter adrian347

    (@adrian347)

    @t-p Thank you for your response. As noted in my original post, I’ve confirmed that the issue lies somewhere with the custom theme’s files. Per your suggestion I have attempted to follow up with the author of the theme, and will update this thread when I hear back from them.

    Is there no workaround for this in the meantime? Simply reverting to a default theme is not possible, as my organization is part of a larger network that needs the customization provided by our theme for stylistic consistency.

    • This reply was modified 2 years, 8 months ago by adrian347. Reason: formatting
Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Publishing new pages gives “critical error”’ is closed to new replies.