Skip Navigation

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.

Sun Mon Tue Wed Thu Fri Sat
- 8:00 – 12:00 8:00 – 12:00 8:00 – 12:00 8:00 – 12:00 8:00 – 12:00 -
- 13:00 – 17:00 13:00 – 17:00 13:00 – 17:00 13:00 – 17:00 13:00 – 17:00 -

Supporter timezone: Asia/Ho_Chi_Minh (GMT+07:00)

Tagged: 

This topic contains 29 replies, has 2 voices.

Last updated by Long Nguyen 8 months ago.

Assisted by: Long Nguyen.

Author Posts
September 12, 2023 at 5:44 pm #14385707

Stéphane

What is happening:
Since a while and regularly, a menu named "Categories--FR" loose its sync with the default language menu

Symptoms:

1- Error code
-> Notice: Undefined offset: 0 in /home/customer/www/nantelmusique.ca/public_html/wp-content/plugins/sitepress-multilingual-cms/inc/wp-nav-menus/class-wpml-nav-menu.php on line 566

Warning: Cannot modify header information - headers already sent by (output started at /home/customer/www/nantelmusique.ca/public_html/wp-content/plugins/sitepress-multilingual-cms/inc/wp-nav-menus/class-wpml-nav-menu.php:566) in /home/customer/www/nantelmusique.ca/public_html/wp-admin/includes/misc.php on line 1431

2- When I leave the menu page, system ask me "Leave site ? Changes you made may not be saved." even if I did no change. You can see it there: hidden link

Menu showing as
Back-end showing an error and content has disappeared.png
September 12, 2023 at 5:47 pm #14385755

Stéphane

Here is some view from the front end

Front-End EN view.jpg
Front-end FR view.jpg
September 15, 2023 at 3:35 am #14400253

Long Nguyen
Supporter

Languages: English (English )

Timezone: Asia/Ho_Chi_Minh (GMT+07:00)

Hi Stéphane,

Thank you for contacting WPML support, I'd be happy to help you with this issue.

If you add a new menu or change something in the menu and sync the menu again, is the error still there? If this issue occurs again, please try to enable a minimal environment as below and see if it helps:
- Deactivate non-WPML plugins.
- Switch to a standard theme of WordPress.
❌ IMPORTANT: Please backup your database and website before proceeding ❌

The second issue might relate to the first one. After re-syncing the menu, please recheck it.

Look forward to your reply.
Thanks

September 15, 2023 at 4:09 pm #14404423

Stéphane

Hi,

Here is what I did about 5 times before I asked for support:

If I add an item to the menu in EN, and then resync the menu, the FR menu appears again and everything works fine, but the error code stays.

Then, after a few days, for no obvious reason, the FR menu disapear again.

It only happens, with the Category menu, never with the Main menu for example.

And the only difference I see between those 2 menus, is that the Main menu contains 7 items, and the Categories menu contains 169 items.

On another end, I cannot do the test you ask me to do, because we only have the production website, which is live, and we cannot make a staging on our server.

Would it be possible that you produce a sanbox for me, with our database to make the test you suggest ?

Thanks in advance.

September 18, 2023 at 2:27 am #14408977

Long Nguyen
Supporter

Languages: English (English )

Timezone: Asia/Ho_Chi_Minh (GMT+07:00)

Hi,

I create a test site on the Cloudways server for you. You can migrate your site there and do the troubleshooting steps. Also, please let me know steps to replicate the issue with the menu disappearing. It's very difficult to fix an issue if it is not replicated from scratch.
The site info is added to the private reply below.

Thanks.

September 19, 2023 at 5:37 pm #14423001

Stéphane

Hi,

Thanks for the sandbox !

Meanwhile, I finally was able to create a staging on our server, and I suspect that the problem could be related to the Woodmart theme, but I can't be sure until I talk to them.

Could you please keep that ticket open until I give you news ? Thanks in advance...

September 20, 2023 at 1:22 am #14425761

Long Nguyen
Supporter

Languages: English (English )

Timezone: Asia/Ho_Chi_Minh (GMT+07:00)

Hi,

Yes, sure. You can reply to this ticket in around 2 weeks and let me know the status of the issue. Or open a new ticket if it takes more time.

Thanks.

September 21, 2023 at 4:20 pm #14441081

Stéphane

Hi,

