WordPress Affiliate Manager

Affiliates Management Plugin for WordPress

  • Home
  • Features
    • Screen Shots
  • Download
  • Documentation
  • Addons
  • Support
    • Support Forum
    • Forum Login
    • Forum Registration
    • Contact
    • Premium Addon/Plugin Support

[Resolved] Uncaught TypeError: $(…).datepicker is not a function

by

WordPress Affiliate Manager › Forums › Affiliate Manager Plugin › Uncaught TypeError: $(…).datepicker is not a function

  • This topic has 10 replies, 3 voices, and was last updated 2 years, 10 months ago by Shadow Labs.
Viewing 11 posts - 1 through 11 (of 11 total)
  • Author
    Posts
  • May 3, 2023 at 4:29 am #8126
    omjuicers
    Participant

    Hi,

    I raised this same issue 3 years ago in 2020, it was marked as resolved but it’s still happening. Here is the original thread:

    jquery ui + css not loading when language is different than site default

    Someone else reported it 2 years and 9 months ago on wordpress.org and no solution neither: https://wordpress.org/support/topic/typeerror-datepicker-is-not-a-function/

    Meanwhile I’m experiencing it a bit differently than originally reported. It’s not working in neither language (I have French and German on my site).

    I have a staging site you could be login in to look at it.

    Here is the full error in the console:

    
    jQuery.Deferred exception: $(...).datepicker is not a function TypeError: $(...).datepicker is not a function
    at HTMLDocument.<anonymous> (https://stg-omjuicersch-staging.kinsta.cloud/de/partner/?sub=sales:618:37)
    at e (https://mlsfuhg7sobs.i.optimole.com/f:js/q:mauto/m:0/https://stg-omjuicersch-staging.kinsta.cloud/wp-includes/js/jquery/jquery.min.js?ver=3.6.3:2:30158)
    at t (https://mlsfuhg7sobs.i.optimole.com/f:js/q:mauto/m:0/https://stg-omjuicersch-staging.kinsta.cloud/wp-includes/js/jquery/jquery.min.js?ver=3.6.3:2:30460) undefined
    S.Deferred.exceptionHook @ jquery.min.js?ver=3.6.3:2
    jquery.min.js?ver=3.6.3:2 Uncaught TypeError: $(...).datepicker is not a function
    at HTMLDocument.<anonymous> (?sub=sales:618:37)
    at e (jquery.min.js?ver=3.6.3:2:30158)
    at t (jquery.min.js?ver=3.6.3:2:30460)
    
    May 3, 2023 at 4:31 am #8128
    admin
    Keymaster

    This usually happens when another plugin or theme or customization on the site has some JavaScript errors and then that is having a cascading errors and creating unexpected errors that you are seeing. Our plugin doesn’t have any JavaScript errors. You can do the following conflict test to identify the source:

    Test for Plugin and Theme Conflict Before Posting an Issue or a Bug

    May 10, 2023 at 7:33 pm #8154
    omjuicers
    Participant

    The previous post has been “awaiting moderation” for one week now…

    May 11, 2023 at 12:28 pm #8130
    omjuicers
    Participant

    Hi,

    I’ve done these tests 3 years ago and it’s not a javascript conflict from another plugin or theme. I can tell you exactly what is happening and it’s related to the site language. I run multilingual site with WPML and when multiple languages are activated in WPML, somehow your plugins is not loading the needed jquery and css needed. This is what creates the error. Here are the lines that don’t load but should from your plugin:

    
    <link rel='stylesheet' id='wpam_jquery_ui_theme-css' href='https://mlsfuhg7sobs.i.optimole.com/f:css/q:mauto/m:1/https://omjuicers.fr/wp-content/plugins/affiliates-manager/style/jquery-ui/smoothness/jquery-ui.css?ver=6.2' type='text/css' media='all' />
    <link rel='stylesheet' id='wpam_style-css' href='https://mlsfuhg7sobs.i.optimole.com/f:css/q:mauto/m:1/https://omjuicers.fr/wp-content/plugins/affiliates-manager/style/style.css?ver=6.2' type='text/css' media='all' />
    

    You can see that your code calls for “datepicker” from jquery. And obviously if you don’t load jquery that contains that function in the first place, it will result exactly in that error. I was able to workaround the css by including the missing css lines in my theme’s css file, but the jquery simply isn’t loading. I don’t think I should add code to load it manually because your plugin is not loading it. Can you please look into fixing that?

    Thanks,
    Marc

    May 11, 2023 at 12:33 pm #8156
    Shadow Labs
    Keymaster

    @omjuicers, Unfortunately our plugin is not compatible with multilingual setup since this is not a core WordPress feature.

    May 17, 2023 at 12:04 pm #8160
    omjuicers
    Participant

    If this was a joke it would be almost funny.

    Your plugin if obviously not loading jquery and css when used in multilingual setup and that is for sure much closer to a bug than to an incompatibility. I am not asking you to make your plugin compatible with multilingual setup, I can manage that on my own. All I need is for you to be willing to look at bugs instead of hiding behind excuses.

    In the post referred to above, you wrote on April 30, 2020 at that you had submitted a message to the developers to investigate further this issue. Maybe after 3 years, it would be ok to follow up and see if this can be fixed? How hard can it be, seriously?

    May 17, 2023 at 4:35 pm #8161
    Shadow Labs
    Keymaster

    @omjuicers, You can “right-lick > View page source” to check if the scripts are being included.

    May 19, 2023 at 10:20 am #8166
    omjuicers
    Participant

    @shadowlabs, exactly… and those two are not being included. This precisely the bug I’ve been trying to report to you for 3 years now!

    May 19, 2023 at 1:52 pm #8167
    Shadow Labs
    Keymaster

    @omjuicers, I understand. But why are you calling this a bug? without multilingual, does this happen if your website language is set to German or French in the settings (Settings > General > Site Language)?

    May 20, 2023 at 7:27 am #8168
    omjuicers
    Participant

    Based on my experiments in 2020 (see previous ticket), the 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 random and can change based on what languages are available on the site.

    I call this a bug because it has nothing to do with supporting a multilingual setup or assuring that your plugin works in a multilingual way. But we can call it whatever you prefer, the question is more how to fix this?

    May 21, 2023 at 1:19 pm #8170
    Shadow Labs
    Keymaster

    @omjuicers, We have run some tests on our website by switching to both German and French languages. The datepicker and scripts are loading and there is no error. Everything seems to be working fine.

    Here are the screenshots:
    https://i.postimg.cc/K8rWzJRF/affiliates-manager-german.png
    https://i.postimg.cc/mDGJ2JSb/affiliates-manager-french.png

  • Author
    Posts
Viewing 11 posts - 1 through 11 (of 11 total)
  • You must be logged in to reply to this topic.
Log In

Featured Addons

  • WooCommerce Coupon Tracking
  • WooCommerce Product Specific Commission

Copyright © 2026 | WordPress Affiliate Manager | Privacy Policy