ndeet / plg_system_less

A Joomla! system plugin to compile .less files on the fly.
GNU Lesser General Public License v3.0
17 stars 13 forks source link

Error using lessphp-1.7.0.3 #30

Closed RickR2H closed 9 years ago

RickR2H commented 9 years ago

I use a Joomla Bootstrap 3 template and when I use the plugin to compile LESS on the fly with lessphp-1.7.0.3 I get this error:

Cannot redeclare class lessc in /home/deb3757n303/domains/ippon-personeelsdiensten.nl/public_html/nieuw/libraries/vendor/leafo/lessphp/lessc.inc.php on line 40

I use the latest Joomla version 3.4.3

Hope you have a solution...

ndeet commented 9 years ago

Hi @RickR2H,

this happens usually if some other Plugin does not check if the lessc class has already been loaded by any other plugin. This less compiler checks if that class has been loaded and does not load it itself twice to avoid above error. Like in #29 your issue is may be caused by the template or another plugin?

RickR2H commented 9 years ago

Thanks for pointing me in the right direction! It was a site I didn't develop myself so I disabled all non Joomla core plugins and then it worked! After further investigation it was a plugin called 'System - Brute Force Stop' who messed things up ;)

ndeet commented 9 years ago

Hi, glad you solved it and thanks for reporting back the solution.

RickR2H commented 9 years ago

Thought it was fix, but unfortunately not... As a test I installed a clean version of Joomla 3.4.4 and installed the plugin. Enabling the plugin with less-compiler version 1.7.0.3 and the protostar template gave the same error. Maybe it is something you have to look at...

ndeet commented 9 years ago

Hi @RickR2H thanks again for your feedback. I figured the issue out. If you do not set the "Compression" option to "yes" the compiler uses a custom formatter. This works with with the old leafophp compilers but the new one does not support that. Therefore I removed the custom formatter and just use the "classic" formatter.

So to get it working just enable "compression" in the plugin settings or install the upcoming 0.8.1 version from here: https://github.com/ndeet/plg_system_less/releases/tag/v0.8.1-stable

Would be great if you could report back that it is working now.

RickR2H commented 9 years ago

Nice work @ndeet and thanks for the quick support! Did some tests and the plugin works!