Closed (duplicate)
Project:
D7 Media
Version:
7.x-1.x-dev
Component:
Code
Priority:
Major
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
22 Dec 2010 at 22:16 UTC
Updated:
10 May 2011 at 00:23 UTC
Jump to comment: Most recent file
Comments
Comment #1
dave reidI have no freaking clue what this unserialize is doing here. It doesn't seem to matter at all, which is ironic because the function media_field_widget_value() is not invoked at all which is the function doing the serialize().
I tested this and uploading and displaying a media element worked just fine.
Comment #2
effulgentsia commented#1 is a logical cleanup, but we need to verify it with a module that uses the 'data' column. There's some legacy cruft in there that we shouldn't need any more, but I don't want to rush its removal. So, I committed this instead, which equally fixes the ability to preview a node with a single-valued media field.
In the meantime, neither #1, nor this, fixes the fatal errors when previewing a multi-valued media field. But fixing that is a little trickier. The @todo in this patch explains.
Comment #3
effulgentsia commentedMarked #982180: $items in formatters are objects while core provides arrays a duplicate. Noting it here to remind anyone working on this that the solution really does need to be a complete fix to not use objects for $items[$delta] anywhere.
Comment #4
effulgentsia commentedComment #5
effulgentsia commentedThere's no patch yet posted for this (#2 was committed, but doesn't address this larger problem), so status = "active".
Comment #6
R.Muilwijk commentedsubscr
Comment #7
slashrsm commentedsubscribe
Comment #8
sherakama commentedsubscribe
Comment #9
sherakama commentedFor those who are needing a temporary fix just to get the preview to not WSOD here is a bandaid that casts the bad object into an array. Its working but definitely not a fix.
patches file media.fields.inc
* Ignore this upload patch and go to the comment below. Something wrong with file upload. *
Comment #10
sherakama commentedSomething funky with the last upload.
* BROKEN - Do not use *
Comment #11
sherakama commentedSorry for flooding the comments. Last item broke node_view but worked in preview. Added another condition to the statement so that it only casts the array temporary fix on preview.
Comment #12
Jackinloadup commentedThe patch in #11 uses a method similar to the method I used to patch field_slideshow. Worked pretty great.
http://drupal.org/node/1030606#comment-3962638
Comment #13
becw commentedThe fix to this was committed in commit 481128.
Comment #14
effulgentsia commented#13 refers to #2 being committed to fix the special case of a single-valued media field. The larger issue here still needs work. See #2-#5.
Comment #15
effulgentsia commentedThere's now a patch for this in #1064502: Fatal error: Cannot use object of type stdClass as array in modules/field/field.form.inc on line 193, so marking this one a duplicate. If you're able to test out that issue's patch and comment about your experience, that would help a lot. Thanks.