• I am getting the “critical error” only when I click on “theme settings” at the top of the WP dashboard. I recently updated to WP 5.8, updated some plugins, and also updated some of my themes. I did not understand that updating my theme if I didn’t have a child theme (not sure if I do) could result in something like this.

    I checked my hosting provider and backups were not enabled. I just enabled them. But I can’t roll back to an earlier version of the site. The site still functions for users, but stuff like my Google Analytics isn’t working because I pasted the Google Tag Manager code into the header via that “theme settings” tab.

    I am fairly certain that this is the result of me updating the themes given that I only get this error when clicking on “theme settings”.

    From what I understand, even rolling back the update to the earlier version of the theme won’t help since my settings aren’t saved. Or maybe I have to do that and then I have to go through and put all my settings in again?

    There’s two problems: first is resolving the critical error. Second is trying to get my settings back and creating a child theme so this doesn’t happen.

    Is there any way for me to add my Google Analytics back without going to the header each page and inserting the code manually in the header?

    The page I need help with: [log in to see the link]

Viewing 3 replies - 1 through 3 (of 3 total)
  • Moderator Steven Stern (sterndata)

    (@sterndata)

    Volunteer Forum Moderator

    Errors like this are logged. Check the error log on your server. If you can’t find the log, please contact your host.

    Meantime, enable wp_debug and wp_debug_log and after an error, look at wp-content/debug.log to see if anything gets logged there. https://wordpress.org/support/article/debugging-in-wordpress/

    You can also try this: Please attempt to disable all plugins, and use one of the default (Twenty*) themes. If the problem goes away, enable them one by one to identify the source of your troubles.

    If you cannot access wp-admin, there are other ways to deactivate plugins.

    Moderator Steven Stern (sterndata)

    (@sterndata)

    Volunteer Forum Moderator

    I’m also thinking that if you can get into the database via PHPMYADMIN, look in the wp_options table for things that might have been entered in the theme settings. If you find a row that has the stuff you added that brought down that site, you might be able to edit or delete that row.

    Generally, dumping stuff like GA code into theme settings or directly into the header.php is “doing_it_wrong()”. Use a plugin to add GA to your site. My preference is “Google Site Kit”.

    Moderator Jan Dembowski

    (@jdembowski)

    Forum Moderator and Brute Squad

    @wtfboxing Please do not post duplicate topics, those are archived when found. I have archived your new topic.

Viewing 3 replies - 1 through 3 (of 3 total)

The topic ‘Critical Error When Clicking “Theme Settings”’ is closed to new replies.