Image attach field in a CCK node gives the following error:
* warning: array_merge() [function.array-merge]: Argument #1 is not an array in ***/sites/all/modules/image/image.module on line 641.
* warning: array_filter() [function.array-filter]: The first argument should be an array in ***/sites/all/modules/image/image.module on line 643.
cheers,
.jon
Comments
Comment #1
veresdaniel commentedSame here..
Comment #2
joachim commentedThe field for attached images has changed completely due to multiple attachments now being possible.
There is no way to update your views, you will need to change your views by hand.
This is mentioned in the release notes!
Marking this as need info -- please confirm if changing your field fixes the problem.
Comment #3
joachim commentedBetter title for other people to find this issue.
Comment #4
joachim commentedComment #5
caprenter commentedI got the same error message today, but not linked to CCK (I don't have it!). I was transferring a site over to a multi-site install, but I can't really tell what exactly was going on when I got the error.
A bit of googling and I found a 'fix' although I don't really know that it's the right thing.
I'm using PHP5 and I've seen it said that certain variables need to be marked as arrays. I changed line 641 from:
$image_attributes = array_merge($image_info,$attributes);
to
$image_attributes = array_merge((array)$image_info, (array)$attributes);
and my error messages went away - whether or not it is fixed is a different matter!
Hope that's of some use.
Comment #6
joachim commentedI think that's a different error that's also been fixed: #569526: Beta1 to Beta2 breaks Lightbox2 support
Comment #7
deg commentedMaybe I'm just tired and don't see it, but how do I "change your views by hand." I'm not seeing anything in the release notes to explain this. I've added another Image Attach > Attached Image field and it's still complaining of "Error: handler for image_attach > iid doesn't exist!"
Comment #8
joachim commented'Change views by hand' means edit the view, remove the old version of the field it complains about, add the new version of the field.
Comment #9
deg commentedIs the new version of the field called "Image Attach > Attached Image" like the old one? What is its new name and location?
Comment #10
joachim commentedErm... probably. I don't have the UI in front of me. I'm sure I called it something fairly clear.
Comment #11
deg commentedThanks for helping me sort through this. Turns out there was some confusion and I wasn't using the latest version of the module as I had thought. I am now able to remove the old filter and place the new one.