Viewing 8 replies - 1 through 8 (of 8 total)
  • Plugin Author NateWr

    (@natewr)

    Hi Davallen,

    Not sure. Are you using the core jQuery that’s shipped with WordPress, which loads in compatibility mode? Or are you loading your own version of jQuery?

    Thread Starter Davallen

    (@davallen)

    I am using the core jQuery. Just wanted to give you a heads up. I’ve found another plugin to do the job

    Plugin Author NateWr

    (@natewr)

    Cool, glad you were able to find another solution. Not sure what the issue is but first I’ve heard of it.

    Thread Starter Davallen

    (@davallen)

    Yeah, it was weird. But with the other plugin, I had to work an hour, debugging and rearranging the script queue, in order to make it work.
    The wirst part is, it was a fresh install wit some very minor tweaks in a child theme

    Same issue here with Enlighter

    https://github.com/AndiDittrich/WordPress.Enlighter/issues/30

    Were you using this plugin Davallen? Or perhaps another one that ships with moottools?

    Hi, im the author of the mentioned Enlighter plugin.
    im currently debugging the issue and it is related to MooTools or other Frameworks/Plugins which **extends the Native Types**.

    @natewr
    i like your plugin! therefore i’ve fixed the following issues. finally your plugin works together with MooTools / Enlighter ??

    **First Issue**

    TypeError: asset.src is undefined
    Source: https://wordpress.localnet/wp-content/plugins/asset-queue-manager/assets/js/aqm.js?ver=4.4.2
    Line: 185

    it seems that the javascript function getAssetURL does not check if asset/asset.src is defined. therefore asset.src.toString(); will fail in this case and the error message is not set to invisible.
    i’ve created to following fix – generally a toString() on undefined attributes/objects should never called!

    getAssetURL : function( asset ) {
       if (!asset || !asset.src){return 'false';}

    **Second Issue**

    In the aqmPanel function, there is a cascade of for .. in loops to append the assets to the panel, but the check of hasOwnProperty() is missing, therefore (on extended Types) the loop will fail @see https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/for…in .
    I’ve fixed this by using jQuerys build-in function $.each to avoid this error.

    var T = this;
    $.each(aqmData.assets, function(loc_key, loc){
        // required for array/object type - maybe the aqmData structure should changed or remove the outer loop
        if ($.type(loc) != 'array' && $.type(loc) != 'object'){
            return;
        }
    
        $.each(loc, function(type_key, type){
    
            $.each(type, function(key, asset){
                T.appendAsset(asset, loc_key, type_key );
            });
    
        });
    
    });

    i hope this will help you and continue with your great work.

    best regards, Andi

    Plugin Author NateWr

    (@natewr)

    Thanks Andi! I saw your PR and will evaluate it for merge as soon as I get a chance. Much appreciated.

    Plugin Author NateWr

    (@natewr)

    Thanks to Andi this has been fixed in the version of Asset Queue Manager I just pushed out (v1.0.3).

Viewing 8 replies - 1 through 8 (of 8 total)
  • The topic ‘Getting an error because jQuery isn't loading’ is closed to new replies.