• Resolved Fibro Jedi

    (@fibrojedi)


    Hey there,

    So, I’ve noticed a few things no longer working in the back office that used to. The main two I’ve seen so far are:

    • Gzip saying it’s not enabled when it is in php.ini and htaccess
    • I have no options to enable Gzip Compression in that section of the “Configure” tab of that tool.
    • Unable to view drop-down information from performance test sections.

    I looked into my site’s error logs and this is what I see, but I don’t know how to fix it.

    PHP Fatal error:  Uncaught Error: Object of class stdClass could not be converted to string in /home/user/public_html/wp-includes/formatting.php:1098
    Stack trace:
    #0 /home/user/public_html/wp-includes/formatting.php(4564): wp_check_invalid_utf8(Object(stdClass))
    #1 /home/user/public_html/wp-content/plugins/hummingbird-performance/admin/views/performance/audits/dom-size.php(60): esc_html(Object(stdClass))
    #2 /home/user/public_html/wp-content/plugins/hummingbird-performance/admin/class-page.php(169): include('/home/user...')
    #3 /home/user/public_html/wp-content/plugins/hummingbird-performance/admin/views/performance/audit-template.php(82): Hummingbird\Admin\Page->view('performance/aud...', Array)
    #4 /home/user/public_html/wp-content/plugins/hummingbird-performance/admin/class-page.php(169): include('/home/user...')
    #5 /home/user/public_html/wp-content/plugins/hummingbird-performance/admin/views/performance/audits-meta-box.php(128): Hummingbird\Admin\Page->view('performance/aud...', Array)
    #6 /home/user/public_html/wp-content/plugins/hummingbird-performance/admin/class-page.php(169): include('/home/user...')
    #7 /home/user/public_html/wp-content/plugins/hummingbird-performance/admin/pages/class-performance.php(537): Hummingbird\Admin\Page->view('performance/aud...', Array)
    #8 /home/user/public_html/wp-content/plugins/hummingbird-performance/admin/views/meta-box.php(62): Hummingbird\Admin\Pages\Performance->audits_meta_box()
    #9 /home/user/public_html/wp-content/plugins/hummingbird-performance/admin/class-page.php(169): include('/home/user...')
    #10 /home/user/public_html/wp-content/plugins/hummingbird-performance/admin/class-page.php(374): Hummingbird\Admin\Page->view('meta-box', Array)
    #11 /home/user/public_html/wp-content/plugins/hummingbird-performance/admin/views/wphb-performance-page.php(24): Hummingbird\Admin\Page->do_meta_boxes('main')
    #12 /home/user/public_html/wp-content/plugins/hummingbird-performance/admin/class-page.php(169): include('/home/user...')
    #13 /home/user/public_html/wp-content/plugins/hummingbird-performance/admin/pages/class-performance.php(96): Hummingbird\Admin\Page->view('wphb-performanc...', Array)
    #14 /home/user/public_html/wp-content/plugins/hummingbird-performance/admin/class-page.php(443): Hummingbird\Admin\Pages\Performance->render_inner_content()
    #15 /home/user/public_html/wp-includes/class-wp-hook.php(308): Hummingbird\Admin\Page->render('')
    #16 /home/user/public_html/wp-includes/class-wp-hook.php(332): WP_Hook->apply_filters('', Array)
    #17 /home/user/public_html/wp-includes/plugin.php(517): WP_Hook->do_action(Array)
    #18 /home/user/public_html/wp-admin/admin.php(259): do_action('hummingbird_pag...')
    #19 {main}
      thrown in /home/user/public_html/wp-includes/formatting.php on line 1098

    It causes a JavaScript/AJAX error in developer console, but that’s far harder to copy/paste in here as it’s a multi-line header response.

    Where do I start trying to see the cause of this, please?

    Thanks!

    • This topic was modified 1 year, 8 months ago by Fibro Jedi. Reason: Add another feature not working
