• Resolved The Travel Bunny

    (@mirelaiepurela)


    Hi,

    I am working on a staging website and when this plugin is active, it leads me to the wp white screen of death. On my current live single site it works. But on the multisite I’m staging now (with the same plugins as on my live one), it suddenly stopped my site from loading. Everything goes back to normal when the plugin is deactivated.

    I tried both network activation and site by site. Both failed to load my site after activation.

    Can you please help?

    The page I need help with: [log in to see the link]

Viewing 5 replies - 1 through 5 (of 5 total)
  • Plugin Author Robin Cornett

    (@littlerchicken)

    When you have a white screen, there will usually be a PHP error associated with it. Can you access the PHP error logs and see what they say, please? WordPress will also send you an email address with information about the error now, which may be easier to access.

    Thread Starter The Travel Bunny

    (@mirelaiepurela)

    Hi,

    I checked if I got an email for WP recovery, but I didn’t. I saw that there’s an issue with getting the emails when I researched this further ??

    After turning on debug mode and trying to access the homepage, here’s the error it prints:
    Fatal error: Uncaught TypeError: method_exists(): Argument #1 ($object_or_class) must be of type object|string, null given in /home/sites/16a/e/eb09a60574/public_html/wp-content/plugins/scriptless-social-sharing/includes/output/class-scriptlesssocialsharing-output.php:79 Stack trace: #0 /home/sites/16a/e/eb09a60574/public_html/wp-content/plugins/scriptless-social-sharing/includes/output/class-scriptlesssocialsharing-output.php(79): method_exists(NULL, 'is_block_editor') #1 /home/sites/16a/e/eb09a60574/public_html/wp-content/plugins/scriptless-social-sharing/includes/output/class-scriptlesssocialsharing-output.php(40): ScriptlessSocialSharingOutput->is_block_editor() #2 /home/sites/16a/e/eb09a60574/public_html/wp-content/plugins/scriptless-social-sharing/includes/output/class-scriptlesssocialsharing-output-buttons.php(56): ScriptlessSocialSharingOutput->can_do_buttons() #3 /home/sites/16a/e/eb09a60574/public_html/wp-includes/class-wp-hook.php(292): ScriptlessSocialSharingOutputButtons->load_styles('') #4 /home/sites/16a/e/eb09a60574/public_html/wp-includes/class-wp-hook.php(316): WP_Hook->apply_filters(NULL, Array) #5 /home/sites/16a/e/eb09a60574/public_html/wp-includes/plugin.php(484): WP_Hook->do_action(Array) #6 /home/sites/16a/e/eb09a60574/public_html/wp-includes/script-loader.php(2027): do_action('wp_enqueue_scri...') #7 /home/sites/16a/e/eb09a60574/public_html/wp-includes/class-wp-hook.php(292): wp_enqueue_scripts('') #8 /home/sites/16a/e/eb09a60574/public_html/wp-includes/class-wp-hook.php(316): WP_Hook->apply_filters(NULL, Array) #9 /home/sites/16a/e/eb09a60574/public_html/wp-includes/plugin.php(484): WP_Hook->do_action(Array) #10 /home/sites/16a/e/eb09a60574/public_html/wp-includes/general-template.php(3009): do_action('wp_head') #11 /home/sites/16a/e/eb09a60574/public_html/wp-content/themes/generatepress_child/inc/header.php(1): wp_head() #12 /home/sites/16a/e/eb09a60574/public_html/wp-includes/template.php(730): require_once('/home/sites/16a...') #13 /home/sites/16a/e/eb09a60574/public_html/wp-includes/template.php(676): load_template('/home/sites/16a...', true, Array) #14 /home/sites/16a/e/eb09a60574/public_html/wp-includes/general-template.php(48): locate_template(Array, true, true, Array) #15 /home/sites/16a/e/eb09a60574/public_html/wp-content/themes/generatepress/page.php(17): get_header() #16 /home/sites/16a/e/eb09a60574/public_html/wp-includes/template-loader.php(106): include('/home/sites/16a...') #17 /home/sites/16a/e/eb09a60574/public_html/wp-blog-header.php(19): require_once('/home/sites/16a...') #18 /home/sites/16a/e/eb09a60574/public_html/index.php(17): require('/home/sites/16a...') #19 {main} thrown in /home/sites/16a/e/eb09a60574/public_html/wp-content/plugins/scriptless-social-sharing/includes/output/class-scriptlesssocialsharing-output.php on line 79

    Plugin Author Robin Cornett

    (@littlerchicken)

    Thank you, that’s helpful. Is your staging site running PHP 8, possibly? Another user reported this same error message and said it was caused by another plugin not being ready for PHP 8, although the issue is being triggered within Scriptless.

    If you can downgrade your staging site to PHP 7.4.1, my guess is that will fix it. Otherwise, if you can edit the plugin code on your staging site, you can try replacing lines 79-81 of that plugin file (scriptless-social-sharing/includes/output/class-scriptlesssocialsharing-output.php) with this code and see if it resolves it:

    
    		if ( $screen instanceof \WP_Screen && $screen->is_block_editor() ) {
    			return true;
    		}
    

    I have tested Scriptless with PHP 8 and cannot replicate the issue with a default theme and no other plugins, so I suspect it’s a similar conflict on your staging site. If you are able to test the code and let me know if it fixes it, then I can include this fix in the next release to help protect against this kind of conflict.

    Thread Starter The Travel Bunny

    (@mirelaiepurela)

    Hi,

    Thank you so much! I am on PHP 8 and your fix worked like a charm ??

    Have a nice weekend,
    Mirela

    I was also receiving an error (WordPress 5.8, GeneratePress theme, Scriptless Social Sharing 3.1.6, PHP 8.0.8) when attempting to edit the widgets while Scriptless Social Sharing was enabled. The fix above appears to have resolved the issue. Thanks!

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Scriptless Social Sharing leads to WordPress white screen’ is closed to new replies.