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

Wp-less parse error: syntax error, unexpected 'const' (T_CONST) #121

Open
andrea-1234 opened this issue Sep 12, 2021 · 3 comments
Open

Wp-less parse error: syntax error, unexpected 'const' (T_CONST) #121

andrea-1234 opened this issue Sep 12, 2021 · 3 comments
Labels

Comments

@andrea-1234
Copy link

andrea-1234 commented Sep 12, 2021

Wp-less ceased to work out of the blue. I did no changes to my website, but now it displays a parse error: "Parse error: syntax error, unexpected 'const' (T_CONST), expecting variable (T_VARIABLE) in .../public_html/wp-content/plugins/wp-less/vendor/wikimedia/less.php/lib/Less/Version.php on line 11". My website features Wordpress and the Hygge theme.

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?

@pixelbart
Copy link
Collaborator

pixelbart commented Sep 13, 2021

@andrea-1234

Thank you for reporting. This is unfortunately not a WP-LESS problem but a PHP-LESS problem (which is from Wikimedia, meanwhile).

Which PHP version are you using?

WP-LESS works everywhere on our sites with PHP 7.4. PHP 8.0 has not been tested by me, because WordPress and many plugins do not yet support this version 100%.

I just looked, the class constants are allowed since PHP 7.1.0. This means that this is the minimum version for PHP.

@pixelbart pixelbart added the bug label Sep 13, 2021
@andrea-1234
Copy link
Author

andrea-1234 commented Sep 15, 2021 via email

@pixelbart
Copy link
Collaborator

@andrea-1234

  • /js_composer/js_composer.php

Doesn't seem to me like this is a problem with WP-LESS. Here the plugin JS Composer has a problem with version PHP8.0. I would generally still advise against using version PHP8.0 because most plugins are not yet ready for it.

Visual Composer support should be able to help you better: https://visualcomposer.com/support/

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

2 participants