• Resolved struppi

    (@struppi)


    There is a Problem with the use of jQuery in your Plugin and it will be effected on other plugins. What I did find out is that the Problem is the call of jQuery in the file “source-to-core-image-block.js”

    If I activate your Plugin and edit some content with the gutenberg Editor I get the followig errormessage in the webconsole

    load-scripts.php?c=1&load[chunk_0]=jquery-core,jquery-migrate,underscore,backbone,wp-api-request,wp-api,utils&ver=5.3:8 JQMIGRATE: Migrate is installed, version 1.4.1
    source-to-core-image-block.js?ver=1:241 Uncaught TypeError: $ is not a function

    The reason seems that you need to say you want to use the global $() function. (I am not an expert with the use of Jquery, but I speak Javascript ?? )

    So if I change the line 240 in the file from:

    //Force Source Control Refresh when Clicking over a CORE/Image Block.
    jQuery(document).ready(function() {

    to:

    //Force Source Control Refresh when Clicking over a CORE/Image Block.
    jQuery(document).ready(function($) {

    everything is working again. May there is a other solution. But maybe this helps to avoid this error in future releases.

    Bye.

Viewing 4 replies - 1 through 4 (of 4 total)
Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘issue with jQuery’ is closed to new replies.