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.

Tagged: 

This topic contains 1 reply, has 2 voices.

Last updated by Dražen Duvnjak 3 weeks, 2 days ago.

Assisted by: Dražen Duvnjak.

Author Posts
August 28, 2024 at 9:06 pm #16117174

vincentH-30

Background of the issue:
I’m trying to use WPML CMS on my site, hidden link, but when I activate the WPML CMS plugin, my submenus stop working, and I see errors in the browser console when I press F12. These issues do not occur when WPML CMS is deactivated. I have attempted to troubleshoot the issue by delaying the script execution using jQuery(window).on('load', ...) and by using the wpml_loaded hook, but the issue persists.

Symptoms:
Uncaught ReferenceError: index is not defined at menu-overflow.js:10:1268 at HTMLUListElement. (menu-overflow.js:10:1278) at Function.each (jquery.min.js?ver=3.7.1:2:3129) at e..each (jquery.min.js?ver=3.7.1:2:1594) at $.fn.swMenu (menu-overflow.js:10:40) at menu-overflow.js:12:31 at menu-overflow.js:15:3

Questions:
How can I resolve the conflict between WPML CMS and my custom JavaScript menu script?
Is there a specific way to load scripts when using WPML to avoid such conflicts?

August 29, 2024 at 6:29 am #16117542

Dražen Duvnjak
Supporter

Languages: English (English )

Timezone: Europe/Zagreb (GMT+02:00)

Hello,

thanks for contacting us.

As I can see from the error it says: index is not defined at menu-overflow.js, probably should be checked and code corrected.

From the WPML side, we can not debug or write custom code, but we can help with any suggestion or question you may have.

Otherwise, if you need further help with custom code, I suggest hiring a developer / WPML contractor: https://wpml.org/contractors/

Regards,
Drazen

This ticket is now closed. If you're a WPML client and need related help, please open a new support ticket.