[Resolved] When I go into wpml setting, the page crashes
This thread is resolved. Here is a description of the problem and solution.
Problem: If you're experiencing a crash when accessing the WPML settings in the backend of your WordPress site, accompanied by a critical error message and PHP Fatal errors indicating issues with user capabilities or roles, this might be due to custom roles lacking necessary capabilities. Solution: 1. Temporarily disable any non-essential plugins to simplify troubleshooting. 2. Navigate to Users->Roles & Capabilities. 3. Check for roles that have no capabilities. You can either delete these roles or assign at least one capability to them. 4. Re-enable the plugins once the issue is resolved.
If this solution does not resolve your issue or seems outdated, we recommend checking related known issues at https://wpml.org/known-issues/, verifying the version of the permanent fix, and confirming that you have installed the latest versions of themes and plugins. If problems persist, please open a new support ticket.
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.
Background of the issue:
I was trying to edit the WPML settings in the backend of my WordPress site.
Symptoms:
When I go into the WPML settings, the page crashes and I receive the error message: 'There has been a critical error on this website. Please check your site admin email inbox for instructions. If you continue to have problems, please try the support forums.'
1) Can you please create a staging site and try next:
- Make sure you have a backup.
- Disable all other plugins and leave active only WPML plugins
- Switch to WP default theme
- Check if the issue still happens.
2) To allow us to see if any PHP errors are being produced, please provide the WordPress debug.log. More Info: https://wordpress.org/support/article/debugging-in-wordpress/
To enable debug.log, open your wp-config.php file and look for:
define('WP_DEBUG', false);
And change it to:
define('WP_DEBUG', true);
// Enable Debug logging to the /wp-content/debug.log file
define('WP_DEBUG_LOG', true);
Then try to reproduce the issue and check if any errors were saved to the debug.log log file inside the “.../wp-content/” directory.
If you get the message as you said: "There has been a critical error on this website. Please check your site admin email inbox for instructions" then there must be something written in the log.
Please share website admin and FTP access so I can check further.
Please make sure to create a backup, and if possible share staging site access.
I can not even visit your homepage, there is an error, please check.
As I can see from the error message, your report seems to be related to missing user capabilities and the plugin you are using. I suggest disabling this plugin, creating a new admin role and checking if it works then fine.
Anyway, the issue is related to your custom roles that have no capabilities.
1. Go to Users->Roles & Capabilities
2. Locate the roles with no capabilities and either delete them or at minimum give them 1 capability.
Note I have disabled all other plugins and using WP default theme, so it is easier and faster to work on you website. You can enable them back once you confirm issue is gone.