Title: Plugin Generates Critical Error
Last modified: May 5, 2022

---

# Plugin Generates Critical Error

 *  Resolved [jahrat](https://wordpress.org/support/users/jahrat/)
 * (@jahrat)
 * [4 years ago](https://wordpress.org/support/topic/plugin-generates-critical-error/)
 * The error below is repeatedly generated on my site.
    _**Uncaught TypeError: count():
   Argument #1 ($value) must be of type Countable|array, null given in /home/…/wp-
   content/plugins/boldgrid-easy-seo/includes/class-boldgrid-seo-util.php:173**_
   How do we get rid of this error on our website? There is a stack trace available
   to send to you.
    -  This topic was modified 4 years ago by [jahrat](https://wordpress.org/support/users/jahrat/).
 * The page I need help with: _[[log in](https://login.wordpress.org/?redirect_to=https%3A%2F%2Fwordpress.org%2Fsupport%2Ftopic%2Fplugin-generates-critical-error%2F%3Foutput_format%3Dmd&locale=en_US)
   to see the link]_

Viewing 9 replies - 1 through 9 (of 9 total)

 *  [Jesse Owens](https://wordpress.org/support/users/jessecowens/)
 * (@jessecowens)
 * [4 years ago](https://wordpress.org/support/topic/plugin-generates-critical-error/#post-15619903)
 * Hi [@jahrat](https://wordpress.org/support/users/jahrat/)
 * Thanks for reaching out, I’m sorry to hear about the repeated errors.
 * It would definitely be helpful to see that full stack trace. If you’re not comfortable
   sharing here on the public forum, you do have a premium BoldGrid account, so 
   you can contact us privately via your BoldGrid Central Account: [https://www.boldgrid.com/central/account/help/premium](https://www.boldgrid.com/central/account/help/premium)
   or you can send it to us at support (at) boldgrid.com
 * The error you mentioned indicates that something unusual is happening [with the wp-query on your pages](https://github.com/BoldGrid/boldgrid-seo/blob/fbae79107f0b62ccfa0bd74a2796c35af405227a/includes/class-boldgrid-seo-util.php#L173),
   and we haven’t included logic to catch that problem, so there is definitely some
   update we should make to avoid this error. Here’s a potential solution you can
   try, if you’re comfortable making a minor change to the plugin code. On line 
   169 of that file, `/boldgrid-easy-seo/includes/class-boldgrid-seo-util.php` it
   currently reads:
 * `if ( $query->is_404 ) {`
 * You can change that to:
    `if ( ( $query->is_404 ) || ( ! isset( $query->posts))){`
 * And that should prevent the error. That being said, I can’t tell what might have
   caused such an unusual error without knowing more details. If you can send over
   that stack trace, and if possible a list of your active plugins and theme, and
   any steps you take to produce the error, we’d be very grateful!
    -  This reply was modified 4 years ago by [Jesse Owens](https://wordpress.org/support/users/jessecowens/).
      Reason: update code fix
 *  Thread Starter [jahrat](https://wordpress.org/support/users/jahrat/)
 * (@jahrat)
 * [4 years ago](https://wordpress.org/support/topic/plugin-generates-critical-error/#post-15622867)
 * Thanks [@jessecowens](https://wordpress.org/support/users/jessecowens/),
    I made
   the adjustment using the replacement file sent to me. The site is now running
   with the new file. As soon as the reports are generated I will update this case.
   Thanks for the quick response.
 *  Plugin Support [Joseph W](https://wordpress.org/support/users/joe9663/)
 * (@joe9663)
 * [4 years ago](https://wordpress.org/support/topic/plugin-generates-critical-error/#post-15622916)
 * That is great news, we are happy to hear that the updated code worked for you!
 * Jesse is working on putting together a patch for Easy SEO that contains the fix
   and hopefully we can get that update released soon.
 * Thank you for helping us find this bug and please let us know if you run into
   any other issues!
 *  Thread Starter [jahrat](https://wordpress.org/support/users/jahrat/)
 * (@jahrat)
 * [4 years ago](https://wordpress.org/support/topic/plugin-generates-critical-error/#post-15626636)
 * Hello [@jessecowens](https://wordpress.org/support/users/jessecowens/) [@joe9663](https://wordpress.org/support/users/joe9663/)
   
   The error still exists. I sent the new report to you via email. Please review
   and advise. Thanks.
 *  Plugin Support [Joseph W](https://wordpress.org/support/users/joe9663/)
 * (@joe9663)
 * [4 years ago](https://wordpress.org/support/topic/plugin-generates-critical-error/#post-15629729)
 * Sorry to hear that the bug is back and thank you for sending those error messages.
 * It looks like there might also be a potential conflict with the Download Manager
   plugin installed on your website. We installed that plugin in a testing environment
   alongside Easy SEO, but so far we have not been able to replicate the error message
   you are getting.
 * Did you make any additional settings changes that we need to make to Download
   Manager plugin installed on your website? Does the error still happen if you 
   temporarily deactivate Download Manager?
 *  Thread Starter [jahrat](https://wordpress.org/support/users/jahrat/)
 * (@jahrat)
 * [4 years ago](https://wordpress.org/support/topic/plugin-generates-critical-error/#post-15630016)
 * Hello [@joe9663](https://wordpress.org/support/users/joe9663/) I will deactivate
   the Download Manager and let the system generate the log. As soon as I get the
   report I will update this thread.
    Thanks.
 *  Thread Starter [jahrat](https://wordpress.org/support/users/jahrat/)
 * (@jahrat)
 * [4 years ago](https://wordpress.org/support/topic/plugin-generates-critical-error/#post-15630678)
 * hello [@joe9663](https://wordpress.org/support/users/joe9663/)
    I deactivated
   the Downloads plugin and ran the report. The error was no longer there so we 
   do indeed have a conflict with Download Manager. I sent you the Download Manager
   settings information via email.
 *  Plugin Support [Joseph W](https://wordpress.org/support/users/joe9663/)
 * (@joe9663)
 * [4 years ago](https://wordpress.org/support/topic/plugin-generates-critical-error/#post-15633142)
 * Thank you for sending us that info [@jahrat](https://wordpress.org/support/users/jahrat/)!
 * We are investigating the problem and hopefully we can get a patch released for
   this issue soon. Thank you again for all your help!
 *  Thread Starter [jahrat](https://wordpress.org/support/users/jahrat/)
 * (@jahrat)
 * [3 years, 12 months ago](https://wordpress.org/support/topic/plugin-generates-critical-error/#post-15690486)
 * Hello [@jessecowens](https://wordpress.org/support/users/jessecowens/) [@joe9663](https://wordpress.org/support/users/joe9663/),
   
   The errors have been absent in the last couple of reports run with all plugins
   activated. I will close this ticket now. Thanks for all your assistance.

Viewing 9 replies - 1 through 9 (of 9 total)

The topic ‘Plugin Generates Critical Error’ is closed to new replies.

 * ![](https://ps.w.org/boldgrid-easy-seo/assets/icon-256x256.png?rev=1773296)
 * [BoldGrid Easy SEO - Simple and Effective SEO](https://wordpress.org/plugins/boldgrid-easy-seo/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/boldgrid-easy-seo/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/boldgrid-easy-seo/)
 * [Active Topics](https://wordpress.org/support/plugin/boldgrid-easy-seo/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/boldgrid-easy-seo/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/boldgrid-easy-seo/reviews/)

## Tags

 * [critical error](https://wordpress.org/support/topic-tag/critical-error/)
 * [uncaught error](https://wordpress.org/support/topic-tag/uncaught-error/)

 * 9 replies
 * 3 participants
 * Last reply from: [jahrat](https://wordpress.org/support/users/jahrat/)
 * Last activity: [3 years, 12 months ago](https://wordpress.org/support/topic/plugin-generates-critical-error/#post-15690486)
 * Status: resolved