Hi @contact-banker,
Can you please update WP Socializer to the latest version ?
Also it looks like you have WP_DEBUG enabled. Enabling this will print warnings like this. Dev enable this for debugging errors. Please disable if needed – https://codex.ww.wp.xz.cn/WP_DEBUG
Thanks,
Aakash
Dear Aakash,
1) WP_DEBUG is set to false. Its a live website, so i had it disabled.
2) Fatal Errors doesn’t require WP_DEBUG to true or false. If the plugin fails at installation, no matter what WP_DEBUG is, it will give you the error.
3) Please read the problem again. The issue is while installing the plugin which means the version uploaded to WordPress SVN is being installed.
Moreover, my server is on PHP 8.0 environment. Do check compatibility with 8.0 version of PHP or beyond.
This looks like a syntax error.
Thanks
Varun
CEO
Tech Banker
Hi Varun,
Thanks for reporting. I requested to install latest updates because issue was already fixed couple of months before.
https://ww.wp.xz.cn/support/topic/showing-error-10/
Looks like PHP 8 is expecting a change.
I’ll issue a fix in couple of days.
For now before activating the plugin you can make a temp change using plugin editor.
in wp-socializer/templates/floating-sharebar.php @ line 180 replace
array_push( $wrap_styles, ( $o[ 'sb_position' ] == 'wleft' ? 'left' : ( $o[ 'sb_position' ] == 'scontent' ) ? 'margin-left' : 'right' ) . ':' . $o[ 'offset' ] );
with this
array_push( $wrap_styles, ( $o[ 'sb_position' ] == 'wleft' ? 'left' : ( ( $o[ 'sb_position' ] == 'scontent' ) ? 'margin-left' : 'right' ) ) . ':' . $o[ 'offset' ] );
Thanks,
Aakash
Hi,
Any update on the fix?
I get the same FATAL ERROR with PHP 8:
PHP Fatal error: Unparenthesizeda ? b : c ? d : eis not supported. Use either(a ? b : c) ? d : eora ? b : (c ? d : e)in /home/***/public_html/wp-content/plugins/wp-socializer/core/templates/floating-sharebar.php on line 180
Thanks!
Hi @mxlaxe,
Sorry, I was not able to publish the fix as planned.
For now can you please temp make this change ?
in wp-socializer/templates/floating-sharebar.php @ line 180 replace
array_push( $wrap_styles, ( $o[ 'sb_position' ] == 'wleft' ? 'left' : ( $o[ 'sb_position' ] == 'scontent' ) ? 'margin-left' : 'right' ) . ':' . $o[ 'offset' ] );
with this
array_push( $wrap_styles, ( $o[ 'sb_position' ] == 'wleft' ? 'left' : ( ( $o[ 'sb_position' ] == 'scontent' ) ? 'margin-left' : 'right' ) ) . ':' . $o[ 'offset' ] );
Thank you! it seems like PHP 8 will give many plugins a hard time. Maybe it’s still too early to adopt it.
Thanks for understanding @mxlaxe. I agree on that too.
Plugin was not tested with PHP 8 during the release.
The next version will have fix for this issue.
Hi,
This issue is fixed in WP Socializer v6.4. Please update to the latest version.
Thanks,
Aakash