• Hi

    Really useful plugin – I have a site which returns a Google Page Speed score of 100!

    One niggle, I have my wordpress installation in a subdirectory and the plugin is not adding the subdirectory path to js files

    Paths are being written as
    /wp-includes/js/comment-reply.min.js
    /wp-includes/js/jquery/jquery.js?ver=1.10.2
    /wp-includes/js/jquery/jquery-migrate.min.js?ver=1.2.1

    instead of
    /wordpress/wp-includes/js/jquery/jquery.js etc

    https://www.ads-software.com/plugins/async-js-and-css/

Viewing 15 replies - 1 through 15 (of 23 total)
  • Plugin Author dmikam

    (@dmikam)

    Ok, I see. Tomorrow if I have some free time, I’ll try to resolve this issue. It looks like I’m ysing the wrong wariable to detect WordPress installation path. Thank you for feedback !

    Thread Starter Easton Bavents

    (@microbe)

    Great. Neat plugin, thanks.

    Plugin Author dmikam

    (@dmikam)

    Hi,

    I think now it’s fixed in the version 1.7.5 – give it a try ??

    Thread Starter Easton Bavents

    (@microbe)

    Hi

    Hmm, doesn’t seem to have done the trick. Looking at the rendered page source it still has some unmodified path info. Looks like where it applies you are pulling the stylesheet directory variable correctly, but the others are not have the installation directory path inserted.

    <script type="text/javascript">
    		asyncScripts = [{"name":"admin-bar","src":"\/wp-includes\/js\/admin-bar.min.js","extra":""},{"name":"comment-reply","src":"\/wp-includes\/js\/comment-reply.min.js","extra":""},{"name":"jquery-core","src":"\/wp-includes\/js\/jquery\/jquery.js?ver=1.10.2","extra":""},{"name":"jquery-migrate","src":"\/wp-includes\/js\/jquery\/jquery-migrate.min.js?ver=1.2.1","extra":""},{"name":"jquery","src":"?ver=1.10.2","deps":["jquery-core","jquery-migrate"],"extra":""},{"name":"jquery-cookie","src":"http:\/\/marchant.ch\/wordpress\/wp-content\/plugins\/cookie-law-info\/js\/jquery.cookie.js","deps":["jquery"],"extra":""},{"name":"cookie-law-info-script","src":"http:\/\/marchant.ch\/wordpress\/wp-content\/plugins\/cookie-law-info\/js\/cookielawinfo.js","deps":["jquery"],"extra":""},{"name":"wintersong-responsive-menu","src":"http:\/\/marchant.ch\/wordpress\/wp-content\/themes\/wintersong-pro\/js\/responsive-menu.js?ver=1.0.0","deps":["jquery"],"extra":""},{"name":"jquery-form","src":"http:\/\/marchant.ch\/wordpress\/wp-content\/plugins\/contact-form-7\/includes\/js\/jquery.form.min.js?ver=3.40.0-2013.08.13","deps":["jquery"],"extra":""},{"name":"contact-form-7","src":"http:\/\/marchant.ch\/wordpress\/wp-content\/plugins\/contact-form-7\/includes\/js\/scripts.js?ver=3.5.2","deps":["jquery","jquery-form"],"extra":"var _wpcf7 = {\"loaderUrl\":\"http:\\\/\\\/marchant.ch\\\/wordpress\\\/wp-content\\\/plugins\\\/contact-form-7\\\/images\\\/ajax-loader.gif\",\"sending\":\"Sending ...\"};"}];

    [Moderator Note: Please post code & markup between backticks or use the code button. Your posted code may now have been permanently damaged by the forum’s parser.]

    Plugin Author dmikam

    (@dmikam)

    Ok, previously I fixed it for stylesheet files. Now it is also fixed for JS files.

    Thread Starter Easton Bavents

    (@microbe)

    Hi

    That’s better, the paths seem to be cleaned up. Great! Thanks v. much.

    Plugin Author dmikam

    (@dmikam)

    You are welcome!

    Any review is welcome ??

    Thread Starter Easton Bavents

    (@microbe)

    Aha, I have found another.

    This is being written out and will obviously give an error –
    {“name”:”jquery”,”src”:”http:\/\/marchant.ch\/wordpress\/”,”deps”:[“jquery-core”,”jquery-migrate”]

    Plugin Author dmikam

    (@dmikam)

    Looks like there is no path defined for this script. Is it defined in the template? Because it doesn’t looks like the default jQuery script definition.

    Thread Starter Easton Bavents

    (@microbe)

    Hi

    Switched off all other plugins using Twenty Twelve it went away I changed to Twenty Thirteen Theme and it popped back up:

    asyncScripts = [{“name”:”admin-bar”,”src”:”http:\/\/marchant.ch\/wordpress\/wp-includes\/js\/admin-bar.min.js”,”extra”:””},{“name”:”comment-reply”,”src”:”http:\/\/marchant.ch\/wordpress\/wp-includes\/js\/comment-reply.min.js”,”extra”:””},{“name”:”jquery-core”,”src”:”http:\/\/marchant.ch\/wordpress\/wp-includes\/js\/jquery\/jquery.js”,”extra”:””},{“name”:”jquery-migrate”,”src”:”http:\/\/marchant.ch\/wordpress\/wp-includes\/js\/jquery\/jquery-migrate.min.js”,”extra”:””},{“name”:”jquery”,”src”:”http:\/\/marchant.ch\/wordpress\/”,”deps”:[“jquery-core”,”jquery-migrate”],”extra”:””},{“name”:”twentythirteen-script”,”src”:”http:\/\/marchant.ch\/wordpress\/wp-content\/themes\/twentythirteen\/js\/functions.js”,”deps”:[“jquery”],”extra”:””}];

    Plugin Author dmikam

    (@dmikam)

    Ok, with Twenty Thirteen I also see it… Give me a moment ??

    Thread Starter Easton Bavents

    (@microbe)

    I am using the latest Genesis theme (Wintersong), which I assume is pulling all the same stuff as Twenty Thirteen.

    Plugin Author dmikam

    (@dmikam)

    Solved !

    It seems that sometimes script can be enqueued without src field but with some dependencies to make it load its deps.

    Thread Starter Easton Bavents

    (@microbe)

    OOPS!!

    Warning: Illegal offset type in /home/marchant/public_html/wordpress/wp-content/plugins/async-js-and-css/functions.php on line 325

    Warning: Illegal offset type in /home/marchant/public_html/wordpress/wp-content/plugins/async-js-and-css/functions.php on line 328

    Hello !

    Give me the same message here: https://clip2net.com/s/5Te4mC

    Thanks,

    Tony

Viewing 15 replies - 1 through 15 (of 23 total)
  • The topic ‘Path Error’ is closed to new replies.