Hey

I get an error using cck and filefield 6.x-3.10.

The cck issue was solved here: http://drupal.org/node/1097548

But the filefield issue remains. Filefield is trying to merge two arrays, but the latter is set but does not contain an array.

I am quite new to this, so bear with meif the patch is not correctly formatted.

I have attached temporary fix.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

combert’s picture

Forgot to mention that the ckk version is 6.x-3.0-alpha3.

combert’s picture

FileSize
416 bytes

This one is better.

Lucience’s picture

Thanks, combert! Works like a charm!

circuscowboy’s picture

This worked as well for me. Although the patch had an error it worked fine when added manually.
Is this fix good enough to be included in the next upgrade?

combert’s picture

FileSize
565 bytes

Should have no error now.

Melissamcewen’s picture

#5 worked for me, thanks!!

Jerome F’s picture

There appears to be a similar issue in Drupal 7 core :
Warning: array_merge() [function.array-merge]: Argument #2 is not an array in file_field_widget_form() (line 463 of .../modules/file/file.field.inc).

But the fix provided in the patch is not reusable, as this line of code doesn't exist anymore.
You can reproduce this bug changing the language of a content from english to default language when there is an image field. The image will be lost, but you can solve this issue by uploading the image again.

I haven't found any issue in drupal core queue regarding this if someone does, please provide the link, I'll copy paste this comment there. I didn't create one because this is easy to solve and a wired behavior to switch languages like that, yet that can happen in a multilingual site.

Wappie08’s picture

Hi Jerome F, I experienced the same issues and created a new issue, please report back in #1261090: Images deleted after changing language of a node so we can figure this out!

Greetings Wappie

fabianderijk’s picture

#5 worked for me as well.

CarbonPig’s picture

#5 worked for me too - Thanks!

johnnydarkko’s picture

Thanks combert! #5 worked for me as well!

fabianderijk’s picture

Status: Needs review » Reviewed & tested by the community

Looks like it needs a new status >> Reviewed & tested by the community

quicksketch’s picture

Title: warning: array_merge() [function.array-merge]: Argument #2 is not an array in ... filefield/filefield.module on line 319 » warning: array_merge() [function.array-merge]: Argument #2 is not an array when using CCK 3.x
Status: Reviewed & tested by the community » Fixed

Thanks guys. Committed #5.

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.