dead23angel / smarty-combine

Combine and minify many JS or CSS to one file
MIT License
19 stars 9 forks source link

Error with minify CSS #1

Closed Ande1232 closed 7 years ago

Ande1232 commented 7 years ago

Hello i have a problem, I installed the plugin, and it seems it works with JS, and me generate the files in cache. But if I try to create a CSS file gives me this error:

Fatal error: Cannot redeclare class JSMin_UnterminatedStringException in C:\xampp\htdocs\beta\include\librerie\Smarty\plugins\minify\JSmin.php on line 435

This is my code:

`{combine input=array('/beta/_inc/public/plugins/search.js','/beta/_inc/public/plugins/pagination.js','/beta/_inc/public/plugins/load/jquery_load.js') output='/beta/cache/big.js' age='30' debug=false}

{combine input=array('/beta/_inc/public/plugins/owl-carousel/owl.carousel.css','/beta/_inc/public/plugins/font-awesome/css/font-awesome.min.css') output='/beta/cache/big.css' age='30' debug=false}`

dead23angel commented 7 years ago

Hi, @Ande1232! Your error occurs because you have already found in the code JSMin_UnterminatedStringException class.

The easiest way to deal with this mistake is to rename JSMin_UnterminatedStringException class in C:\xampp\htdocs\beta\include\librerie\Smarty\plugins\minify\JSmin.php file Lines 161, 203, 435 Calling for example, you can JSMin_UnterminatedString2Exception

Ande1232 commented 7 years ago

Hi @dead23angel,

I replaced everything as you suggested, unfortunately continues to give me error. The error I've only if I also want to compress css, if I remove the string for the CSS, It created the minify JS files without error.

Fatal error: Cannot redeclare class JSMin_UnterminatedString2Exception in C:\xampp\htdocs\beta\include\librerie\Smarty\plugins\minify\JSmin.php on line 435

dead23angel commented 7 years ago

Hi @Ande1232! Tell me which version you are using Smatry, so I tried to reproduce the bug

dead23angel commented 7 years ago

@Ande1232 I made changes to avoid similar mistakes. Try to update the plugin.

Ande1232 commented 7 years ago

@dead23angel It's working fine now thanks.

sergeevizh commented 7 years ago

Hello. {combine input=array('/design/default/css/bootstrap.css','/design/default/css/tip.css') output='/cache/main.css' age='30' debug=false}

When using style compression, the site stops working. A file is created in the cache folder, but with 0 weight.

Image of Yaktocat