Hey,
Thanks for the great project.
There seems to be an issue with the latest version of the plugin.
parse error: <path>/main.less on line 1
This error always occurs, independent of the content.
After digging through the source code, there seems to be an issue with the latest update, especially the formatting of the lessc.inc.php
file.
It seems like your formatting tool also formatted string contents breaking the less parser.
One example is lessc.inc.php:2731
Content version 1.0
protected function mediaExpression(&$out) {
$s = $this->seek();
$value = null;
if ($this->literal("(") &&
$this->keyword($feature) &&
($this->literal(":") && $this->expression($value) || true) &&
$this->literal(")"))
{
$out = array("mediaExp", $feature);
if ($value) $out[] = $value;
return true;
} elseif ($this->variable($variable)) {
$out = array('variable', $variable);
return true;
}
$this->seek($s);
return false;
}
However on version 1.1 we have
protected function mediaExpression( &$out ) {
$s = $this->seek();
$value = null;
if ( $this->literal( "( " ) &&
$this->keyword( $feature ) &&
( $this->literal( ":" ) && $this->expression( $value ) || true ) &&
$this->literal( " )" ) )
{
$out = array( "mediaExp", $feature );
if ( $value ) $out[] = $value;
return true;
} elseif ( $this->variable( $variable ) ) {
$out = array( 'variable', $variable );
return true;
}
$this->seek( $s );
return false;
}
Note here the $this->literal( "( " )
with the extra space.
This is just one example, there are bunch more of them.
—
For people having the same issue, a workaround is to download the WP Rollback plugin (or something similar) and downgrade the plugin to version 1.0
until the problem is resolved. (Edit: Do not forget to disable auto update, otherwise it will update automatically)
Hi there,
I’m using
– Lessify WordPress version 1.1
– WordPress 6.1.1
– Avada Theme 7.9.2
– PHP 8.0.27
If I activate Lessify WordPress it produces always a parse error:
parse error: /mnt/web413/a1/20/5440720/htdocs/fr/wp-content/themes/Avada-Child-Theme/less/main.less on line 1
If I deactivate Lessify WordPress there is no parse error, but the layout is broken, because the .less-files are missing.
What is the solution?
Cheers,
Marcello
Hi there,
on a clients website the Plugin Lessify WordPress is used.
More and more hosters are switching now from PHP 7.4 to 8.0, since 7.4 is at the end of its lifetime.
Unfortunately this plugin leads to a crash of the website when PHP 8.0 is activated.
Any chance that you will provide a PHP 8.0 compatible version soon?
BR Christian
Hello,
Is there any update coming to this plugin anytime soon? It has been 11 months and we always check after 6 months to make sure it is still supported. Appreciate your feedback.Thanks!
I am using a child theme, and right now the less css file is showing up before the child theme CSS and therefore is not overriding as it should. I’m not sure how to set this up so that it’s in the right order, and I’d love some help. Thanks!
]]>Hello,
I have a .less file that is compiling to a blank css file. I have other files enqueued that are compiling correctly. I’ve tried deleting the cache and changing the file name and the enqueue handles just to be sure. The cache file says “compiled:0” in part of the array. I’ve checked all the paths and tried using it in a subfolder of the child theme and in the main child theme directory. I’m stumped, it always compiles to 0.
]]>Hi,
I really like this plugin and I’ve been working with it for a while with no problems at all.
The thing is, this time I have a multisite WordPress installation and on the first site everything went fine.. but on the second site, Lessify stopped working. When I make changes to the less file of the theme applied to the second site and upload, it doesn’t update the css file on the uploads folder.
What can I do?
Thanks.
]]>Can one change the output location folder?
]]>Step four of your instructions say to “do like this” and then theres a line of php, but you don’t mention where to insert that line of code. I am assuming it’s in the functions.php but it lacks add action and function tags. Therefore, I am wondering what exactly my functions.php and file structure (I am using a child theme) is supposed to look like.
I have used less on Drupal and it’s module for compiling (which had instructions you could actually follow) so I am familiar with less.
]]>