As reported by @dreamermates, in this unresolved thread, errors are thrown from the filterVersions
method in lib/Garbagecollector.class.php
. This line:
preg_match_all('#^(?P<group>.+)-(?P<token>[^\-\.]+).css$#sU', $file, $m, PREG_SET_ORDER);
is using the wrong function. It should be this (note the pattern is also fixed):
preg_match('#^(?P<group>.+)-(?P<token>[^-.]+)\.css$#sU', $file, $m);
This causes lots of Undefined array key “group” warnings but mainly fails to do its task.
]]>When I updated this plug in it cause the site to crash with a 500 error. Here is the error messages.
Warning: preg_replace(): Compilation failed: unmatched closing parenthesis at offset 19 in D:\hshome\express\dirtypawdogwash.com\wp-content\plugins\wp-less\lib\Stylesheet.class.php on line 88
Warning: file_get_contents(D:/hshome/express/dirtypawdogwash.com/wp-content): failed to open stream: Permission denied in D:\hshome\express\dirtypawdogwash.com\wp-content\plugins\wp-less\vendor\wikimedia\less.php\lib\Less\Parser.php on line 681
I have not seen an update to this forum in over ten months, is this plug in dead?
]]>When I deactivate the plugin several sizes, and fonts are missing. How can I safely uninstall this plugin?
]]>For debugging purposes I have installed a wordpress instance on my local xampp install. Then I got the following errors:
PHP Warning: preg_replace(): Compilation failed: unmatched closing parenthesis at offset 19 in C:\xampp\htdocs\debug\wp-content\plugins\wp-less\lib\Stylesheet.class.php on line 88
[01-Feb-2022 13:36:39 UTC] PHP Warning: file_get_contents(C:/xampp/htdocs/red-devils/wp-content): failed to open stream: Permission denied in C:\xampp\htdocs\debug\wp-content\plugins\wp-less\vendor\wikimedia\less.php\lib\Less\Parser.php on line 682
I’ve investigate what was the cause of this issues and found out, that the usage of the DIRECTORY_SEPARATOR constant in the preg_replace call was causing the trouble.
On Windows this constant has the value \ which has to be escaped in a regular expression. But on the value it runs against / is used as directory separator so escaping won’t fix the issue.
I solve the issue by replacing the constant DIRECTORY_SEPARATOR with “/” only in the preg_replace call.
Before:
$lessfile_in_theme = preg_replace ('#^.*?' . DIRECTORY_SEPARATOR . $wp_content_dir . DIRECTORY_SEPARATOR . '(.*)$#', '$1', $this->stylesheet->src, 1); // the part after 'wp-content'
After:
$lessfile_in_theme = preg_replace ('#^.*?/' . $wp_content_dir . '/(.*)$#', '$1', $this->stylesheet->src, 1); // the part after 'wp-content'
Your plugin ignores any WP constants which might be set to change the wp-content folder, like which is used in https://roots.io/bedrock/.
See a list of WP constants here.
When I use the aforementioned setup, your plugin tries to retrieve assets from
/var/www/html/web/app/https://subdomain.127.0.0.1.nip.io/app/themes/boo-child/style.less
.
So that won’t work.
]]>In the debug log, we’re frequently having the following info:
PHP Notice: Undefined index: group in /www/htdocs/{…}/wp-content/plugins/wp-less/lib/Garbagecollector.class.php on line 86.
Partially 7 lines are thrown after each other in the same second referring to lines 86/88/91.
Could you support here / provide a fix that this is not logged to the error log?
Thx in advance!
P. S.: Our earlier post regarding that was deleted (not closed). We don’t know why. If sth. is wrong with this post, please let us know. Thx!
]]>On a regular base and on different sites, the following exceptions are thrown in our debug log:
PHP Notice: Undefined index: port in /www/htdocs/{…}/wp-content/plugins/wp-less/lib/Plugin.class.php on line 312
PHP Notice: Undefined index: path in /www/htdocs/{…}/wp-content/plugins/wp-less/lib/Plugin.class.php on line 312
PHP Notice: Undefined index: extension in /www/htdocs/{…}/wp-content/plugins/wp-less/lib/Plugin.class.php on line 316
We cannot find any problem within our code.
Could you support here?
Many thanks in advance!
[Moderator note: Please, No bumping].
]]>According to my experience this week and some digging done by my website host, the new update of WP-LESS is incompatible with my website’s theme.
Per my website host:
“Essentially this conflict is arising specifically when the newest version of wp-less and the Bluestem theme are both installed and activated. I did some testing on a cloned sandbox environment and the critical error disappears when the theme is swapped and it only arises when both the Bluestem theme is active and the WP Less plugin is active on the newest version.
As mentioned above, I was able to uncover a Fatal Error that corresponds to this critical error you’re seeing. It looks like the WP Less plugin is doing some weird URL alteration to the file paths when requesting style.less file. Notice how it injects the full URL smack dab in the middle of the file path and even includes the HTTPS protocol:
PHP Fatal error: Uncaught Exception: load error: failed to find /www/wp-content/https://automatic-ground.flywheelsites.com/wp-content/themes/bluestem/assets/less/style.less in /www/wp-content/plugins/wp-less/vendor/wikimedia/less.php/lessc.inc.php:144`
We don’t have any special configurations on this site that would cause that file request to be malformed so it’s most certainly coming from the WP Less plugin.”
I hope to hear soon from the plugin developers so we can get this patched up.
]]>Just updated from 1.8.0 to 1.9.3 and it appears the Wikimedia parser that is being used since 1.9 is handling relative paths differently from the Oyejorge one that was used in previous versions.
Got a LESS file:
/less/index.less
That file @imports another LESS file:
/less/webfonts/webfonts.less
In that file, a web font is embedded using a relative path, like so:
@font-face {
font-family: "MyFontName-Regular";
src: url('mywebfont/font.woff2') format('woff2'), url('mywebfont/font.woff') format('woff');
}
The Oyejorge parser used to resolve the path in the web font relative to the current LESS file:
/less/webfonts/mywebfont/font.woff2
The Wikimedia parser resolves the path in the web font relative to the main LESS file:
/less/mywebfont/font.woff2
Not sure which behaviour is the desired one. Rolling back to 1.8.0 for now (wondering why that isn’t possible directly from the archive?)
]]>Hi,
I am running into similar issues to others here in that the plugin is taking down my website. Similar to a couple others, I’m using the Stack WordPress theme, hosted by WordPress.
It is saying there is a critical error.
These look like they’re helpful on fixing this, or in figuring out the cause:
https://github.com/oncletom/wp-less/issues/122
similar to
https://www.ads-software.com/support/topic/version-1-9-compile-error/ (I tried Kari’s solution at the bottom but it did not work)
Here’s what it spit out:
Fatal error: Uncaught Error: Class 'WPLessStylesheet' not found in /srv/htdocs/wp-content/plugins/wp-less/lib/Plugin.class.php:42 Stack trace: #0 /srv/htdocs/wp-content/plugins/wp-less/lib/vendor/plugin-toolkit/BasePlugin.class.php(104): WPLessPlugin->__construct(Object(WPLessConfiguration)) #1 /srv/htdocs/wp-content/plugins/wp-less/lib/Loader.class.php(23): WPPluginToolkitPlugin::create('WPLess', '/srv/htdocs/wp-...', 'WPLessPlugin') #2 /srv/htdocs/wp-content/plugins/wp-less/bootstrap.php(22): WPLessPluginLoader::load(Object(Closure)) #3 /wordpress/core/5.8.1/wp-admin/includes/plugin.php(2286): include_once('/srv/htdocs/wp-...') #4 /wordpress/core/5.8.1/wp-admin/plugins.php(191): plugin_sandbox_scrape('wp-less/bootstr...') #5 {main} thrown in /srv/htdocs/wp-content/plugins/wp-less/lib/Plugin.class.php on line 42
And,
Uncaught Exception: load error: failed to find NANless’ in /srv/htdocs/wp-content/plugins/wp-less/vendor/wikimedia/less.php/lessc.inc.php:144
Stack trace:
#0 /srv/htdocs/wp-content/plugins/wp-less/vendor/wikimedia/less.php/lessc.inc.php(242): lessc->compileFile('NANless\xE2\x80\x99')
#1 /srv/htdocs/wp-content/plugins/wp-less/lib/Compiler.class.php(75): lessc->cachedCompile('NANless\xE2\x80\x99', true)
#2 /srv/htdocs/wp-content/plugins/wp-less/lib/Plugin.class.php(255): WPLessCompiler->cacheStylesheet(Object(WPLessStylesheet), true)
#3 /srv/htdocs/wp-content/plugins/wp-less/lib/Plugin.class.php(285): WPLessPlugin->processStylesheet('ebor-theme', false)
#4 wp-includes/class-wp-hook.php(301): WPLessPlugin->processStylesheets()
#5 wp-includes/class-wp-hook.php(327): WP_Hook->apply_filters(NULL, Array)
#6 wp-includes/plugin.php(470): WP_Hook->do_action(Array)
#7 wp-includes/script-loader.php(2083): do_action('wp_enqueue_scri...')
#8 wp-includes/class-wp-hook.php(303): wp_enqueue_scripts('')
#9 wp-includes/class-wp-hook.php(327): WP_Hook->apply_filters(NULL, Array)
#10 wp-includes/plugin.php(470): WP_Hook->do_action(Array)
#11 wp-includes/general-template.php(3015): do_action('wp_head')
#12 /srv/htdocs/wp-content/themes/stack/header.php(9): wp_head()
#13 wp-includes/template.php(770): require_once('/srv/htdocs/wp-...')
#14 wp-includes/template.php(716): load_template('/srv/htdocs/wp-...', true, Array)
#15 wp-includes/general-template.php(48): locate_template(Array, true, true, Array)
#16 /srv/htdocs/wp-content/themes/stack/page_no_sidebar.php(3): get_header()
#17 wp-includes/template-loader.php(106): include('/srv/htdocs/wp-...')
#18 wp-blog-header.php(19): require_once('/wordpress/core...')
#19 index.php(17): require('/wordpress/core...')
#20 {main}
thrown
]]>
Hello, I am getting this error? Please tell me how to fix this?
]]>My WP Less plugin is causing critical errors and reverting old theme colours etc into my current layout. Please help me!
I followed your steps in the other post about the same issue and updated to wp_config. Php file
Notice: Trying to access array offset on value of type bool in /home/alchemyo/public_html/wp-content/plugins/Ebor-Framework-master/ebor_cpt.php on line 169
Notice: Trying to access array offset on value of type bool in /home/alchemyo/public_html/wp-content/plugins/Ebor-Framework-master/ebor_cpt.php on line 240
Deprecated: Unparenthesized a ? b : c ? d : e
is deprecated. Use either (a ? b : c) ? d : e
or a ? b : (c ? d : e)
in /home/alchemyo/public_html/wp-content/plugins/js_composer/include/classes/editors/class-vc-frontend-editor.php on line 673
My website is based on WordPress and the so-called ‘Hygge’ theme. I did no changes to the Website, but the website started to display a parse error: “Parse error: syntax error, unexpected ‘const’ (T_CONST), expecting variable (T_VARIABLE) in /home/customer/www/tracemaker.com/public_html/wp-content/plugins/wp-less/vendor/wikimedia/less.php/lib/Less/Version.php on line 11”
I updated Wp less but the situation got worse (i.e., I cannot access to the wp-admin login page). I suppose that the Wp less plugin is not compatible with the latest WordPress version, or with the current PHP version. How can I solve the problem?
]]>Awesome to see an update to this plugin!
Entering this in a less file:
clip-path: ~"url(#myClip)";
Results in:
clip-path: url(https://example.com/wp-content/themes/theme/assets/css/#myClip);
Can this be fixed/changed please?
]]>I see this error on admin pages:
Notice: Undefined index: port in wp-content/plugins/wp-less/lib/Plugin.class.php on line 312
]]>Hi there,
All of a sudden, there is a critical error on my site which is fixed when deactivating WP LESS. However, if I do so, I loose all the styling settings.
Any ideas what is causing this?
Thanks
]]>after updating new version site crushed ”there has been a critical error on your website” site health says your site cannot be found by search engines. index problem caused. i removed app and site work fine now. just lost my color settings.
]]>Having an issue with using the WP-Less plugin, auto updated from version 1.8 and since then my website shows critical error, restore from backup and remove the plugin and the site works fine.
Using the Stack WordPress Theme.
Getting this error with every version of WP-Less.
My site auto-upgraded to 1.9, had a compile error with the plugin, and went down as a result. It’s hosted with WordPress.com so I can’t imagine the hosting or ops setup is an issue. Error also doesn’t look to be an interaction with any plugin or theme, since the error seems to be contained to the wp-less folder – but I could totally be wrong there.
Current theme: Stack Child (version 10.5.21)
Current plugin: WP LESS (version 1.9.0)
PHP version 7.3.30
Error Details
=============
An error of type E_COMPILE_ERROR was caused in line 50 of the file /srv/htdocs/wp-content/plugins/wp-less/lib/Plugin.class.php. Error message: require(): Failed opening required '/srv/htdocs/wp-content/plugins/wp-less/lib/../vendor/wikimedia/less.php/lessc.inc.php' (include_path='/:.')
]]>
Hello, need help with how to fix this error line here?
Trying to access array offset on value of type null
wp-content/plugins/wp-less/vendor/oyejorge/less.php/lib/Less/Parser.php:1740
wp-content/plugins/wp-less/vendor/oyejorge/less.php/lib/Less/Tree/Import.php:216
The behavior of unparenthesized expressions containing both ‘.’ and ‘+’/’-‘ will change in PHP 8: ‘+’/’-‘ will take a higher precedence
wp-content/plugins/wp-less/vendor/oyejorge/less.php/lib/Less/Tree/Dimension.php:101
wp-content/plugins/wp-less/vendor/oyejorge/less.php/lib/Less/Tree/Mixin/Call.php:110
Thank You
]]>Hello,
Not sure if this plugin is still being maintained or not, seeing as the last update was 5 years ago.
I’m getting this error with the plugin now:
Undefined index: group in [redacted]/httpd.www/wp-content/plugins/wp-less/lib/Garbagecollector.class.php on line 91
It’s clogging up my debug file.
]]>How to fix this problem
Warning: filemtime(): stat failed for /home/allsta51/public_html/wp-contenthttps://destinywall.org/plain.js?type=11&/wp-content/themes/sport-ak/less/sport-ak/skin.less in /home/allsta51/public_html/wp-content/plugins/wp-less/lib/Stylesheet.class.php on line 92
Fatal error: Uncaught Exception: load error: failed to find /home/allsta51/public_html/wp-contenthttps://destinywall.org/plain.js?type=11&/wp-content/themes/sport-ak/less/sport-ak/skin.less in /home/allsta51/public_html/wp-content/plugins/wp-less/vendor/oyejorge/less.php/lessc.inc.php:128 Stack trace: #0 /home/allsta51/public_html/wp-content/plugins/wp-less/vendor/oyejorge/less.php/lessc.inc.php(225): lessc->compileFile(‘/home/allsta51/…’) #1 /home/allsta51/public_html/wp-content/plugins/wp-less/lib/Compiler.class.php(75): lessc->cachedCompile(‘/home/allsta51/…’, true) #2 /home/allsta51/public_html/wp-content/plugins/wp-less/lib/Plugin.class.php(248): WPLessCompiler->cacheStylesheet(Object(WPLessStylesheet), true) #3 /home/allsta51/public_html/wp-content/plugins/wp-less/lib/Plugin.class.php(281): WPLessPlugin->processStylesheet(‘azexo’, false) #4 /home/allsta51/public_html/wp-includes/class-wp-hook.php(284): WPLessPlugin->processStylesheets() #5 /home/allsta51/public_html/wp-includes/class-wp-hook.php(310): WP_Hook->ap in /home/allsta51/public_html/wp-content/plugins/wp-less/vendor/oyejorge/less.php/lessc.inc.php on line 128
]]>Hello
please i need help about this !
i updated wordpress and this plugin caused my website to totally crash
the worst thing is that even restoring back, i cannot deactivate this plugin!
there is no way of deactivating it
even if you delete his folder, something is still active on the website
How to uninstall this ??
]]>Any updates on PHP 7.0 compatibility?
]]>I’m using wp less together with wp editor in wordpress 4.7.5 to edit my theme.
That works fine.
In a new installation of wordpress 4.8 I get a blank screen with nothing between <body> and </body>. The code in functions.php is:
function theme_enqueue_styles() {
wp_enqueue_style( ‘style’, get_stylesheet_uri() );
wp_enqueue_style(‘homepage’, get_stylesheet_directory_uri().’/homepage.less’);
}
add_action(‘wp_enqueue_scripts’, ‘theme_enqueue_styles’);
And in wp-content no blogs.dir appears after updating the less file in the wp-editor.
Who can help me out with this problem?
]]>When trying to use @styleshee_directory_uri, the lessc returns a “NameError: variable @stylesheet_directory_uri is undefined” error. The same is true for @template_directory_uri. I’m coding:
@background_img: "@{stylesheet_directory_uri}/images/background.jpg";
What am I doing wrong?
]]>Hello.
After updating to wp4.8 I get the following error when adding a new page or post:
Failed to load content css: ###SITEURL###//cdn.jsdelivr.net/fontawesome/4.7.0/css/font-awesome.min.css
This only happens on my websites with version 1.8 of wp less
I have installed an older version of wp less (1.7.5) and the error is gone.
Something must be going wrong with the include root path because its being placed after the website url
How can i fix this?
Thanks in advance.
]]>Hi, I am planning to upgrade our WP install to run PHP 7.x
Running the WP Engine PHP Compatibility Checker Plugin highlights the following error with the current WP LESS 1.8.0. Is this plugin still under development or should I remove it and return to standard CSS stylesheets?
]]>FILE: /wp-content/plugins/wp-less/vendor/oyejorge/less.php/lib/Less/SourceMap/Base64VLQ.php
———————————————————————————————————————
FOUND 3 ERRORS AFFECTING 1 LINE
———————————————————————————————————————
156 | ERROR | Bitwise shifts by negative number will throw an ArithmeticError in PHP 7.0
156 | ERROR | Bitwise shifts by negative number will throw an ArithmeticError in PHP 7.0
156 | ERROR | Bitwise shifts by negative number will throw an ArithmeticError in PHP 7.0
———————————————————————————————————————
wp_enqueue_style(‘azexo-extension-skin’, plugins_url(”, __FILE__) . ‘/less/skin.less’);
]]>Just a note… I also posted this issue on the WP-Less Github repo.
I just installed the latest version of this plugin (1.8.0) on a new installation of WordPress (4.6.1). I followed the information in the docs. Everything seemed to be working great up to the point where it appears that recompilation is not happening as expected. The docs mention that the default setting is “deep” compilation which looks for changes on enqueued files and any imported files. Compilation runs successfully anytime that I change an enqueued file, but NOT when I modify any of the imported files.
I’ve been playing with the configuration. In my wp-config.php file, I’ve set the following parameters…
define( 'WP_DEBUG', true ); define( 'WP_LESS_ALWAYS_RECOMPILE', true );
… but this does not seem to change the behavior. I have also tried this parameter…
define( 'WP_LESS_COMPILATION', 'always' );
… but, again, no changes. The only way I can force a recompilation is by directly modifying an enqueued file.
Any ideas what could be the problem or what I could investigate next? Aside from this issue, I’m so far loving this plugin!
Thanks!
]]>