[Resolved] I can't find WPML -> Translation management
This thread is resolved. Here is a description of the problem and solution.
Problem: The client is unable to access the Translation Management feature in WPML, encountering a 404 error at /wp-admin/tm/menu/main.php and an access error at /wp-admin/admin.php?page=tm%2Fmenu%2Fmain.php. This issue is likely due to missing WPML capabilities in the user roles. Solution: 1. Verify and restore the necessary WPML capabilities to the admin user roles. This can be done by checking the user capabilities in the wp_usermeta table and ensuring they include WPML specific capabilities. If they are missing, update the capabilities using the following code snippet in the functions.php file of your theme:
After applying this fix, refresh your admin panel. If the problem persists or if the solution provided here becomes 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 further assistance is needed, please open a new support ticket at WPML support forum.
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 am trying to access the Translation Management feature in WPML on my site hidden link. In my WPML, I can't find WPML -> Translation management. Instead, there is WPML -> WPML that links to /wp-admin/tm/menu/main.php, which results in a 404 Not Found error. I have the same situation as described in this ticket: https://wpml.org/forums/topic/we-cant-find-wpml-translation-management/. I tried using /wp-admin/admin.php?page=tm%2Fmenu%2Fmain.php and received 'Sorry, you are not allowed to access this page.' I have disabled all other plugins and only have WPML plugins active. I also switched to the Twenty Twenty-Five theme. I can provide access to my development site.
Symptoms:
404 Not Found error when accessing /wp-admin/tm/menu/main.php and 'Sorry, you are not allowed to access this page' when using /wp-admin/admin.php?page=tm%2Fmenu%2Fmain.php.
Questions:
Why can't I find WPML -> Translation management in my WPML?
How can I resolve the 404 Not Found error when accessing /wp-admin/tm/menu/main.php?
Why am I receiving 'Sorry, you are not allowed to access this page' when using /wp-admin/admin.php?page=tm%2Fmenu%2Fmain.php?
It this does not solve the issue, could you please create a new admin account and verify if the issue persists when being logged in to this new account?
I confirm you that the new account I created is an "administrator" role.
To be absolute sure I created another admin account and the result is the same.
Languages: English (English )Spanish (Español )German (Deutsch )
Timezone: America/Lima (GMT-05:00)
Hello,
I would like to request temporary access (wp-admin and FTP) to the website to investigate the issue further. Please provide access to an admin account.
You can find the required fields below the comments section when you log in to leave the next reply. The information you provide is private, meaning only you and I can see and access it.
IMPORTANT
Please be sure to back up your website and database before granting us access.
If you can't see the "wp-admin / FTP" fields, your post and website credentials will be set to "PUBLIC." DO NOT publish the data unless you see the required wp-admin / FTP fields.
I may need to install a plugin called "All In One WP Migration" to create a copy of the website so I can investigate the issue further.
However, I would also be very grateful if you could provide a staging site or a copy of the website from your server for this purpose.
If you have any questions about creating such a staging site, you can consult your hosting provider. Please note that WPML must also be registered on this staging site at https://wpml.org/account/websites/.
If you are unable to provide such a copy of the website for testing, please let me know on this ticket.
The private reply form looks like this: hidden link
Click "I still need assistance" the next time you reply.
Video: hidden link
Please note that we are required to request this information individually on each ticket. We are not permitted to access any credentials that were not specifically submitted on this ticket using the private response form.
I verified that in "User Role Manager" admins have full capabilities. For your info: I do not need this plugin, I installed it in the past but then I deactivated it.
In the user meta table there are no.3 admins (see screenshot) with the correct ptw_capabilities meta_value but also for this users the issue persists:
user_id=1
user_id=2
user_id=17 (your account)
Also, I don't understand why new account admin user are created with a wrong ptw_capabilities.
I reset the users roles with "User Role Editor" plugin.
Reactivation of WooCommerce creates "Shop manager" and "Customer" user roles, that seems ok.
My issues now are:
1) new admin users has not wpml capabilities
2) "Translator" user role is missing. I tried some ways explained here hidden link without result.
All these steps I’ll have to do again in the Production site, so I need to know the manual fix on the db that you did in the previous step.
Check your Users list ad Users > All Users in WordPress. If you hover of the name of each user you will see a URL in the left bottom corner of the browser which includes an ID.
Random Example: hidden link
Here the user ID would be 1.
Take note of the IDs for your admin users.
Then go to the table wp_usermeta and search for the meta key: ptw_capabilities
Now make sure to change the meta value for each of you ID by considering the correct IDs.
Now, that your site will still have issues creating new users with WPML capabilities and that you are missing the Translator User Role seems to be an issue caused by the User Role Editor plugin.
If you need further assistance, I can offer to consult the second-tier support about what might be causing this problem, but first, let us make sure that your site is functional.
If you need my help with applying the fix on the production site, please do not hesitate to ask.
Only if it was useful to someone else:
1) capabilities meta key in wp_options is wp_user_roles (not wp_user_rules)
2) after running add_wpml_caps_to_admin() the meta key ptw_capabilities in wp_usermeta fon new Admin users is a:1:{s:13:"administrator";b:1;} only, but they have full access to WMPL menu