• Resolved wallacelin

    (@wallacelin)


    Hello, I have a staging site for testing theme and plugins updates. I noticed once I updated my X Theme and Cornerstone, I get “Uncaught TypeError: Cannot read property ‘action’ of undefined” at x.js:1. After troubleshooting, I discovered the cause to be W3 Total Cache’s minify settings.

    I tried to add “wp-content/themes/x/framework/dist/js/site/x.js” to “Never minify the following JS files:” but it doesn’t work.

    I went through and tried to disable minify but it seems to throw that error regardless of what I do, unless I deactivate the plugin entirely. Is there anyway I can continue using Total Cache and exclude X Theme scripts and files from minifying? Thank you.

    The page I need help with: [log in to see the link]

Viewing 2 replies - 1 through 2 (of 2 total)
  • The exclusion feature under minify works fine for me. I assume you cleared all the cache (not just the minify cache).

    So when you add “wp-content/themes/x/framework/dist/js/site/x.js” to “Never minify the following JS files:” do you specifically see this file in the page source code when u refresh the page in your browser?

    I wonder if after excluded that the ordering of the “x.js” file is not placed in the right position.

    As a heads up, its very possible that x.js can be minified but it is probably the ordering when it got minified that caused the error. If so, then you can fix this via the w3tc manual mode or via your theme’s code (dequeue/enqueue the js into the correct position)

    Thread Starter wallacelin

    (@wallacelin)

    I ended up having to switch to using WP Fasted Cache due to this error. W3C is a superb and comprehensive caching plugin, but this particular site requires something a little different. I’m still using it on every other websites.

Viewing 2 replies - 1 through 2 (of 2 total)

The topic ‘Exclude X Theme JS from Minifying’ is closed to new replies.