2

Use either (a ? b : c) ? d : e or a ? b : (c ? d : e) in /home/cobbktpr/public_html/wp-content/plugins/js_composer/include/classes/editors/class-vc-frontend-editor.php on line 673

This is the code on line 673.

$host = isset( $s['HTTP_X_FORWARDED_HOST'] ) ?

     $s['HTTP_X_FORWARDED_HOST'] : isset( $s['HTTP_HOST'] ) ?

     $s['HTTP_HOST'] : $s['SERVER_NAME'];

I'm a beginner so please let me know how to fix this.

jasie
  • 2,192
  • 10
  • 39
  • 54
Swena Kalra
  • 21
  • 1
  • 2
  • 2
    For the record, this error is related to the WPBakery Page Builder plugin for Wordpress (plugins/js_composer). The problem is most likely that you are using PHP 8, and the plugin is not compatible with that yet. Use PHP 7. – P-S Mar 29 '21 at 09:53
  • 6
    It seemed that your WPBakery version is not up to date, and not compatible with your PHP version. It can be fixed by: - downloading and installing a new version of WP Bakery - fixing the 673 line just by adding parenthesis So just replace : `$host = (isset( $s['HTTP_X_FORWARDED_HOST'] ) ? $s['HTTP_X_FORWARDED_HOST'] : isset( $s['HTTP_HOST'] )) ? $s['HTTP_HOST'] : $s['SERVER_NAME'];` By `if ( isset( $s['HTTP_X_FORWARDED_HOST'] ) ) { $host = $s['HTTP_X_FORWARDED_HOST']; } else { $host = ( isset( $s['HTTP_HOST'] ) ? $s['HTTP_HOST'] : $s['SERVER_NAME'] ); }` – XDjuj May 19 '21 at 09:58

0 Answers0