Early Bird Registration for DrupalCon Portland 2024 is open! Register by 23:59 PST on 31 March 2024, to get $100 off your ticket.
I added field "description" to image file type. Everything went ok but when i tried to fill this field under admin/content/media and saved it i see this message:
Notice: Undefined index: file in media_edit_submit() (line 366 of (...)\drupal\sites\all\modules\media\includes\media.pages.inc).
EntityMalformedException: Missing bundle property on entity of type file. in entity_extract_ids() (line 7562 of (...)\drupal\includes\common.inc).
Comment | File | Size | Author |
---|---|---|---|
#2 | media-pass_form_state_byref_media_edit-1723820-2.patch | 489 bytes | tedbow |
Comments
Comment #1
rychu90 CreditAttribution: rychu90 commentedComment #2
tedbowI have attached a patch that fixes this issue for me.
I believe this is caused $form_state is not passed by reference to the function media_edit. So right now:
Doesn't affect $form_state outside of the form. Then in
The file is not actually in $form_state.
Comment #4
bleen CreditAttribution: bleen commentedconfirmed that this is an issue in 7.x-1.-dev.
Also, I tried the patch in #2 and I believe it is the correct solution. Obviously we need to figure out why its failing though...
Comment #5
tedbowOk, If you click view details for the patch you will see that all the exceptions(no errors found) are similar to this:
With different line numbers.
Is this an existing problem in Media? I don't see how my patch could have caused this. But this is the first time I have looked at Media's code.
Comment #6
Dave ReidThanks, I committed #2 to Git. http://drupalcode.org/project/media.git/commit/6d25709
We can fix the test failures separately.