• Resolved Joe

    (@joewa1980)


    For some reason I can’t tick/untick any of the boxes within the FQP admin area itself (for example page /wp-admin/admin.php?page=eos_dp_by_post_type&eos_dp_post_type=job_listing).

    The following errors are shown in the console.

    I should add that I AM able to tick/untick on individual posts/pages, but we need to modify some post type plugins so would like to get functionality back!

    admin.php?page=eos_dp_by_post_type&eos_dp_post_type=job_listing:205 Uncaught ReferenceError: jQuery is not defined
        at admin.php?page=eos_dp_by_post_type&eos_dp_post_type=job_listing:205:2
    22:19:00.178 admin.php?page=eos_dp_by_post_type&eos_dp_post_type=job_listing:4923 Uncaught ReferenceError: jQuery is not defined
        at admin.php?page=eos_dp_by_post_type&eos_dp_post_type=job_listing:4923:3
        at admin.php?page=eos_dp_by_post_type&eos_dp_post_type=job_listing:4966:4

    Thank you!

Viewing 3 replies - 1 through 3 (of 3 total)
  • Thread Starter Joe

    (@joewa1980)

    This is because we use jQuery Migrate. Temporarily altering the behaviour of jQuery Migrate to a newer jQuery version allows your plugin to function. Anyone else experiencing the same issue might find this workaround useful.

    Plugin Author Jose

    (@giuse)

    Thank you very much Joe for reporting a workaround.

    It looks like one of the plugins or the theme inlines jQuery code inside the HTML before the jQuery library is called. I say so because FDP doesn’t inline any jQuery code inside the HTML, and as far as I know, even the core does not.
    Probably for some reason when you activate jQuery Migrate the call to the jQuery library is moved after the inlined jQuery code. Because the library is loaded later, jQuery is not defined and that inlined code triggers a JavaScript error that stops the JS execution before the JavaScript of FDP can run.

    The same issue doesn’t happen on other backend pages because in the FDP setting pages a lot of scripts of the core and other plugins are disabled. Usually, one of those disabled scripts calls jQuery in the head, so probably before the inlined jQuery code.

    You have already solved it, but if you want to use jQuery Migrate on all other pages, you can disable it only in the FDP setting pages by adding this line of code in wp-config.php:

    define( 'FDP_DISABLE_IN_FDP_PAGE',array( 'enable-jquery-migrate-helper/enable-jquery-migrate-helper.php' ) );

    I suppose you are using the plugin Enable jQuery Migrate Helper. If not so, you should replace the plugin path with the plugin that you are using.

    I will also check if I can prevent this issue when jQuery Migrate is active.

    @joewa1980

    Thread Starter Joe

    (@joewa1980)

    That’s a great idea @giuse – I’ll try that tomorrow. However, it also served as a reminder that we’ve ironed out almost all issues Enable jQuery Migrate Helper was employed to help with, so it wouldn’t be a bad time to fix the last issues and then remove it fully from our sites.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Cannot tick/untick – jQuery issue’ is closed to new replies.