Support » Plugin: Autoptimize » Javascript optimize breaks Twentythirteen mobile menu

  • Resolved Peeter

    (@p33t3r)


    I’m using a child theme of Twentythirteen for my site http://www.machautmachine.com, but when I have javascript optimization enabled the menu breaks when on a small screen.
    I have tried each one of the javascript options, and I have also tried adding functions.js, which I believe contains the offending javascript, to the exclusion list, but the only way to get the menu working properly is to turn off javascript optimization entirely.
    Any ideas?

    http://wordpress.org/plugins/autoptimize/

Viewing 7 replies - 1 through 7 (of 7 total)
  • Plugin Author Frank Goossens

    (@futtta)

    Well, twentythirteen uses jquery so that complicates things. I’d start off by excluding jquery.js and functions.js (which indeed depends on jquery) and see where that brings you.

    that being said; it does work for me (testblog) with the outofthebox twentythirteen and all optimizations active (albeit using what is to become autoptimize 1.7.0), so it might be another jquery-dependancy messing with you … 😉

    The problem seems to be the Use Google libraries plugin. When i deactivate it javascript optimization works fine with the default settings, both in the 1.7.0 beta and in 1.6.6.

    Plugin Author Frank Goossens

    (@futtta)

    Interesting, I’ll give that a try and see if I can reproduce & fix.

    Plugin Author Frank Goossens

    (@futtta)

    Wow, that was a blast; the “use google libraries” plugin uses protocol-less url’s for the javascript source (which is perfectly acceptable). the getpath-function didn’t understand that and had as a result that jQuery wasn’t loaded at all.

    I’ve got it working now with this little fix in wp-content/plugins/autoptmize/classes/autoptimzeBase.php on line 33 or 34, where you’ll have to change

    if(preg_match('#^(https?|ftp)://#i',$path))

    into

    if(preg_match('#^((https?|ftp):)?//#i',$path))

    I’ll make sure to include this in 1.7.0. And thanks for reporting mate!

    Great, thanks!

    Plugin Author Frank Goossens

    (@futtta)

    1.7.0 is live and includes this fix. hope you like it!

    Thanks!
    Have been running the beta with no problems for a while and installed the proper 1.7.0 release this morning. Everything’s running great.

Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘Javascript optimize breaks Twentythirteen mobile menu’ is closed to new replies.