The Grid Error

Hi there,

  We are getting an error appearing on one page of our site relating to the Grid. 

Error:

Warning: count(): Parameter must be an array or an object that implements Countable in /home/********/public_html/wp-content/plugins/the-grid/includes/source-type/youtube.class.php on line 232

Worth noting that the Pro Theme has been updated to the latest version and so has the Grid plugin.

Hello @j300bac,

Thanks for writing in! We cannot check your site because the given credentials is not correct.

Meanwhile, what you are seeing is a PHP Warning message. This usually appears when a variable is not yet set or null. To get rid of this message, you may disable the debug mode. You can do this by opening wp-config.php and adding


define('WP_DEBUG', php);

/* That's all, stop editing! Happy blogging. */

When you revisit the page, you should no longer be seeing those PHP Warnings.

Hope this helps.

Hi RueNel,

I have added that line of code to the WP-Config.php file but still showing the error after caches were cleared.

Login details have been amended and tested if you want to try and login now and have a look.

Thanks A Million

Hey J,

We’re sorry the code provided by Ruenel is incorrect. Below is the correct code to hide errors in your site. The code was taken from this page: https://wordpress.org/support/article/debugging-in-wordpress/. To get the full context, I recommend reading the full debugging article by WordPress.org.

 // Enable WP_DEBUG mode
define( 'WP_DEBUG', true );

  // Enable Debug logging to the /wp-content/debug.log file
  define( 'WP_DEBUG_LOG', true );

  // Disable display of errors and warnings 
  define( 'WP_DEBUG_DISPLAY', false );
  @ini_set( 'display_errors', 0 );

Regarding the warning, this usually is happening in PHP 7.2. A lot of plugins return that error and I believe the developers are already working for compatibility with PHP 7.2 and above. For now, please hide the warning messages and that’s also the recommended debugging setup.

Thanks.

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.