Background of the issue:
I'm trying to understand why the list of menu items when I hover over the WPML sidebar in the admin doesn't show all the menu items any longer. We're on WordPress 6.8.1 and we're running the latest versions of the WPML plugin and extensions.
Symptoms:
A couple of menu items are no longer appearing when I hover over the WPML sidebar in the admin area. I expected to see all the menu items, but I only see a partial list.
Questions:
Why are some menu items missing from the WPML sidebar in the admin area?
How can I restore the missing menu items in the WPML sidebar?
Are you checking this using the user with an admin role? If yes, please try the following solution:
1. Copy the code snippet above and paste it into your theme's functions.php file.
function wpmlsupp_1706_reset_wpml_capabilities() {
if ( function_exists( 'icl_enable_capabilities' ) ) {
icl_enable_capabilities();
}
}
add_action( 'shutdown', 'wpmlsupp_1706_reset_wpml_capabilities' );
2. Navigate to any page on your WordPress site's front end. This will trigger the wpmlsupp_1706_reset_wpml_capabilities function.
3. After the page has loaded, remove the code from the functions.php file.
Please backup your database before making any changes.