Skip Navigation

[Resolved] Layouts 1.8.6 Still Has Problems – WPML simple_language_selector Select 2

This support ticket is created 7 years, 6 months ago. There's a good chance that you are reading advice that it now obsolete.

This is the technical support forum for Toolset - a suite of plugins for developing WordPress sites without writing PHP.

Everyone can read this forum, but only Toolset clients can post in it. Toolset support works 6 days per week, 19 hours per day.

Sun Mon Tue Wed Thu Fri Sat
- 7:00 – 14:00 7:00 – 14:00 7:00 – 14:00 7:00 – 14:00 7:00 – 14:00 -
- 15:00 – 16:00 15:00 – 16:00 15:00 – 16:00 15:00 – 16:00 15:00 – 16:00 -

Supporter timezone: Europe/London (GMT+01:00)

This topic contains 5 replies, has 2 voices.

Last updated by George 7 years, 6 months ago.

Assisted by: Nigel.

Author
Posts
#445558
toolset bugs.jpg

When editing Layouts, I am still getting errors / not able to save layouts still. Error seems to be related to WPML language switcher on backend:

The toolset_select2('destroy') method was called on an element that is not using Select2. - /plugins/layouts/inc/gui/editor/js/ddl-wpml-box.js

Uncaught TypeError: WPML_Core.simple_language_selector.initialize_toolset_select2 is not a function

Please please please try to fix this bug ASAP. Have been waiting to update for weeks now, but things keep breaking on our dev site. We're stuck on a CRED version with problems because of this.

#445690

Nigel
Supporter

Languages: English (English ) Spanish (Español )

Timezone: Europe/London (GMT+01:00)

Hi George

I created a test installation locally with the latest Toolset and WPML plugins installed and was eventually able to recreate the problem shown in your screenshot.

I have escalated this thread to our second tier for further investigation and will report back to you as soon as there are any developments.

Thanks for your patience.

#445844

Nigel
Supporter

Languages: English (English ) Spanish (Español )

Timezone: Europe/London (GMT+01:00)

George

You said ASAP, so I'm reporting the findings here.

You can apply this fix yourself, or wait until an errata with a patch is prepared or the next release is published.

You need to locate line 49 of the file: layouts/inc/gui/editor/js/ddl-wpml-box.js

and change this:

WPML_Core.simple_language_selector.initialize_toolset_select2();

to this:

WPML_Core.simple_language_selector.initialize_select2();

If you do update it yourself please let me know whether that fixes the error, thanks.

#445851

Thank you Nigel! I'm going to apply this and report back. A+

#445998

Nigel
Supporter

Languages: English (English ) Spanish (Español )

Timezone: Europe/London (GMT+01:00)

Great, let me know how you get on.

An errata has now been published with the fix: https://toolset.com/errata/javascript-select2-error-console-saving-layout-wpml-active/

#448236

Works great Nigel. Thank you!

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