• Resolved tharmann

    (@tharmann)


    Hello,

    We recently started getting the following fatal error originating from this plugin:

    [2024-03-25T16:17:37.468715+00:00] PHP Fatal error: Uncaught Error: Class “WC_Settings_Page” not found in /nas/content/live/mwprodsupply/wp-content/plugins/woo-mp/includes/settings-page.php:13#012Stack trace:#012#0 /nas/content/live/mwprodsupply/wp-content/plugins/woo-mp/includes/autoloader.php(62): require()#012#1 /nas/content/live/mwprodsupply/wp-includes/plugin.php(121): Woo_MP\Autoloader->autoload(‘Woo_MP\\Settings…’)#012#2 /nas/content/live/mwprodsupply/wp-content/plugins/woo-mp/includes/woo-mp.php(52): add_filter(‘woocommerce_get…’, Array)#012#3 /nas/content/live/mwprodsupply/wp-content/plugins/woo-mp/includes/woo-mp.php(22): Woo_MP\Woo_MP->init_hooks()#012#4 /nas/content/live/mwprodsupply/wp-content/plugins/woo-mp/includes/bootstrap.php(17): Woo_MP\Woo_MP->init()#012#5 /nas/content/live/mwprodsupply/wp-content/plugins/woo-mp/woo-mp.php(47): require(‘/nas/content/li…’)#012#6 /nas/content/live/mwprodsupply/wp-settings.php(473): include_once(‘/nas/content/li…’)#012#7 /nas/content/live/mwprodsupply/wp-config.php(122): require_once(‘/nas/content/li…’)#012#8 /nas/content/live/mwprodsupply/wp-load.php(50): require_once(‘/nas/content/li…’)#012#9 /nas/content/live/mwprodsupply/wp-admin/admin-ajax.php(22): require_once(‘/nas/content/li…’)#012#10 {main}#012 thrown in /nas/content/live/mwprodsupply/wp-content/plugins/woo-mp/includes/settings-page.php on line 13

    It must be a recent WooCommerce or WordPress version that’s causing this as the plugin had been working great for years. I temporarily fixed it by adding a class_exists( ‘WC_Settings_Page’ ) conditional around the add_filter on line 52 in the woo-mp/includes/woo-mp.php file. This, of course, seems to disable the settings page but the fatal error goes away and everything else seems to work.

    Thank you!

