• Hi, nice to meet you. I’m writing because we use your plugin and since the last wordpress update to version 5.6, the plugin throws many jquery errors.

    We have partially deactivated the plugin and the errors disappeared, but if we reactivate it, the web ends offline due to these errors and our server has told us to fix it or they will cancel our hosting service.

    Could you please help us to resolve this problem, we cannot deactivate your plugin as is necessary in our site as we use regions for all our jobs urls and now don′t know what to do or how to proceed.

    Thank you for your help.

    jquery.min.js:2 jQuery.Deferred exception: i(...).chosen is not a function TypeError: i(...).chosen is not a function
        at Object.addSubmission (https://www.xxxxxxxxxxxxxxxxxxx.work/wp-content/plugins/wp-job-manager-locations/assets/js/main.min.js:1:1809)
        at HTMLDocument.<anonymous> (https://www.xxxxxxxxxxxxxxxxxxx.work/wp-content/plugins/wp-job-manager-locations/assets/js/main.min.js:1:1682)
        at HTMLDocument.dispatch (https://c0.wp.com/c/5.6/wp-includes/js/jquery/jquery.min.js:2:43090)
        at HTMLDocument.v.handle (https://c0.wp.com/c/5.6/wp-includes/js/jquery/jquery.min.js:2:41074)
        at Object.trigger (https://c0.wp.com/c/5.6/wp-includes/js/jquery/jquery.min.js:2:71513)
        at s.fn.init.triggerHandler (https://c0.wp.com/c/5.6/wp-includes/js/jquery/jquery.min.js:2:72192)
        at HTMLDocument.<anonymous> (https://c0.wp.com/c/5.6/wp-includes/js/jquery/jquery-migrate.min.js:2:8598)
        at e (https://c0.wp.com/c/5.6/wp-includes/js/jquery/jquery.min.js:2:30005)
        at t (https://c0.wp.com/c/5.6/wp-includes/js/jquery/jquery.min.js:2:30307) undefined
Viewing 15 replies - 1 through 15 (of 15 total)
  • Thread Starter ibiza69

    (@ibiza69)

    Not sure if this helps, we have activated in our Cpanel: PHP-FPM. Nothing else that could make all our sites go down.

    Thread Starter ibiza69

    (@ibiza69)

    Seems not support at all here. Is this plugin still maintained? Did you see that there is a problem with Jquery and this last wordpress version, that makes website go offline? Is there someone there?

    We have the same issue!
    Any news on this?

    Thread Starter ibiza69

    (@ibiza69)

    I wrote them thru their support at developers site and here is their answer!!!!!!!!! Flipping!!

    Hope you are doing well and thanks for reaching out.

    Here we have two options either we can switch to the downgraded version of WordPress, or

    We can help you with this which would cost you 200USD.

    “Let me know if there’s anything else I can do for you. I’m happy to help.”

    Thanks again for contacting Xtendify Technologies

    Best Regards

    Thread Starter ibiza69

    (@ibiza69)

    I’m not sure if is possible to write WordPress Team to share with them this type of developers that ask for money for solving their plugin problem. Is unnaceptable!!

    I also have problems with the jquery, devs, any updates on when this will be addressed?

    For those that want this fixed without having to rely on a jQuery downgrade, and are comfortable with editing their theme files, just download and enqueue chosen.min.js and chosen.css from https://github.com/harvesthq/chosen/releases (just use the latest .zip) – I get no more front end JS errors after doing this.

    • This reply was modified 3 years, 5 months ago by James Morton.
    • This reply was modified 3 years, 5 months ago by James Morton.
    Thread Starter ibiza69

    (@ibiza69)

    Hi @stylishjm!! As we have our site offline once daily because this plugin not being updated.

    The thing is that we didn′t underestand how to enqueue those files at theme, I mean that probably won′t be as easy as just including them at functions.php, isn′t it?

    Thanks for taking your time to help WP community members!!!!, not as plugin developers from Astoundify, a supposedly serious company that has us stranded with this very serious problem for months and that asked for 200$ by email for fixing it!!

    Hi @ibiza69

    Here’s the exact steps I took:

    1 – Download the zip file “chosen_v.1.8.7.zip” from https://github.com/harvesthq/chosen/releases

    2 – Extract chosen.jquery.min.js and place it in your theme folder (for this mini-guide, I’ll be placing them in a folder named “js” in my theme folder).

    3 – Extract chosen.css and place it in your theme folder (again, for this miniguide, I’ll be placing them in a new folder named “css” within my theme’s folder).

    4 – In your themes’ functions.php file:

    4a – If you have an existing function that uses the wp_enqueue_scripts hook, simply place the following inside that function, preferably before your style.css is enqueued:

    	wp_register_script( 'jm-chosen-js', get_stylesheet_directory_uri().'/js/chosen.jquery.min.js', array( 'jquery' ), '', true );
    	wp_enqueue_script( 'jm-chosen-js' );	
    
    	wp_register_style( 'jm-chosen-css', get_stylesheet_directory_uri().'/css/chosen.css');
    	wp_enqueue_style( 'jm-chosen-css' );

    4b – If you don’t have an existing function, or are not sure, just add this in your functions.php file:

    function jm_theme_enqueue_styles() {
    		
    	wp_register_script( 'jm-chosen-js', get_stylesheet_directory_uri().'/js/chosen.jquery.min.js', array( 'jquery' ), '', true );
    	wp_enqueue_script( 'jm-chosen-js' );	
    
    	wp_register_style( 'jm-chosen-css', get_stylesheet_directory_uri().'/css/chosen.css');
    	wp_enqueue_style( 'jm-chosen-css' );
    		
    }
    add_action( 'wp_enqueue_scripts', 'jm_theme_enqueue_styles' );

    Give that a go and let me know how it goes.

    Thread Starter ibiza69

    (@ibiza69)

    Thank you very much @stylishjm for your enormous kindness and for taking the time to explain it so, so, well!

    We have proceeded following the steps indicated, in this case in the Child Theme, but we imagine that it is the same, since we created the js and css folders within it, as well as the code in its functions.php

    Hopefully this solves the serious daily problem that we have been suffering for months, having to rename the config.php, every time the web crashes because of this plugin (to be able to recover it again), and on which our jobs website depends entirely.

    THANK YOU @stylishjm, you won a great cold beer! A big hug from Spain!

    Found an alternative fix that does not require Chosen.min.js to be enqueued.

    Simply locate main.js in /wp-content/plugins/wp-job-manager-locations/assets/js and go to line 136 – you’ll see the below:

    addSubmission: function() {				
    	$( '#job_region, #resume_region' ).chosen({
    		search_contains: true
    	});				
    },

    You’ll need to wrap that chosen code within the function like so:

    addSubmission: function() {				
    	if ( $.isFunction($.fn.chosen) ) {
    		$( '#job_region, #resume_region' ).chosen({
    			search_contains: true
    		});	
    	}			
    },

    Next, copy all the contents of main.js and minify it using an online tool like https://javascript-minifier.com/, and then replace the code in main.min.js with your newly modified code.

    You’ll no longer see errors, and the regions dropdown will render correctly as a Select2 element, rather than a Chosen element.

    Thread Starter ibiza69

    (@ibiza69)

    Hi @stylishjm and once more, thank you! You know that our website keeps falling after doing the other option, for same thing :S

    We shall try this one, but we are confussed about steps, for example this one:

    “Next, copy all the contents of main.js and minify it using an online tool like https://javascript-minifier.com/, and then replace the code in main.min.js with your newly modified code.”

    Don′t have clear which contents, I mean, we have to add there too the one from wp job manager locations? and how to if this it? sorry…. ??

    OR, maybe you have the final code?

    • This reply was modified 3 years, 5 months ago by ibiza69.
    Thread Starter ibiza69

    (@ibiza69)

    Hi @stylishjm didn′t solve the problem, our site keeps falling all the time (every few hours), we have to edit the config.php file, so all the backgroud processes stop and so site returns. We included your 1st fix, not the second one as we didn′t underestand how to proceed well. Any other idea how could we do, it’s terrible, we have to be on this since so many, many months that is crazy, over and over, fixing the site. Thanks once more for your time or if anyone else know a fix, we would really appreciate.

    Thread Starter ibiza69

    (@ibiza69)

    Hi @minabokningar, wroted him yesterday morning a 10am. Awaiting his answer/comments.

    I shall let you all know when he gets back to me. Thank you.

    Thread Starter ibiza69

    (@ibiza69)

    Hi again @minabokningar, I got answer from Brian: “sorry that you are facing this issue. We have not been able to replicate the issue from our end”

    So, he asked me to share with him our plugins installed and so lot.

    I explained to him that none of our plugins are giving any error (as for example we have 5 sites all with same plugins 100%, but only one site has their their plugin installed and that site is the one giving problem of being offline every 2-3 hours) and too shared with him, the Google Dev tools errors, that the only plugin giving jquery problems is theirs (same errros as I posted in this thread), and that are the same all users are facing, probably as the plugin hasn′t being updated in last 3 major wordpress realeases and Jquery that hasn′t being updated… as needed.

    We spoked all this time with our system admins and hosting company and both after reviewing told us that the problem was this plugin, not other, that didn′t have jquery updated and that made the site go offline.

    So, we are here, awaiting for Brians answers again, to see if they have the intention to update their plugin.

    Here are the Google Dev tools errors again:

    jQuery.Deferred exception: i(...).chosen is not a function TypeError: i(...).chosen is not a function
        at Object.addSubmission (https://www.website.com/wp-content/plugins/wp-job-manager-locations/assets/js/main.min.js:1:1809)
        at HTMLDocument.<anonymous> (https://www.website.com/wp-content/plugins/wp-job-manager-locations/assets/js/main.min.js:1:1682)
        at HTMLDocument.dispatch (https://c0.wp.com/c/5.8/wp-includes/js/jquery/jquery.min.js:2:43064)
        at HTMLDocument.v.handle (https://c0.wp.com/c/5.8/wp-includes/js/jquery/jquery.min.js:2:41048)
        at Object.trigger (https://c0.wp.com/c/5.8/wp-includes/js/jquery/jquery.min.js:2:71515)
        at s.fn.init.triggerHandler (https://c0.wp.com/c/5.8/wp-includes/js/jquery/jquery.min.js:2:72194)
        at HTMLDocument.<anonymous> (https://c0.wp.com/c/5.8/wp-includes/js/jquery/jquery-migrate.min.js:2:8598)
        at e (https://c0.wp.com/c/5.8/wp-includes/js/jquery/jquery.min.js:2:30038)
        at t (https://c0.wp.com/c/5.8/wp-includes/js/jquery/jquery.min.js:2:30340) undefined
    S.Deferred.exceptionHook @ jquery.min.js:2
    jquery.min.js:2 Uncaught TypeError: i(...).chosen is not a function
        at Object.addSubmission (main.min.js:1)
        at HTMLDocument.<anonymous> (main.min.js:1)
        at HTMLDocument.dispatch (jquery.min.js:2)
        at HTMLDocument.v.handle (jquery.min.js:2)
        at Object.trigger (jquery.min.js:2)
        at s.fn.init.triggerHandler (jquery.min.js:2)
        at HTMLDocument.<anonymous> (jquery-migrate.min.js:2)
        at e (jquery.min.js:2)
        at t (jquery.min.js:2)
Viewing 15 replies - 1 through 15 (of 15 total)
  • The topic ‘WP 5.6 makes web to go offline (jquery problems)’ is closed to new replies.