Posted by combert on May 28, 2011 at 12:27pm
9 followers
| Project: | FileField |
| Version: | 6.x-3.10 |
| Component: | Code |
| Category: | bug report |
| Priority: | normal |
| Assigned: | Unassigned |
| Status: | needs review |
Issue Summary
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.
| Attachment | Size |
|---|---|
| _filefield_merge_error.patch | 414 bytes |
Comments
#1
Forgot to mention that the ckk version is 6.x-3.0-alpha3.
#2
This one is better.
#3
Thanks, combert! Works like a charm!
#4
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?
#5
Should have no error now.
#6
#5 worked for me, thanks!!
#7
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.
#8
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
#9
#5 worked for me as well.
#10
#5 worked for me too - Thanks!
#11
Thanks combert! #5 worked for me as well!