Closed (fixed)
Project:
FileField
Version:
6.x-3.0-alpha6
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
25 Jan 2009 at 16:40 UTC
Updated:
10 Feb 2009 at 18:40 UTC
Jump to comment: Most recent file
Comments
Comment #1
upupax commentedPatch doesn't work for me.
I've tried to modify or create new contents, but I still get
warning: unserialize() expects parameter 1 to be stringComment #2
drewish commentedplease post patches, not .gz files.
Comment #3
alexpott@upupax - Have you removed the changes you made to try the solution posted on http://drupal.org/node/350297
@drewish - okay here's it posted as a patch
Comment #4
alexpott---
Comment #5
drewish commentedFixed the comment. Anyone else able to test this?
Comment #6
upupax commentedAfter reinstalling both modules everything seems solved..
Thanks a lot!
Comment #7
markus_petrux commentedThe fix seems to solve the issue, but maybe the root of the problem is in CCK itself?
Curiously enough, CCK handles serialization transparently in content_write_record(), handling insert/update. However, it doesn't offer a similar feature on field data load. :(
CCK invokes hook_field('load') and filefield already does the unserialization in filefield_field_load(), so it seems the problem may only happen when field data is not loaded by CCK. Probably from Views? ...and this problem happens when the CCK views handler for a field invokes content_format() from the render method. Maybe that method could deal with unserialization, but that would be a CCK issue.
In cck/includes/views/handlers/content_handler_field.inc
CCK could also handle the unserialization of field columns from content_storage('load'), and then filefield would not have to worry about it.
Comment #8
alexpottComment #7 seems to make a great deal of sense - after all if CCK is doing the serializing then it should handle all the unserializing!
Comment #9
markus_petrux commentedWell, I just opened bug report in the CCK issue queue: #364440: Inconsistent management of serialized columns
Let's see if this can be resolved in origin. If so, current code in filefield that unserializes the data could be patched to only invoke unserialize if $item['data'] is string, so it would still work with versions of CCK older than the one that could include support for unserializing in CCK itself. Well, maybe, it's just an idea.
Comment #10
drewish commentedmarked #350297: Title and Alt fields display "a" when editing form as a duplicate.
Comment #11
drewish commentedwent ahead and committed this to HEAD. simple fix so there's no sense in waiting for CCK.