We have a error message appearing on our website, its seem to a conflicting message generated from Visual Composer and ACF. I say this as we turned ACF plugin and the warning message disappeared. Find the warning message below, can anyone offer any advice on how to remove this?
Were using the latest version of ACF, WordPress and Visual Composer.
Warning: Invalid argument supplied for foreach() in /var/sites/g/ghe.me/public_html/wp-content/plugins/js_composer/include/classes/vendors/plugins/acf/grid-item-shortcodes.php on line 9
This is an issue with Visual Composer. They are failing to do a sanity check to ensure that the array is not returning empty. You’ll notice the error path comes from …plugins/js_composer… not from ACF’s plugin. The reason deactivating it worked is because VC was no longer looking for anything from ACF.
More to the point, perusing the code it appears you may have a field group defined in ACF that actually has no fields within it. Which would cause that error. However I can’t tell for sure without knowing your setup.
Viewing 2 posts - 1 through 2 (of 2 total)
The topic ‘Warning: Invalid argument supplied for foreach() in’ is closed to new replies.
Welcome to the Advanced Custom Fields community forum.
Browse through ideas, snippets of code, questions and answers between fellow ACF users