So, Woodmart support looked at the problem and here is what they said concerning the menu disappearing and the error code showing on the WordPress menu page:
"We can’t reproduce this issue on your website now. But even if you face it, this problem is related to WPML so you would better contact the plugin’s support for help."

Concerning the WordPress warning systematically triggering, they said:
"This issue is related to our theme but it doesn’t affect anything at all. We will check how to fix this in our future updates."

So, from there, I need your help to solve that issue.

I can give you access to the staging I created, but unfortunately, after building it, I have put back the menu in FR, and it never disappeared. Also, the error is not showed. Maybe is it because of the way I did my staging (manually replaced the URLs).

So, I guess the best would be if you could create a real staging from the original website which still has the error code and the menu missing. On my side, unfortunately, I don't have the tools to create a staging for a database that big.

Could you make a staging from the website ?
Or would you prefer to enter the production website ?

What do you think about all that ? Let me know... thanks.

September 22, 2023 at 1:34 am #14443045

Long Nguyen
Supporter

Languages: English (English )

Timezone: Asia/Ho_Chi_Minh (GMT+07:00)

Hi,

So I understand the issue occurs on the production site only. Please take a full backup of your site and database and share it with me. I will try to restore your site on the local host and investigate the issue.
I also would like to request temporary access (wp-admin and FTP) to your site to take a look at the issue. Your next reply is set to private to share the info.

You can use this plugin to create the backup: https://wordpress.org/plugins/duplicator/

Look forward to your reply.
Thanks

September 26, 2023 at 11:45 am #14466551

Long Nguyen
Supporter

Languages: English (English )

Timezone: Asia/Ho_Chi_Minh (GMT+07:00)

Hi,

After taking a backup file and restoring your site on my local host, I'm not able to make the Category menu in the French language disappear as you said. Just re-sync the menu from English to French and it displays properly in both the admin area and frontend.

Regarding the notice error, I see it occurs when activating two plugins "Popup Builder" and "Schema & Structured Data for WP & AMP" with WPML and WooCommerce. Please check this screenshot hidden link
You can try to deactivate both plugins and observe the issue with the menu disappearing again.

Look forward to your reply.
Thanks

September 26, 2023 at 2:42 pm #14467861

Stéphane

Hi Long,

Thanks for making a copy of the website to look for the problem !

Concerning the menu disappearing, this is normal that you can't replicate it, as far as we never found a reason why it was disappearing.

But in fact, I deactivated the Popup Builder plugin, and the error code went away.

Now, I've re-synced the menu "Categories", and I need to wait to see if it stays or disappear again. Of course, I hope it will stay, but please, keep this ticket open for at least 2 weeks, to see how it goes, just in case I'd need more help.

Is it ok with you like that ? Thanks in advance ...

September 27, 2023 at 2:31 am #14470061

Long Nguyen
Supporter

Languages: English (English )

Timezone: Asia/Ho_Chi_Minh (GMT+07:00)

Hi,

Yes, you can update more info in this ticket in 2 weeks or just type something and this ticket will be opened in 2 weeks, and so on.

Thanks.

October 10, 2023 at 1:33 pm #14550505

Stéphane

Hi Long,

After 15 days, the menu disappeared again !

Same thing as before:
-> WPML menu sync page saying that all is good and there is nothing to sync (see screenshot)
-> On the FR menu side, everything disappeared, so of course, in the frontend too !

What would you do ?

October 10, 2023 at 1:39 pm #14550681

Stéphane

Forgot the screenshot, here it is !

Capture d’écran, le 2023-10-10 à 09.39.00.png
October 11, 2023 at 2:45 am #14554413

Long Nguyen
Supporter

Languages: English (English )

Timezone: Asia/Ho_Chi_Minh (GMT+07:00)

Hi,

Checking the issue on the local site, I do not see the menu in French language disappeared. It's really difficult to troubleshoot an issue that is not replicated with clear steps. If you remember what you did, please share it and I will try to replicate it on the local site.

I also see running some troubleshooting buttons in WPML > Support > Troubleshooting and it also fixes the issue:
- [Products]Synchronize posts taxonomies
- Clear the cache in WPML
- Remove ghost entries from the translation tables
- Fix element_type collation
- Fix WPML tables collation
- Set language information
- Fix terms count
- Fix post type assignment for translations
❌ IMPORTANT: Please backup your database and website before proceeding ❌

Please try this and observe the issue one more time.

The topic ‘[Closed] Menu in the other language (FR) loose its sync with the default language (EN)’ is closed to new replies.