kfberkshire
Forum Replies Created
-
The proper fix will come when the author of the plugin or theme generating the error message releases a corrected version.
Meanwhile, one way of suppressing the error messages is, as said earlier in this thread, to set the Language in WordPress Settings to English (US). If this isn’t convenient another option is to add the following line to wp-config.php in the main WordPress directory.
define( ‘WP_DEBUG_DISPLAY’, false );
The config file will probably already have the line below in it. I had mine set to True whereas the standard setting is false:
define( ‘WP_DEBUG’, true );
…so add the new line near it to keep related configuration parameters together.
I must emphasise that this doesn’t fix the root cause of the problem but it does suppress the error messages on the screen.
Forum: Fixing WordPress
In reply to: There has been a critical error on this website.I’ve provided a fix for the problem described by rodney007. I’m not asking someone else to provide a fix for my problem – which is the same anyway? Are you saying that I shouldn’t post the fix here ?
Forum: Fixing WordPress
In reply to: There has been a critical error on this website.I’m new to this forum and not familiar with the rules. I don’t understand why you’re asking me to create a new topic.
rodney007 had a problem and asked for instructions on how to fix it.
I had exactly the same problem, explained the symptoms and provided instructions on what is wrong and how to fix it.
@threadi – Please explain why I need to create a new topic
Forum: Fixing WordPress
In reply to: There has been a critical error on this website.I had the same problem on my site which is running PHP 8.2.20
Can’t say how long the problem has been there but the site updated to WP 6.6 on 17 July and when I accessed the site yesterday on 20 July got the error message “There has been a critical error on this website. Please check your site admin email inbox for instructions".
Unfortunately I don’t have access to the PHP error log on my hosting site. I enabled logging in the WP config file wp-config.php?? using:
// Enable WP_DEBUG mode
define( 'WP_DEBUG', true );????? This is normally false
Added this definition:// Enable Debug logging to the /wp-content/debug.log file
define( 'WP_DEBUG_LOG', true );
I didn’t get a debug.log file created but when refreshing the site I got the error message:
Parse error: syntax error, unexpected character 0x00, expecting end of file in XXXXXXXXXXXX/www/wp/wp-admin/includes/theme.php on line 1259??? (site details replaced by XXX)
When I checked theme.php I found it was missing the PHP delimiter at the end. So I added a new line at the end with just:
?>
Now the site is working fine.
So in summary it appears to be due to a fault with the WordPress 6.6 file theme.php