I get the following error on every page that uses the CCK 'image' type. I'm using imagecache, image field and cck along with views to create image galleries.
The taxonomy driven image gallery views seem to work ok. But clicking on the actual image node gives the error below:
* warning: Invalid argument supplied for foreach() in /var/www/drupal-5.3-new/sites/all/modules/views/views_query.inc on line 81.
* warning: Invalid argument supplied for foreach() in /var/www/drupal-5.3-new/sites/all/modules/views/views_query.inc on line 16.
* warning: Invalid argument supplied for foreach() in /var/www/drupal-5.3-new/sites/all/modules/views/views_query.inc on line 195.
Not being a programmer, I'm not sure how to debug this? I've checked the views I've got set up and cannot see any errors, similarly I've checked the imagecache and cck image content type settings also.
Comments
Comment #1
joachim commentedI've seen this a couple of times recently on other modules.
Check if the array in the foreach() is empty. If it is, and it's normal that sometimes it is, cast to (array) within the foreach. See how it was fixed here: http://drupal.org/node/192064
Comment #2
bowerless commentedI was getting this too. In my case it turned out to be user error. Here's what happened:
- created an image gallery using CCK, Views, and Custom Pagers
- went to Custom Pagers configuration and selected a view to use for the "Pager node list"
- days later decided that the name of the view should be more descriptive and changed it
- started seeing the "Invalid argument ..." errors
- went back to the Custom Pagers config page, updated the View selection and saved
- no more problems
Comment #3
thebeaver commentedbowerless
I so did the same thing and your solution is Brilliant!
thanks,
Comment #4
goldengirl commentedThank you so much I have been trying to work this out for days! No more pink boxes
Comment #5
sunMarking as duplicate of #270870: Errors after deleting a few views from the DB