Skip Navigation

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.

Tagged: 

This topic contains 19 replies, has 3 voices.

Last updated by kevinD-38 1 year, 7 months ago.

Assisted by: Mihai Apetrei.

Author Posts
August 30, 2023 at 11:45 am #14312925

marthaZ

Good morning Mihai, the menu switcher is still not working. I tested de site without any other plugin than WPML and I still have the same problem.

August 30, 2023 at 1:20 pm #14314145

marthaZ

Mihai, something interesting I found is that I can add the switcher to the bottom of my site but not to the navigation. Unfortunately I don’t have a way to share with you the debug information from WPML Support plugin so I have added it as a PDF and you can see it: hidden link

August 30, 2023 at 5:30 pm #14315469

Mihai Apetrei
WPML Supporter since 03/2018

Languages: English (English )

Timezone: Europe/Bucharest (GMT+03:00)

Hi there.

Sorry, my shift ended last time.

I'm back now.

I would like to request temporary access (wp-admin and FTP) to your site to take a better look at the issue. You will find the needed fields for this below the comment area when you log in to leave your next reply. The information you will enter is private which means only you and I can see and have access to it.

Our Debugging Procedures

I will be checking various settings in the backend to see if the issue can be resolved. Although I won't be making changes that affect the live site, it is still good practice to backup the site before providing us access. In the event that we do need to debug the site further, I will duplicate the site and work in a separate, local development environment to avoid affecting the live site.

Privacy and Security Policy

We have strict policies regarding privacy and access to your information. Please see:
https://wpml.org/purchase/support-policy/privacy-and-security-when-providing-debug-information-for-support/

**IMPORTANT**

- Please make a backup of the site files and database before providing us access.

- If you do not see the wp-admin/FTP fields this means your post & website login details will be made PUBLIC. DO NOT post your website details unless you see the required wp-admin/FTP fields. If you do not, please ask me to enable the private box.

The private box looks like this: hidden link

I will be waiting for your response.

Mihai

August 31, 2023 at 12:46 pm #14320661

marthaZ

Mihai, I tried to add the menu again this morning and it worked. I am not sure if you did something, but if you did, I really thank you a million!

September 5, 2023 at 10:26 pm #14347747

kevinD-38

I am having a similar issue. Please help! I disabled all plugins and under WPML/Languages I cannot use the Menu language switcher to create a new menu. When I go to choose a menu at the very top it won't let me actually select. It just stays on Choose a menu. Please advise.