WordPress Affiliate Manager › Forums › Affiliate Manager Plugin › jquery ui + css not loading when language is different than site default
Tagged: jquery, multilingual, ui
- This topic has 10 replies, 3 voices, and was last updated 2 years, 11 months ago by
omjuicers.
-
AuthorPosts
-
April 26, 2020 at 5:54 pm #6690
omjuicers
ParticipantHi,
I’m running WP Affiliate Manager on a multilingual site. I figured some workaround to make some of the responses multilingual. All works fine on the French side (main language), but on the German version, it displays well but the problem I notice is that jquery UI scripts are not loading and some CSS to style the frontend account dashboard is not loading either.For now I copy-pasted the CSS in my theme’s CSS and I can live with that as a workaround, but now I get console error because datepicker is not recognized as a function, which makes sense as the jquery scripts are not loaded. How can I fix that, maybe with some function in my functions.php? But I’m not a programer and need help to make it work.
Uncaught TypeError: $(...).datepicker is not a function at HTMLDocument.<anonymous> (?sub=sales:506) at i (jquery.js?ver=1.12.4-wp:2) at Object.fireWith [as resolveWith] (jquery.js?ver=1.12.4-wp:2) at Function.ready (jquery.js?ver=1.12.4-wp:2) at HTMLDocument.J (jquery.js?ver=1.12.4-wp:2)April 30, 2020 at 12:30 am #6699mbrsolution
ModeratorHi,
All works fine on the French side (main language), but on the German version, it displays well but the problem I notice is that jquery UI scripts are not loading and some CSS to style the frontend account dashboard is not loading either.
I think this is more related to the design of your site. This is not related to our plugin because as you say, it works well in the French version of your site which is the main language for your site.
Regards
April 30, 2020 at 5:41 am #6700omjuicers
ParticipantMy site doesn’t have any specific design. It’s a WooCommerce with WPML and WP Affiliate Manager.
I saw in your release notes that you recently fixed an issue where jquery ui wasn’t loading when the site’s language was not English. This looks like something similar and I hope we can investigate what is causing this issue together.I’d be happy to give you access to a staging site so you can see the issue.
Best,
MarcApril 30, 2020 at 7:28 am #6703mbrsolution
ModeratorHi, I have submitted a message to the developers to investigate further your issue.
Thank you
April 30, 2020 at 2:21 pm #6704omjuicers
ParticipantThank you, keep me posted.
Best,
MarcMay 1, 2020 at 4:44 am #6705Shadow Labs
Keymaster@omjuicers, What happens if you set German as the main language?
May 2, 2020 at 5:33 am #6706omjuicers
ParticipantHi @shadowlabs,
Good idea, so I tried to switch the default language to German and it makes no difference. The jquery ui still loads in French and not in German.
Then I decided to push the experiment and I added Italian as a third language to the site. This is when the surprise came. Now jquery ui (javascript+css) only loads in Italian and not in French or German. I tried to switch the default language to all 3 languages and it makes no difference.
So basically, default language makes no difference, the plugin can only load the jquery ui in one of the site’s language and not the others. Which one seems to be arbitraty and can change based on what languages are available on the site.
Best,
MarcMay 4, 2020 at 5:16 am #6709Shadow Labs
Keymaster@omjuicers, Thank you. We ran some tests on our development site after setting the language to German. We couldn’t find any issue in the plugin admin area or the affiliate dashboard.
May 4, 2020 at 6:35 am #6711omjuicers
ParticipantHi, it doesn’t happen on the main dashboard but on the /?sub=sales, you get an error in the console and the calendar is not loading.
How can I give you access to my staging site to look at the case, I can provide the exact URL where it’s happeneing.
Thanks.
April 29, 2023 at 2:42 pm #8122omjuicers
ParticipantI just noticed this issue is still unresolved.
And it’s the same as this one:https://wordpress.org/support/topic/typeerror-datepicker-is-not-a-function/May 2, 2023 at 9:44 pm #8125omjuicers
ParticipantI guess I’ll open a new thread since there is no answer here.
-
AuthorPosts
- You must be logged in to reply to this topic.