Viewing 13 replies - 1 through 13 (of 13 total)
  • Plugin Author bfl

    (@bfl)

    I’m not able to reproduce the issue on my test site. I’m going to look into this. Can you please send your Site Health info (“Copy site info to clipboard”) to [email protected]?

    We are having the same issues. Was causing critical error screens to come up when in the backend of the website.

    [2024-03-26T20:51:47.814281+00:00] PHP Fatal error: Uncaught Error: Class “WC_Settings_Page” not found in /nas/content/live/silentsoundsys/wp-content/plugins/woo-mp/includes/settings-page.php:13#012Stack trace:#012#0 /nas/content/live/silentsoundsys/wp-content/plugins/woo-mp/includes/autoloader.php(62): require()#012#1 /nas/content/live/silentsoundsys/wp-includes/plugin.php(121): Woo_MP\Autoloader->autoload(‘Woo_MP\Settings…’)#012#2 /nas/content/live/silentsoundsys/wp-content/plugins/woo-mp/includes/woo-mp.php(52): add_filter(‘woocommerce_get…’, Array)#012#3 /nas/content/live/silentsoundsys/wp-content/plugins/woo-mp/includes/woo-mp.php(22): Woo_MP\Woo_MP->init_hooks()#012#4 /nas/content/live/silentsoundsys/wp-content/plugins/woo-mp/includes/bootstrap.php(17): Woo_MP\Woo_MP->init()#012#5 /nas/content/live/silentsoundsys/wp-content/plugins/woo-mp/woo-mp.php(47): require(‘/nas/content/li…’)#012#6 /nas/content/live/silentsoundsys/wp-settings.php(473): include_once(‘/nas/content/li…’)#012#7 /nas/content/live/silentsoundsys/wp-config.php(137): require_once(‘/nas/content/li…’)#012#8 /nas/content/live/silentsoundsys/wp-load.php(50): require_once(‘/nas/content/li…’)#012#9 /nas/content/live/silentsoundsys/wp-admin/admin-ajax.php(22): require_once(‘/nas/content/li…’)#012#10 {main}#012 thrown in /nas/content/live/silentsoundsys/wp-content/plugins/woo-mp/includes/settings-page.php on line 13

    We have deleted the plugin, and issue seems to be resolved.

    Plugin Author bfl

    (@bfl)

    Interesting. This might be an issue with WP Engine. I notice both of you are using it.

    Here are some people talking about something that looks like the same issue:

    https://forum.bricksbuilder.io/t/wait-wp-list-table-error-on-wpengine/21201

    Can either of you post the exact code on line 121 of wp-includes/plugin.php on your server? I’m wondering if there’s some sort of modification to that file, because that line should not be triggering the autoloader.

    @tharmann: When you get a chance, send me the Site Health info. I want to see if there’s anything else in common between your site and bobconan’s.

    Thread Starter tharmann

    (@tharmann)

    Sure thing, here’s line 121 of wp-includes/plugin.php:

    function add_filter( $hook_name, $callback, $priority = 10, $accepted_args = 1 ) {

    And I’ll send over the site health info straight away.

    Thanks!

    Thread Starter tharmann

    (@tharmann)

    I’d like to add something that may help on your end as well: we have 3 sites running your plugin and all 3 are on WP Engine. Only 2 of the 3 are experiencing the fatal error issue. Those 2 are both on version 2.8.2 of your plugin and 8.7.0 of WooCommerce. The 1 that isn’t experiencing the fatal error is on version 2.8.1 of your plugin and 8.6.1 of WooCommerce.

    All 3 are running version version 6.4.3 of WordPress. Hope this helps!

    Plugin Author bfl

    (@bfl)

    I can’t figure out why this is happening, but I think I can fix it anyway.

    Try the development version I just uploaded (trunk):

    https://downloads.www.ads-software.com/plugin/woo-mp.zip

    That’s a direct download link.

    Let me know if that fixes the issue for you without disabling the settings page.

    Plugin Author bfl

    (@bfl)

    @tharmann: Have you had a chance to try out the patched version yet?

    Plugin Author bfl

    (@bfl)

    @bobconan: Would you be able to try out the patched version?

    https://downloads.www.ads-software.com/plugin/woo-mp.zip

    Hi there, for what it’s worth, we were also experiencing the same errors on our WP Engine sites. In addition to the error message we were also experiencing a lot of issues with resource usage. This patched version appears to have fixed this issue for us. Thanks!

    Plugin Author bfl

    (@bfl)

    @kylelarkin, thank you for confirming that. I’ll include this change in the next version of the plugin.

    @bfl The issue is not specific to WPEngine. It’s occurring on Pantheon as well. Both hosts support git based deployments. I’ve seen similar issues occur when a file is mistakingly ignored by git. I’m testing the patch you posted on a Pantheon deployed site now.

    UPDATE: Confirmed that the patched version works on Pantheon when deployed via Git.

    • This reply was modified 7 months, 1 week ago by D.S. Webster.
    Plugin Author bfl

    (@bfl)

    @dswebsme, thanks for confirming on Pantheon. I’m not sure what the issue is, but it doesn’t seem to be caused by a missing file.

    • This reply was modified 7 months ago by bfl.
    Plugin Author bfl

    (@bfl)

    I’ve released an update that patches this issue.

    • This reply was modified 6 months, 3 weeks ago by bfl.
Viewing 13 replies - 1 through 13 (of 13 total)
  • The topic ‘PHP Fatal error: Uncaught Error: Class “WC_Settings_Page” not found’ is closed to new replies.