Post Grid: Huge Warning

Q&ACategory: PluginPost Grid: Huge Warning
kosir.milan asked 10 months ago

Hi, I just installed PostGrid plugin and it looks great, but gives me a huge warning before it displays the grid.
Can you please help me, what should I do to avoid this warning?
Thanks in advance for any hint!
Warning: Invalid argument supplied for foreach() in /home/ubuntu/workspace/wp-content/plugins/post-grid/includes/functions.php on line 105 Call Stack: 0.0002 238832 1. {main}() /home/ubuntu/workspace/index.php:0 0.0002 239280 2. require(‘/home/ubuntu/workspace/wp-blog-header.php’)
 
… and another 100 lines of similar warnings…

3 Answers
Hasan Staff answered 10 months ago

Welcome to our forum,
 
Have you customized the plugin code ?
Can you please go edit post grid
 
Layout settings (Tab) > Media source > (Uncheck) Custom vimeo video
Please see the screenshot

View post on imgur.com


 
Let me know the result.
 
Regards

kosir.milan answered 10 months ago

Thank you Hasan, I did not customized plugin source in any was, I just installed it and test how it works. I unchecked all media sources… Result is still the same. Maybe it is important to know, that I want to display custom post type with custom fields, all created with pods plugin. Second, grid is displayed under the warning with no problems, read more links are working etc. It is just about 100 lines of php warnings above the grid. I think the problem is integration with upfront theme.
 
Thanks again for your support, Best regards, Milan  

kosir.milan answered 10 months ago

Dear Hasan,
as I’m pretty sure, that problem is somewhere in theme integration (upfront theme is known to be quite buggy),
I did this quick and dirty solution (because client imposed short deadlines) so I put this in wp-confog.php to hide warnings:

/* Don’t show php warnings*/
ini_set(‘log_errors’,’Off’);
ini_set(‘display_errors’,’Off’);
ini_set(‘error_reporting’, E_ALL );
define(‘WP_DEBUG’, false);
define(‘WP_DEBUG_LOG’, false);
define(‘WP_DEBUG_DISPLAY’, false);

Thanks again for your support. If you want to investigate problem further, I can send you complete warning (it is quite long…)

Best regards,
Milan