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.
This topic contains 7 replies, has 2 voices.
Last updated by Bobby 4 years, 4 months ago.
Assisted by: Bobby.
Author | Posts |
---|---|
June 30, 2020 at 9:39 am #6484279 | |
andreaA-45 |
Good morning, I found an error that negatively affects the purchase process making the order in the checkout impossible. Specifically from mobile, opening the drop down menu select to complete the fields in the checkout, scrolling with my finger without selecting an option, the website pushes me to page 404. I created a copy of the website and found that the problem derives from WPML Multilingual CMS (because by disabling the plugin the operation is correct). Can you help me solve this compatibility problem? Thank you, ps. is important do check the error from mobile device |
July 1, 2020 at 10:38 pm #6499223 | |
Bobby Supporter
Languages: English (English ) Timezone: America/Los_Angeles (GMT-08:00) |
Thank you for contacting us ! I believe this is coming from the following piece of JavaScript code the Theme Author is using, which is why this issue is happening only when WPML is activated as that piece of JS code is targeting our mobile dropdown language switcher. Most likely window.location.href = $(e.target).attr('href'); //Mobile lang dropdown if ( event == "touchend" ) { if ($(e.target).parents('.select-options').length) { window.location.href = $(e.target).attr('href'); } } self.siblings(".select-options").hide(); self.removeClass('active'); if (!$(e.target).parents().hasClass('select-options select-styled')) { self.removeClass('active'); self.siblings(".select-options").hide(); } } }); }); } Please share the above with your theme authors and they should be able to fix this on their side. Let me know their feedback |
July 2, 2020 at 8:51 am #6501819 | |
andreaA-45 |
Hi Bobby, |
July 2, 2020 at 5:54 pm #6507269 | |
Bobby Supporter
Languages: English (English ) Timezone: America/Los_Angeles (GMT-08:00) |
I can confirm that the issue is coming from the above JS I provided found in the Theme's Code. wp-content/themes/stockie/assets/js/main.js?ver=5.4.2 As long as WPML is activated I believe that piece of code will run. You can find the code in the browser console and simply comment it out, or change the if ( event == "touchend" ) to something that doesn't exist such as if ( event == "none" ) and it will work as expected. I can verify this after testing it, this is a common JavaScript error. Please contact your theme support and let me know their feedback. |
July 2, 2020 at 7:59 pm #6508029 | |
andreaA-45 |
Hi Bobby, thanks for the clarifications. |
July 2, 2020 at 10:20 pm #6508445 | |
Bobby Supporter
Languages: English (English ) Timezone: America/Los_Angeles (GMT-08:00) |
I would reach out to them here as a buying customer and ask them to review the feedback on this ticket. hidden link We can start a compatibility process but as of right now they are not part of our compatible themes that have been tested by our team, therefore we do not have immediate communication with their team and the process would depend on how soon they respond. https://wpml.org/documentation/theme-compatibility/ As this is an issue that is coming from the theme's code it is recommended to contact them directly as we cannot work on their code as this would be outside of our support's capabilities. If the above is not an option you can try changing the code or commenting it out but then again, I cant say what consequences that could have. Ex. Go to wp-content/themes/stockie/assets/js/main.js?ver=5.4.2 and change the event trigger to none, but please note that this is a hacky workaround and I cannot guarantee the results. |
July 5, 2020 at 1:18 pm #6524507 | |
andreaA-45 |
hello Boddy, thank you. Now I have edited the file as you told me. Everything seems to be working properly. |
July 6, 2020 at 5:42 pm #6532647 | |
Bobby Supporter
Languages: English (English ) Timezone: America/Los_Angeles (GMT-08:00) |
Great, I am glad this workaround worked. I'd still update the theme authors on their theme's comment section just so they can be aware and hopefully update the code in their core so in future releases you won't have to apply the workaround. |