matthiasmullie / minify

CSS & JavaScript minifier, in PHP. Removes whitespace, strips comments, combines files (incl. @import statements and small assets in CSS files), and optimizes/shortens a few common programming patterns.
https://matthiasmullie.github.io/minify/
MIT License
1.97k stars 309 forks source link

Something, somewhere, somehow failed! Did you post a link to an unreachable script? #331

Open JFM74 opened 4 years ago

JFM74 commented 4 years ago

Just trying to minify a simple function, there is no link to an unreachable script.

Using latest Firefox on desktop PC.

BriceLof commented 4 years ago

I've the same issue. Someone knows how to fix this that ?

enricodias commented 4 years ago

In order for someone to help you, you need to provide an example of code that results in this error.

JFM74 commented 4 years ago

Here you go:

function example() { alert("horrible error message"); }

enricodias commented 4 years ago

I managed to minify this normally using the lib locally, but not in the minifier's website. Apparently something in the website is restricting the function alert().

The current website is not hosted at github, so only the owner can fix it.

alxweasley commented 4 years ago

Something so simple like this its returning that error:

function somethingToDo(){
 if(true){
   console.log('Error');
 }
}

Will give it a try locally.

CaptFredricks commented 4 years ago

I'm getting this error even from simple if/else statements like this one:

if(!$(this).hasClass('selected')) {
    // do something
} else {
    // do something else
}

It's really frustrating.

tdiprima commented 4 years ago

@matthiasmullie the minifier website is crashing, and I think that's why it's throwing the "something... failed!" message. It's trying to reach minify.php and getting a 403 Forbidden error:

POST https://www.minifier.org/minify.php 403

minify.php is the form action. Could this be simply because the file name is different? Minify.php with a capital letter?