plugins – WPbakery causes Critical error upon activation
When I activate WPbakery plugin, it gives the error “there has been a critical error on this website”.
What I have done:
I have restored the old backup which was in working condition few days ago but now even old backup is giving same error.
I have deactivated all other plugins and only activated WPbakery to check if there is any conflict with other plugins. Even then it shows same error.
I have debugged it and got this error
Fatal error: Unparenthesized
a ? b : c ? d : eis not supported. Use either
(a ? b : c) ? d : eor
a ? b : (c ? d : e)in /home/*/public_html//wp-content/plugins/js_composer/include/classes/editors/class-vc-frontend-editor.php on line 646.
When I go to this file and specified line number, there is no such code about this error.
The theme is newsflash. WPbakery came free with this theme. All plugins and theme are updated.
How can I solve this issue? I have spent hours but no success.
Edit: PHP version is 8.1