Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
Hello everybody
After the ultimate update (6.3.6, Jun-30), i have this message on all pages of my site :
warning: array_merge() [function.array-merge]: Argument #1 is not an array in /var/www/vhosts/mysite.re/httpdocs/sites/all/modules/filefield/filefield_field.inc on line 292.
An idea ?
ps: sorry, it's difficult for me to write in english
Comment | File | Size | Author |
---|---|---|---|
#12 | filefield_merge_data.patch | 845 bytes | quicksketch |
#4 | filefield_merge_data.patch | 854 bytes | quicksketch |
#1 | filefield_merge_data.patch | 746 bytes | quicksketch |
Comments
Comment #1
quicksketchDang, well that's unfortunate. You're probably experiencing this problem either because A) you're showing files in a view or B) you've still got semi-corrupted data from the long-ago solve issue #407446: Per-Field to Per-Type Storage Corrupts Serialized Columns.
You can try out this patch to solve the problem.
Comment #2
whitespirit CreditAttribution: whitespirit commentedExcellent, it's work ! Yes i use a view A) ! Thanks a lot !!! Big Kiss !
Comment #3
braindrift CreditAttribution: braindrift commentedHi, i would suggest to do the same on line 294 (filefield_field.inc)
old:
$items[$delta] = array_merge($item, $file);
new:
$items[$delta] = array_merge($items[$delta], $file);
After that changes it works for me too.
Thanks.
Comment #4
quicksketchThanks dendie! Here we are with that included change.
Comment #5
AntiNSA CreditAttribution: AntiNSA commentedi having the exact same problem warning: array_merge() [function.array-merge]: Argument #1 is not an array in /home/cyberfan/htdocs/sites/all/modules/filefield/filefield_field.inc on line 292.
Ill try the patch now////
Comment #6
harcher CreditAttribution: harcher commentedWorks for me thanks. I applied the patch to 6.x-3.6
Comment #7
parasox CreditAttribution: parasox commentedThank you, the second patch seems to have worked fine for me, errors are gone.
Also affected me after the 3.6 update.
Comment #8
AntiNSA CreditAttribution: AntiNSA commentedworked for me...
Comment #9
threexk CreditAttribution: threexk commentedSubscribe. Curious whether this will lead to another release.
http://3281d.com/2009/03/27/death-to-subscribe-comments
Comment #10
eule CreditAttribution: eule commentedworks for me
Comment #11
quicksketchYes. :-(
Please let me know if you find ANY other problems after applying this patch.
Comment #12
quicksketchI've updated the patch to solve the issue in #841856: Generic field used in views doesn't display 'description' also.
Comment #13
quicksketchI've committed this patch. I'll put out yet another release after resolving #841318: Links to nodes lost after upgrading to 6.x-3.6 and #842078: Linked to node defaults to frontpage.
Comment #14
quicksketchVersion 3.7 is now available. Sorry for the troubles everyone.
Comment #15
Poieo CreditAttribution: Poieo commentedI've updated to version 3.7, but I'm still receiving the error in the original post. Any ideas? I have run update.php.
Comment #16
quicksketch@Poieo, make sure you delete any stray copies of filefield from your site. Drupal will find the module no matter where you've put it (i.e. filefield.bak/filefield.module, old/filefield/filefield.module, etc.) You can check the "system" database table to check which copy of FileField Drupal is picking up.
Comment #17
Poieo CreditAttribution: Poieo commentedDrupal is pulling the 3.7 version of filefield. I checked the system table and the error is giving the exact URL to the .inc file it's pulling. I double checked that file and it is the updated version...
Comment #18
threexk CreditAttribution: threexk commentedPoeio: Did you clear your cache? (Go to Administer->Performance, click 'Clear cached data'.)
I got an error initially about edit_access or something, but once I cleared the cache, no more errors.
Comment #19
Poieo CreditAttribution: Poieo commentedI did several times. Thanks for the idea though...
Very strange. Why would I still be getting the error when it's pulling the correct file? It doesn't seem possible that it could be pulling the updated file, but all the signs indicate that it is.
Comment #20
threexk CreditAttribution: threexk commentedPoeio: You could take the site offline, delete the filefield directory, then clear the cache. If you still get the same error then, that means the module is being loaded from elsewhere. If not, then you could redownload and re-extract the FileField release, and see if that helps.
Comment #21
Poieo CreditAttribution: Poieo commentedAgain, thanks for the idea, but still no luck. I have deleted the module files, downloaded and re-uploaded the 3.7 release, cleared all the cache files, and still receive the following error:
The URL in the error is the exact location of the new module files I have just uploaded...
Comment #22
quicksketchI think threexk's suggest is a good one. Delete the module entirely (don't reupload it), clear your caches and see if the FileField (and the error) still exist. All signs seem to point to a failure of the module update taking effect.
Comment #23
Poieo CreditAttribution: Poieo commentedI did in fact delete the module folder before my last post, cleared my caches, and still getting the error.
Thanks for your help so far.
Comment #24
threexk CreditAttribution: threexk commentedPoeio: I think the question is, do you still get the error when you have deleted the module's directory and cleared the cache? What happens when the module's files aren't there?
Comment #25
Poieo CreditAttribution: Poieo commentedSorry. I see now what quicksketch was asking. I deleted the module folder, cleared the cache, and the error is gone. Obviously all my fields are gone as well, but that's a given.
Comment #26
quicksketchOkay so here's the affected segment of code:
So the first argument is
$items[$delta]['data']
. This data should always exist, but it's possible that content you created, edited, and then resaved while running the 3.6 version may have deleted the data entirely. Does the error occur for new content on the site, or just some of the existing content? If the error only exists on certain nodes, I'd suggest editing the node and resaving it.Comment #27
Poieo CreditAttribution: Poieo commentedTo make a long story short, that was it...
A little background in case someone else comes across this issue. The nodes on this site were transferred via phpmyadmin from a D5 site. When I started getting the error, it was only on the home page and certain views pages, not on any nodes. I had several variations of the same view all displaying a different ubercart product type. Some of the views worked, some did not and returned page not found.
As it turns out, the views that did not work had products in them that had not been edited and re-saved since the data transfer. Once I edited all the products in that view, the error was gone and the view worked correctly.
Thanks again for all your help!
Comment #28
quicksketchPhew! Thank goodness. Thanks for the update Poieo.
Comment #29
aangel CreditAttribution: aangel commentedWhew. I had 300 nodes that were affected by this. Manually re-saving them wasn't appealing in the least.
However, views bulk operations enabled me to re-save each node with Drupal doing all the work instead of me. The error is now gone and the view works again.
Comment #31
grincon CreditAttribution: grincon commentedI used this code to find the offending node(s):
I opened the node(s), resaved them and problem was gone. Then I removed my lines from the module code to keep it clean.
I hope it helps
+German
htp://www.colomsoft.com
Comment #32
Desertgirl CreditAttribution: Desertgirl commentedI had the same error and the solution in #29 solved the issue!! THANK YOU!!
My situation was not an upgrade from D5 to D6. Not sure why it appeared, but so grateful for the resolution.
Cheers!
Comment #33
ccshannon CreditAttribution: ccshannon commentedThe problem for me is, I'm importing files and generating node content using a PHP script. When I go to my content view, which is a Views Bulk Operations view, which I have showing the images, I get these filefield errors mentioned above.
If I reload the View, I get WSOD.
Re-saving the nodes is not an acceptable solution for my client. There is no site admin day to day on his site, and I'm not going to tell my client he has to take extra steps to remove a blaring red bug every time he sends content to the system.
I'm wondering if I run a node_save on my imported nodes at the end of my import script, would that fix the issue. I will try it. Not very efficient, btw, but maybe that works to prevent this error.
I'm using latest and greatest Filefield, so the patched version doesn't help me.
Otherwise I need to hack fielfield to convert that non-array into an array, which I also don't want to do.
Comment #34
ju.ri CreditAttribution: ju.ri commentedI am getting this error for certain mp3 files, on newly created nodes. The error messages appear only on view pages. Could it be something with metadata? I will post back when have more details.
Comment #35
ju.ri CreditAttribution: ju.ri commentedok I solved it by transcoding the mp3 file, stripping the metadata, re-uploading... error disappeared.