This thread is resolved. Here is a description of the problem and solution.
Problem:
If you're experiencing issues with the primary category not being correctly represented in the Language Switcher for Spanish URLs, leading to incorrect URL structures on page load, particularly after updating to version 4.7.4, this might be due to a compatibility issue with the Only Top Category option of the Grid Post widget from the Unlimited Elements for Elementor (Premium) plugin.
Solution:
First, we recommend replicating the issue on a clean installation to confirm it's a compatibility issue. Here are the steps:
1. Install Unlimited Elements for Elementor (Premium) on a clean WordPress installation with Elementor, Yoast, WPML, and all necessary WPML add-ons.
2. Create the same situation and try to replicate the issue.
Additionally, there is a workaround provided by our compatibility team:
1. Open the file
.../wp-content/plugins/unlimited-elements-for-elementor/provider/provider_params_processor.class.php
2. Locate the
getPostMainCategory
function on line 574.
3. Replace the existing code with the new code provided, which includes a WPML filter to ensure the primary category ID is correctly translated.
4. Clear Elementor's cache by going to "Elementor > Tools > Clear Files & Data" and ensure the translation is 100% complete.
If these steps do not resolve your issue, or if the solution seems outdated or irrelevant to your case, we highly 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 the problem persists, please open a new support ticket at WPML support forum for further assistance.
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.
This topic contains 14 replies, has 0 voices.
Last updated by 2 months ago.
Assisted by: Christopher Amirian.