This thread is resolved. Here is a description of the problem and solution.
Problem:
The client was getting this error when she tried to go to Appearance > Menus, after she changed the default language on the site:
"There has been a critical error on this website. Please check your site admin email inbox for instructions."
Solution:
That is a general error message and we can't know what is causing the error until we don't dig a bit deeper.
In this situation, we were able to find out (after following the steps we are sharing below) that the fatal error was caused by a different plugin (https://wpml.org/forums/topic/errors-when-changing-the-default-language-within-wpml/#post-14308629).
Let us share the steps that we can use to find out more about what is the actual error when we see a general error message like that one.
We can enable the WordPress debug log and recreate the issue to see if we are getting a longer error message that is more specific.
This will allow us to see if any PHP errors are being produced.
In order to do that, we can edit the wp-config.php file inside our WordPress directory and insert the following lines:
define( 'WP_DEBUG', true ); define( 'WP_DEBUG_LOG', true ); define( 'WP_DEBUG_DISPLAY', false );
Now, we can try to reproduce the issue once again.
We should now be able to locate the debug log in: /wp-content/debug.log
Paste the content (if any) on a site like pastebin.com and then share the link with our supporters in your existing ticket (only you and us will see the URL you are sharing, it is automatically hidden for anyone else).
Relevant Documentation:
https://codex.wordpress.org/Debugging_in_WordPress
This is the technical support forum for WPML - the multilingual WordPress plugin.
Everyone can read, but only WPML clients can post here. WPML team is replying on the forum 6 days per week, 22 hours per day.
This topic contains 19 replies, has 3 voices.
Last updated by 1 year, 7 months ago.
Assisted by: Mihai Apetrei.