[Resolved] Old domain names in WPML Menu synchronization
This thread is resolved. Here is a description of the problem and solution.
Problem: After moving the site from staging to live, the WPML Menu Synchronization still shows old staging site domain names in custom links, despite them being correct in the menu itself. Solution: 1. We identified that the issue arises because WPML does not automatically update absolute links/custom URLs in the String Translation. These are loaded from .mo files located in wp-content/languages/wpml. 2. Since .mo files are compiled and cannot be edited directly, we recommend checking the corresponding .po files that might contain the outdated URLs. 3. Alternatively, you can try the following steps: - Navigate to WPML > Support > Troubleshooting. - Use the option to clean up the Strings table and regenerate the .mo files. This might help update your .mo files to reflect the current strings. 4. If the issue persists, we may need a full copy of your site or at least staging access to further diagnose the problem.
Please note that this solution might be outdated or not applicable to your specific 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 continues, please open a new support ticket with us 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.
Background of the issue:
I moved the page from staging to live (from kruess.coachthemes.com to hidden link). I searched and replaced the WP database with 'Better Search Replace', and this plugin does not find any 'kruess.coachthemes.com' in the database. The menu is okay, and all custom links lead to hidden link. Link to a page where the issue can be seen: hidden link
Symptoms:
In WPML Menu Synchronization, I see all custom links with old staging site domain names, kruess.coachthemes.com, even though the custom links in my menus are okay.
Questions:
Where does the old staging site domain name come from in the WPML Menu Synchronization?
How can I get rid of these entries in the WPML Menu Synchronization?
Then go to Settings > Permalinks > Resave the settings.
And finally, what happens if you create another Menu from scratch (test with a couple of items) and synch that Menu? does the issue persists with new menus?
Hi Ilves, yes these strings are all manually added as individual link menu entry. But all current individual links are okay. If I have to synchronize the menu I have to be careful to unselect these Stings.
I cleared all settings from your screenshot, but the wrong Menu Sync Entries are still there. Can I get rid of them manually? They are obviously not coming from the database or they are encrypted in the database.
Hi Ilyes, I think we misunderstand each other. I know how to edit the Menu manually. In the moment I do not have to, because all the links and titles are fine. Every menu entry links to the correct domain.
But: When I want to use the synchronize menu function from WPML, there are wrong entries. So I cannot use this function any more - or carefully select the entries I want to synchronize. If I would synchronize everything - what I normally did - I would get lots of wrong entries.
And my question is, how to delete these wrong entires at Synchronize Menu. Please have a look at the screenshot. My current Domain is hidden link. Here you see the old staging site domain kruess.coachthemes.com and some of the menu titles are not set. But in the real WP Menu everything is fine. All translations and links are okay.
Languages: English (English )French (Français )Arabic (العربية )
Timezone: Pacific/Easter (GMT-06:00)
Hello,
Oh, sorry for the misunderstanding, in that case, I would like to ask for temporary access to your site’s wp-admin and FTP to investigate the issue further.
If you do not see the form below, please do not enter your credentials as they will be publicly exposed:
hidden link
For your privacy and security, please ensure that you make your reply a private one.
Hi, I understand that you like to log in, but the problem is happing at our live site (very frequented) and it's a shop and I am not allowed to grant access to other parties.
Would it be an idea, if you tell me which files you need from FTP, that I zip these files and send them to you?
Languages: English (English )French (Français )Arabic (العربية )
Timezone: Pacific/Easter (GMT-06:00)
Hello,
Thank you for your patience,
I wanted to double check with our devs, and here is what they said :
- These are absolute link/custom URL, which is not taken into consideration by WPML when changed, WPML can only automatically change default "real" URLs or dynamic urls.
- Custom menu items are translated with String Translation so they will end up being loaded from mo files in wp-content/languages/wpml , could you check this file and share its content with me?
Hi thank you for asking your developers. I give you all files from /languages/wpml as zip to download here: hidden link
I cannot check the files, because I cannot Edit .mo Files with any of my editors and not with Poedit.
I saw 3 Files called hauptmenü menu-xxx. This is the name of my main Menü. Maybe you will find the strings here. If you can edit those, "hidden link" has to be replaced with "hidden link".
I even checked the string translation, but cannot find strings with "coachthemes".
Hi Ilyes, Yeah - that was the hint it takes. Now the settings are okay (see Screenshot). That means after a change of the Domain Name I better run these two steps, cause there could be strings with the domain name in mo-files.
You can close this ticket now. Thank you very much...