This thread is resolved. Here is a description of the problem and solution.
Problem: The client was experiencing issues with missing pages and altered layouts after setting up WPML on a site using Astra Theme and Elementor Pro. Despite updating plugins, the problem persisted. Solution: We resolved the issue by adding a specific function to the theme's functions.php file. Here is the code that was used:
function add_wpml_manage_translations_cap() {
$role = get_role('administrator');
if ($role) {
$role->add_cap('manage_translations');
}
}
add_action('init', 'add_wpml_manage_translations_cap');
After applying this code, we triggered it by visiting the frontend, and then removed the code. This allowed the client to access the translation management dashboard.
If this solution does not resolve your issue, or if it seems outdated, we recommend opening a new support ticket. Additionally, please check related known issues at https://wpml.org/known-issues/, verify the version of the permanent fix, and confirm that you have installed the latest versions of themes and plugins. For further assistance, you can also visit our support forum 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 set up WPML on the site using Astra Theme and Elementor Pro. Requirements from WPML are checked and fulfilled. Link to a page where the issue can be seen: hidden link (since the page is completelty broken we have a Service-Announcment that shows when you visit the page currently, if it helps i can deactivate, but what you will see is what is in the screenshot with the page not found error)
Symptoms:
Home, About, and other sites are missing completely. Even some layouts did get changed.
Questions:
Why are some sites missing after setting up WPML?
Why did some layouts change after installing WPML?
During the creation of this ticket it suggested to update "WooCommerce Multilingual & Multicurrency" from 5.4.0 to 5.4.1 but as you can see in the screenshot this is not possible.
Additionally the missing sites are not WooCommerce sites therefore I suspect that this will not solve the issue.
Thanks for contacting us. I will need to closely examine your website. Therefore, I will require temporary access (WP-Admin and FTP) to a test site where the problem has been replicated, if possible. This will enable me to provide better assistance and determine if any configurations need to be modified.
Please note that it is important to have a backup for security purposes and to prevent any potential data loss. You can use the UpdraftPlus plugin (https://wordpress.org/plugins/updraftplus/) to fulfill your backup requirements.
Your upcoming reply will be treated with confidentiality and will only be visible to you and me.
✙ To resolve the issue, I may need your consent to deactivate and reactivate plugins and the theme, as well as make configuration changes on the site if necessary. This emphasizes the significance of having a backup.
I ran the troubleshooting option in WPML > Support > Troubleshooting > "Set Language Information" and it seems to fix it now. Could you check? Also, I've included a screenshot for our reference.
Could you please backup and run the reset options by placing the code below into your theme's functions.php file?
// THIS performs a reset on icl capabilities (run once in functions.php ):
// TO BE USED WHEN SOME WPML MENU IS NOT PRESENT OR AUTHORIZATION IS REQUIRED
function wpmlsupp_1706_reset_wpml_capabilities() {
if ( function_exists( 'icl_enable_capabilities' ) ) {
icl_enable_capabilities();
}
}
add_action( 'shutdown', 'wpmlsupp_1706_reset_wpml_capabilities' );
Hello Kor
This partially fixed the problem.
Now the “translation management” on prod is missing, it shows the label wpml, and when I click on it or the blue colored WPML main button, it links to a non-existent page.
What can I do to fix this?
I will need to closely examine your production website. Therefore, I will require temporary access (WP-Admin and FTP)
Please note that it is important to have a backup for security purposes and to prevent any potential data loss. You can use the UpdraftPlus plugin (https://wordpress.org/plugins/updraftplus/) to fulfill your backup requirements.
Your upcoming reply will be treated with confidentiality and will only be visible to you and me.
✙ To resolve the issue, I may need your consent to deactivate and reactivate plugins and the theme, as well as make configuration changes on the site if necessary. This emphasizes the significance of having a backup.
I will provide you with access to the production environment as soon as the development updates have been pushed to production (expected within the next few days). Additionally, I will ensure that everything is backed up to prevent potential data loss.
Once you have access and are logged in, could you please check an issue with Translated Product Options? I am using STAGGS options on the products in the shop, but they are not being displayed in English. I reviewed the STAGGS documentation (hidden link), which states that it works with WPML. However, despite trying all the settings in WPML I could find, I couldn't resolve the issue.
Could you kindly investigate this as well?
Best regards, Pascal
New threads created by Kor and linked to this one are listed below:
I will have to escalate this to our 2nd Tier Support to check on the "Translation Management" issue that is not accessible. I will get back to you once I've received feedback.
Thanks for your patience. This is fixed by applying the code below into your theme's functions.php file. Then, I visited the frontend to trigger the code. I've removed the code afterwards. You can now access to the translation management dashboard here hidden link
function add_wpml_manage_translations_cap() {
$role = get_role('administrator');
if ($role) {
$role->add_cap('manage_translations');
}
}
add_action('init', 'add_wpml_manage_translations_cap');
Our 2nd Tier Support has provided feedback and is requesting access to the database to investigate the issue further. This will help them develop a solution to prevent the problem from recurring. Therefore, I need your permission to install the PHPMyAdmin plugin on your website to access the server database.
Thank you for marking this ticket as resolved. Our 2nd Tier Support team has requested access to the database for further investigation. This will help them develop a solution to prevent the issue from happening again. If you're open to this, I would need your permission to install the PHPMyAdmin plugin on your website to access the server database. We specifically need to check the wp_options table, along with the option related to wp_user_roles.