Skip to content Skip to sidebar

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
- 9:00 – 18:00 9:00 – 18:00 9:00 – 18:00 9:00 – 18:00 9:00 – 18:00 -
- - - - - - -

Supporter timezone: Asia/Karachi (GMT+05:00)

This topic contains 0 reply, has 0 voices.

Last updated by Waqas Bin Hasan 5 months, 3 weeks ago.

Assisted by: Waqas Bin Hasan.

Author Posts
January 27, 2025 at 8:10 am

thomasW-77

Background of the issue:
I am trying to make the website pass the European Accessibility Act using the Avada theme with a sticky menu header. This issue only happens when WPML is activated. I have reached out to Avada's support, and they suggested contacting you. Here's a short video demonstrating it: hidden link. Link to a page where the issue can be seen: hidden link

Symptoms:
When WPML is enabled, the main menu ID appears twice in the HTML from the start, causing duplicate menu IDs. When WPML is disabled, the main menu ID is only once in the HTML when the page initially loads, and it appears twice when you scroll down.

Questions:
Why does WPML cause duplicate menu IDs in the HTML?
How can I prevent WPML from duplicating menu IDs?

January 27, 2025 at 8:46 am
January 27, 2025 at 1:22 pm #16637944

Waqas Bin Hasan
WPML Supporter since 05/2014

Languages: English (English )

Timezone: Asia/Karachi (GMT+05:00)

Hi,

Reference to our recent chat, I'm still working on it and also need to investigate in more detail (i.e. reproducing in a local environment to see if it can be reproduced out of the box).

I need some time to further investigate the issue, however, please note that I'll be off tomorrow for a local holiday and 'll be able to check back on Wednesday and 'll update you accordingly.

Thank you for your patience and cooperation.

Regards.

January 27, 2025 at 1:23 pm #16637954

thomasW-77

Hi Waqas,
no problem, thanks for the update.

January 29, 2025 at 6:39 am #16644311

Waqas Bin Hasan
WPML Supporter since 05/2014

Languages: English (English )

Timezone: Asia/Karachi (GMT+05:00)

Thank you for your patience and cooperation.

I'm trying to reproduce the issue in a fresh sandbox site at hidden link (one-click login). Here I've installed Avada theme and related plugins and am trying to add that sticky header to the global layout. But unfortunately I can't find "Element Sticky Visibility" (see attached) options in Menu element.

Perhaps I'm missing something in the setup.

Can you please take a few minutes to reproduce the issue in this sandbox site? It'd be great that either you record the screen or write the exact steps that how did you reproduce it. So I can then retry and check further.

Screenshot 2025-01-29 113811.jpg
January 29, 2025 at 7:45 am #16644553

thomasW-77

Hi Waqas,
I've reproduced the issue now on the test side.

I've set it up more or less as on my own site:

The container is set to sticky (not the menu or column) and absolute.
The container has no background color. Once sticky, it has a background color.
Container has a min-height:100px, when turning sticky it changes to 50px - This seemed to be crucial, as nothing happened until i changed this setting.
I also added a WPML language switcher to the menu, but not sure if this is necessary.

Screenshot 2025-01-29 at 08.44.15.jpg
Screenshot 2025-01-29 at 08.38.50.png
Screenshot 2025-01-29 at 08.38.40.png
January 29, 2025 at 12:51 pm #16646542

Waqas Bin Hasan
WPML Supporter since 05/2014

Languages: English (English )

Timezone: Asia/Karachi (GMT+05:00)

Thank you for the updates. I am working on this and 'll get back to you as soon as I find something or have a solution.

January 30, 2025 at 6:29 am #16649350

Waqas Bin Hasan
WPML Supporter since 05/2014

Languages: English (English )

Timezone: Asia/Karachi (GMT+05:00)

Thank you for your patience and cooperation.

I checked again in the sandbox and noticed that the "menu-primary" ID is still duplicated even without WPML plugins active (see attached). As you can also see that there's no language switcher visible because WPML isn't active.

This is little confusing, because the result is same with our without WPML and I'm not sure if it is really caused by WPML.

Do you have any other thoughts or how we can confirm if WPML is really causing such side-effect?

dupid.jpg
January 30, 2025 at 7:32 am #16649605

thomasW-77

Hi Waqas,
yes i can see that as well.
That's very strange. On my website the problem is not there when WPML is disabled,

Honestly I've believed it was a bug from the theme from the start, and I wrote to Avada support first. I've only contacted you as well because they told me to. They're apparently still investigating it...

But it is strange that the behavior on my website is different once WPML is enabled.
However, once you start scrolling on my website, with WPML off, the ID appears twice in the html. Just not initially when loading the page, that's the big difference really.

wpml_off.jpg
wpml_on.jpg
January 30, 2025 at 11:22 am #16650978

Waqas Bin Hasan
WPML Supporter since 05/2014

Languages: English (English )

Timezone: Asia/Karachi (GMT+05:00)

Thank you for the updates.

Sure, let's wait for them to complete their assessment and provide some technical pointers, which we can check again with WPML. And then I can check with my team.

Please let me know when you get more information.

January 30, 2025 at 11:39 am #16651062

thomasW-77

Thanks,
I've shared the link to your sandbox page with Avada support, so they can see the bug happens whether WPML is enabled or not.

January 30, 2025 at 1:18 pm #16651792

Waqas Bin Hasan
WPML Supporter since 05/2014

Languages: English (English )

Timezone: Asia/Karachi (GMT+05:00)

Sure, please feel free to reply when there's more to it, thank you.

The topic ‘[Closed] WPML causes duplicate menu ID's in HTML’ is closed to new replies.