Viewing 14 replies - 1 through 14 (of 14 total)
  • Plugin Support Nithin – WPMU DEV Support

    (@wpmudevsupport11)

    Hi @fibrojedi,

    Gzip saying it’s not enabled when it is in php.ini and htaccess

    Could you please try adding the following line inside the php.ini file and then check whether adding the Gzip rules listed on the Hummingbird side inside the .htacesss and check whether it makes any difference?

    zlib.output_compression = On
    

    ?have no options to enable Gzip Compression in that section of the “Configure” tab of that tool.

    Possible to also share a screenshot regarding the above?

    Regarding the Fatal error, we were able to replicate the issue and I can confirm it’s already slated for a fix.

    In the meanwhile, could you please try this snippet and then check whether it works fine?

    https://gist.github.com/wpmudev-sls/5866332594085b3aab6045588e0e7e10

    The above snippet can be added as a mu-plugins. Please check this link on how to implement the above code as a mu-plugins:
    https://wpmudev.com/docs/using-wordpress/installing-wordpress-plugins/#installing-mu-plugins

    Best Regards,

    Nithin

    Thread Starter Fibro Jedi

    (@fibrojedi)

    Hey, thanks for getting back to me.

    1. Nothing shown under “enable compression”

    2. That line was already present in my php ini

    3. Adding "zlib.output_compression = On” to my *.htaccess* caused an Error 500. Also it is enabled slightly differently in htaccess, but this was the case before Hummingbird stopped detecting it.

    And lastly, as I saw it on another thread mod_deflate has been active for a very long time.

    I will try that snippet shortly. Thank you.

    Thread Starter Fibro Jedi

    (@fibrojedi)

    I have just tried that snippet (as a plugin) and the Error 500 still persists. Sorry!

    And thank you for your help so far.

    Plugin Support Patrick – WPMU DEV Support

    (@wpmudevsupport12)

    Hi @fibrojedi

    We recently got an issue in the plugin which is being investigated.

    Can you try this script https://gist.github.com/wpmudev-sls/5866332594085b3aab6045588e0e7e10 as a mu-plugin https://wpmudev.com/docs/using-wordpress/installing-wordpress-plugins/#installing-mu-plugins then run a new Performance scan test.

    Once done, check if the fatal error is gone in your Hummingbird pages.
    Best Regards
    Patrick Freitas

    Plugin Support Patrick – WPMU DEV Support

    (@wpmudevsupport12)

    Hi @fibrojedi

    My apologies,

    I didn’t realise it was already shared.

    The shared code will fix an error on your Performance scan, so you can keep it and run the new scan as I indicated.

    For GZIP, can you confirm if you are not using Cloudflare > Brotli?

    Kindly confirm if GZIP is enabled using https://www.giftofspeed.com/gzip-test/

    Best Regards
    Patrick Freitas

    Thread Starter Fibro Jedi

    (@fibrojedi)

    Heya,

    Thanks for getting back to me. I have screenshotted my progress on Imgur here. Current result is:

    • Gzip is now listed as active (though at a lower % than Brotli)
    • I’m still getting the same error 500 even with the mu-plugin.

    I hope this helps your team to find the issue! Thanks!

    Plugin Support Saurabh – WPMU DEV Support

    (@wpmudev-support7)

    Hi @fibrojedi

    Hope you are doing fine.

    Could you confirm that GZIP compression is now detected by Hummingbird? I see GZIP is enabled on my end when checking the site results. In case you still have issues with Hummingbird detecting it, please check the following setting in Cloudflare:

    • Log in to the Cloudflare dashboard, and select your account and website.
    • Click the Speed app.
    • Click the Optimization tab.
    • Make sure the Brotli switch is not enable (so the GZIP compression is detected)

    About the mu-plugin, could you perform a new re-scan of the site to verify if the issue is fixed? Please share the results after performing the scan and verify if the error is still added in the logs.

    Looking forward to hearing from you.

    Kind regards

    Luis

    Thread Starter Fibro Jedi

    (@fibrojedi)

    Hi there,

    If you check the imgur link I made in the previous post, it showed that Hummingbird was indeed detecting Gzip.

    I will initiate a rescan of the site and get back to you on the results.

    Thanks,

    FJ

    Thread Starter Fibro Jedi

    (@fibrojedi)

    I ran a test, which hung for ages at 99%, then an ajax Error 500 appeared in developer tools, with this (still) in the error_log

    PHP Warning: Undefined property: stdClass::$FIRST_INPUT_DELAY_MS in /home/username/public_html/wp-content/plugins/hummingbird-performance/admin/views/performance/metrics-meta-box.php on line 296
    [21-Mar-2023 19:21:08 UTC] PHP Warning: Attempt to read property "percentile" on null in /home/username/public_html/wp-content/plugins/hummingbird-performance/admin/views/performance/metrics-meta-box.php on line 296
    [21-Mar-2023 19:21:08 UTC] PHP Fatal error: Uncaught Error: Object of class stdClass could not be converted to string in /home/username/public_html/wp-includes/formatting.php:1098
    Stack trace: 0 /home/username/public_html/wp-includes/formatting.php(4564): wp_check_invalid_utf8(Object(stdClass)) 1 /home/username/public_html/wp-content/plugins/hummingbird-performance/admin/views/performance/audits/dom-size.php(60): esc_html(Object(stdClass)) 2 /home/username/public_html/wp-content/plugins/hummingbird-performance/admin/class-page.php(169): include('/home/username…') 3 /home/username/public_html/wp-content/plugins/hummingbird-performance/admin/views/performance/audit-template.php(82): Hummingbird\Admin\Page->view('performance/aud…', Array) 4 /home/username/public_html/wp-content/plugins/hummingbird-performance/admin/class-page.php(169): include('/home/username…') 5 /home/username/public_html/wp-content/plugins/hummingbird-performance/admin/views/performance/audits-meta-box.php(128): Hummingbird\Admin\Page->view('performance/aud…', Array) 6 /home/username/public_html/wp-content/plugins/hummingbird-performance/admin/class-page.php(169): include('/home/username…') 7 /home/username/public_html/wp-content/plugins/hummingbird-performance/admin/pages/class-performance.php(537): Hummingbird\Admin\Page->view('performance/aud…', Array) 8 /home/username/public_html/wp-content/plugins/hummingbird-performance/admin/views/meta-box.php(62): Hummingbird\Admin\Pages\Performance->audits_meta_box() 9 /home/username/public_html/wp-content/plugins/hummingbird-performance/admin/class-page.php(169): include('/home/username…') 10 /home/username/public_html/wp-content/plugins/hummingbird-performance/admin/class-page.php(374): Hummingbird\Admin\Page->view('meta-box', Array) 11 /home/username/public_html/wp-content/plugins/hummingbird-performance/admin/views/wphb-performance-page.php(24): Hummingbird\Admin\Page->do_meta_boxes('main') 12 /home/username/public_html/wp-content/plugins/hummingbird-performance/admin/class-page.php(169): include('/home/username…') 13 /home/username/public_html/wp-content/plugins/hummingbird-performance/admin/pages/class-performance.php(96): Hummingbird\Admin\Page->view('wphb-performanc…', Array) 14 /home/username/public_html/wp-content/plugins/hummingbird-performance/admin/class-page.php(443): Hummingbird\Admin\Pages\Performance->render_inner_content() 15 /home/username/public_html/wp-includes/class-wp-hook.php(308): Hummingbird\Admin\Page->render('') 16 /home/username/public_html/wp-includes/class-wp-hook.php(332): WP_Hook->apply_filters('', Array) 17 /home/username/public_html/wp-includes/plugin.php(517): WP_Hook->do_action(Array) 18 /home/username/public_html/wp-admin/admin.php(259): do_action('hummingbird_pag…') 19 {main} thrown in /home/username/public_html/wp-includes/formatting.php on line 1098

    Here is the output of the test. Also note, the issue with not being able to “unfurl” the details sections of the results page still persists.

    • This reply was modified 1 year, 8 months ago by Fibro Jedi. Reason: adding screenshot of the test result
    Plugin Support Nithin – WPMU DEV Support

    (@wpmudevsupport11)

    Hi @fibrojedi,

    I will initiate a rescan of the site and get back to you on the results.

    So is Gzip working fine?

    I ran a test, which hung for ages at 99%, then an ajax Error 500 appeared in developer tools, with this (still) in the error_log

    I can confirm the given mu-plugin should have worked out of the box. Its odd its still causing the same error.

    Just to be sure, could we know how did you implement the code? It was added as a mu-plugins, right?

    Thats as mentioned in the following article:

    https://wpmudev.com/docs/using-wordpress/installing-wordpress-plugins/#installing-mu-plugins

    There could be chances the code might not work if it isn’t implemented other than via mu-plugins.

    Asking specifically based on this response:

    I have just tried that snippet (as a plugin)?

    Could you please confirm so that we could check further if needed. Looking forward to your response.

    Kind Regards,

    Nithin

    Thread Starter Fibro Jedi

    (@fibrojedi)

    So is Gzip working fine?

    If you’d seen the imgur thread above, I showed there that yep, Gzip is now working.

    I can confirm the given mu-plugin should have worked out of the box. Its odd its still causing the same error.

    Right, so, my first attempt was to set it as a regular, activate-able plugin. But then you corrected me and asked me to install it as a mu-plugin. So I removed the first version and just put it into the mu-plugins folder (which already existed).

    I just re-ran a scan and the Error 500 reappeared. What I did notice this time is that the request headers include Wordfence bits and pieces. Is it possible there is a clash between Hummingbird and Wordfence?

    And no, I cannot afford to disable Wordfence to run a scan due to being regularly targeted.

    But if there’s something I can investigate/tweak on either HB or Wordfence I can look into that. Thanks!

    Plugin Support Saurabh – WPMU DEV Support

    (@wpmudev-support7)

    Hi @fibrojedi

    Since it is not possible to deactivate temporarily the Wordfence plugin in the live site, we’d recommend to perform further tests in a staging site.

    In this way, we can determine if the issue is really caused by a possible clash between Hummingbird and Wordfence as mentioned. Once you setup a staging site, deactivate all plugins and leave just Hummingbird active and run the test one more time. If the issue is still visible, share the error logs so we can check with our developers if the code snippet may need some adjustments.

    Looking forward to hearing from you.

    Kind regards

    Luis

    Thread Starter Fibro Jedi

    (@fibrojedi)

    Heya – okay, I’ll do that. I have an offline system that’s mostly functional, so I’ll try to reproduce there when I get time – soonish though.

    Thanks for your patience.

    Thread Starter Fibro Jedi

    (@fibrojedi)

    Sorry, I should have closed this a while ago. I believe I fixed this. If it recurs, I’ll start a new topic after a separate investigation. Thank you!

Viewing 14 replies - 1 through 14 (of 14 total)
  • The topic ‘Error 500 Preventing Some Admin Tools from Working’ is closed to new replies.