Subscribe via
Welcome, Guest. Please login or register.
Did you miss your activation email?
 OMNINOGGIN ForumPlugin SupportWP MinifyException while minifying js
Pages: [1]
Print
Author Topic: Exception while minifying js  (Read 704 times)
margolis
Newbie
*
Posts: 1


View Profile Email
« on: December 03, 2009, 07:40:57 AM »

Hi,

First of all, cool plugin. It does a good job. Usually. But I can't use it because of a strange problem.

When I first activate it everything works just fine.

If I wait a while (I guess it's something to do with caching) - I start getting exception from the URL that returns the minified js. Not getting HTTP error - it returns a page with an exception stack trace (exception in JSMin about unterminated string literal).

It looks like this exception is caused by a cache file that contains the HTML of the blog and not any JS. This of course throws an exception since it's not anything valid for minification.

So, why would the plugin cache the blog page? Is there anyway to fix this? I would love to be able to use it.

Thanks.
Logged

Thaya
Administrator
Sr. Member
*****
Posts: 420



View Profile WWW Email
« Reply #1 on: December 03, 2009, 11:00:33 AM »

Hi Margolis,

It sounds like one of the JavaScript URLs are returning HTML (probably a broken JavaScript URL).

WP Minify caches the content only if the JavaScript URL is external to the domain or if the JavaScript URL doesn't end with ".js".  WP Minify does not know how to detect whether the content being returned from a JavaScript URL is actually JavaScript or not.

You best bet is to identify which JavaScript URL is returning HTML, and fix it (make it return JavaScript) or exclude it in the WP Minify exclusion list. See http://omninoggin.com/wordpress-posts/how-to-troubleshoot-wp-minify/ for more info on how to troubleshoot WP Minify.
Logged

Pages: [1]
Print
Jump to: