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.

Our next available supporter will start replying to tickets in about 5.53 hours from now. Thank you for your understanding.

This topic contains 1 reply, has 2 voices.

Last updated by Itamar 1 year, 5 months ago.

Assigned support staff: Itamar.

Author Posts
October 5, 2018 at 2:05 pm #2791053


I am trying to sync menu items that have empty urls, but WPML don't sync them. Those empty url in the menu are used for the top items in my menu for the dropdown submenus.

This problem happens on all my websites. It seems that WPML can't manage/translate empty strings.

How to reproduce :
1. Create a custom menu item with the url #
2. Add a submenu item to a page.
3. Go in WPML sync menu and sync the menu.
4. Verify in the font end that it works. Note the mouse cursor shape.
5. Edit the menu and remove the "#" to leave the url field blank for the top item.
6. Try to sync the menu with WPML.

Result: WPML doesn't update the url field, and leave it to "#".

I tried to translate those menus with the string translation, but they don't show up since the original url field is empty.

A workaround is to leave the "#" in the url field instead of leaving the field empty, that way WPML sync the menu correctly, but it doesn't have the same effect in the front end (the mouse cursor acts like a url, and if we click it, it moves the page to the top).

A second workaround I just found is to create a new custom menu item to recreate the menu. That way, WPML copy the empty field, but that's a pain for big menus.

In the screenshot, you see the new url in blue "0", but it stays in blue even after trying to sync it.

October 8, 2018 at 3:35 pm #2796745


Languages: English (English ) Hebrew (עברית )

Timezone: Asia/Jerusalem (GMT+03:00)


I've checked this issue on my local server on a clean WordPress installation, and I cannot replicate this issue. An empty menu item is being synced to the other language menu. On my test site, English is the default language, and French is the second language. Please see the attached screenshots. So it looks like it is happening on your site installation.

I guess that you are expecting that when hovering with the mouse on the top level menu item the sub-menu items will show.
Is it correct?
If you leave the "#" in the URL field does the sub-menu items show while hovering with the mouse?
I ask it because I think that if it is working for you this way, then it is OK. I think that most users do not click the item if it revels other menu items.

If you need a better solution for this, we will need to debug the issue on your site. So, in this case, please try the following.

If possible get your site into a minimum environment.
Minimum environment means switching to a default WordPress theme like Twentyseventeen and no plugins activated but WPML.
Is it possible for you to try it?
You will need first to check if the problem persists when just the theme is switched to Twentyseventeen (for example).
If it persists, then deactivate all plugins but the WPML and its add-ons and WooCommerce itself (leave WPML and its components active).
Then please check if the problem persists.
If it does not persists so start by activating the plugins one by one and check when the problem comes back. Then report to me which was the culprit plugin.

**** Important! Please make a full site backup (files and DB) before you proceed with those steps****


The topic ‘[Closed] Empty menu url doesn't sync’ is closed to new replies.