Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error with minify CSS #1

Closed
Ande1232 opened this issue Dec 18, 2016 · 6 comments
Closed

Error with minify CSS #1

Ande1232 opened this issue Dec 18, 2016 · 6 comments
Assignees
Labels

Comments

@Ande1232
Copy link

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
Copy link
Owner

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
Copy link
Author

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
Copy link
Owner

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

dead23angel added a commit that referenced this issue Dec 19, 2016
@dead23angel
Copy link
Owner

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

@dead23angel dead23angel self-assigned this Dec 19, 2016
@Ande1232
Copy link
Author

@dead23angel It's working fine now thanks.

@sergeevizh
Copy link

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants