• Resolved mw815371

    (@mw815371)


    Hi there,

    the plugins I use, which seem to cause the problem:
    – Autoptimize 2.7.2
    – Async Javascript 2.20.03.01

    As I use the Learnpress Plugin I excluded it from being cached from both of the above plugins. Still it seems it gets included and causes the Learnpress Course popup not to work as it should.

    The option “Aggregate JS-files” is activated. But it makes no difference when it is deactivated. The problem persists.

    When both of the above plugins are deactivated, all pages including the learnpress lesson pages are rendered as they should.

    Thus I activated the plugins one by one, but no matter which I activate the problem persists.

    I even tried different to exclude entries like: wp-content/plugins/learnpress/ or wp-content/plugins/learnpress/assets/js/ which had no effect.

    If both plugins are activated and I visit a learnpress lesson page as an administrator all works fine, as I have disabled the caching of logged-in users and admins in autoptimize.

    Though, what do I need to do to exclude the learnpress plugin from being cached?

    Thanks for your help and of course the great plugins, which normally work just fine.

    Cheers,
    Stephan

Viewing 5 replies - 1 through 5 (of 5 total)
  • Plugin Author Optimizing Matters

    (@optimizingmatters)

    OK, let’s start by first looking into Autoptimize, disable AsyncJS for now.

    Now for starters; assuming the learnpress plugin is in wp-content/plugins/learnpress then adding that exact string to the exclusions should work. The way to check if the exclusions work is by checking the HTML source of the optimized page, which in that case should have one or more learnpress JS listed.

    If the exclusion works (as in; you can see the learnpress JS in the HTML source) but learnpress is still broken, then untick the “minify excluded CSS/ JS” option and test again.

    If with the exclusion and the “minify excluded” option off the problem persists, then open the browser console, look for JavaScript errors and paste those here so I can review.

    frank

    Thread Starter mw815371

    (@mw815371)

    Hi Frank,

    well, it seems that some files still get cached. Tried “minify excluded” off which had no impact.

    Here are the console outputs:
    – Learnpress Excluded https://pasteboard.co/Ja26Kxc.png (lesson pages do not work correctly)
    – Admin View https://pasteboard.co/Ja27lvS.png (all works as intended)
    – Plugins Deactivated https://pasteboard.co/Ja27A0e.png (all works as intended)

    The file which seems to get included in Autoptimize when Learnpress is excluded could be found under wp-content/plugins/learnpress/assets/js/frontend (course.js).

    The errors shown for Deactivated Plugins are related to fonts and a chrome extension, thus no problem I care about right now.

    AsyncJS on/off doesn’t make any difference. The console output is the same.

    Thanks for your help.

    Cheers,
    Stephan

    Plugin Author Optimizing Matters

    (@optimizingmatters)

    _ is not defined is due to underscore (part of WordPress core) not being available, try adding wp-includes/js to the JS optimization exclusion list.

    Thread Starter mw815371

    (@mw815371)

    Hi Frank,

    adding wp-includes/js to the JS optimization exclusion list worked.

    Now the learnpress lesson pages work as they should.

    Thanks for your help. I really appreciate it!

    Have a great day.

    Cheers,
    Stephan

    Plugin Author Optimizing Matters

    (@optimizingmatters)

    you’re welcome, feel free to leave a review of the plugin and support here! ??

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Exclude Scripts/Plugins not working’ is closed to new replies.