Closed (fixed)
Project:
Media Browser Plus
Version:
7.x-3.0-beta1
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
17 Apr 2013 at 08:36 UTC
Updated:
19 Apr 2013 at 14:08 UTC
I get the following error when I try to add media in a node:
Notice: Undefined index: #step in media_browser_plus_form_file_entity_add_upload_alter() (line 748 of /usr/local/web/cms-htdocs/sites/all/modules/media_browser_plus/media_browser_plus.module).
I did a var_dump of the form variable and I have no step in it:
array
'upload' =>
array
'#type' => string 'managed_file' (length=12)
'#title' => string 'Upload a new file' (length=17)
'#upload_location' => string 'public://' (length=9)
'#upload_validators' =>
array
'file_validate_extensions' =>
array
...
'file_validate_size' =>
array
...
'#progress_indicator' => string 'bar' (length=3)
'#required' => boolean true
'#pre_render' =>
array
0 => string 'file_managed_file_pre_render' (length=28)
1 => string 'file_entity_upload_validators_pre_render' (length=40)
'actions' =>
array
'#type' => string 'actions' (length=7)
'submit' =>
array
'#type' => string 'submit' (length=6)
'#value' => string 'Submit' (length=6)
'#form_id' => string 'file_entity_add_upload' (length=22)
'#type' => string 'form' (length=4)
'#build_id' => string 'form-10j33hRT2Ym0PMx-CAq4OBS1l-NvK7attjpTfv1ahWE' (length=48)
'form_build_id' =>
array
'#type' => string 'hidden' (length=6)
'#value' => string 'form-10j33hRT2Ym0PMx-CAq4OBS1l-NvK7attjpTfv1ahWE' (length=48)
'#id' => string 'form-10j33hRT2Ym0PMx-CAq4OBS1l-NvK7attjpTfv1ahWE' (length=48)
'#name' => string 'form_build_id' (length=13)
'#parents' =>
array
0 => string 'form_build_id' (length=13)
'#token' => string 'file_entity_add_upload' (length=22)
'form_token' =>
array
'#id' => string 'edit-file-entity-add-upload-form-token' (length=38)
'#type' => string 'token' (length=5)
'#default_value' => string 'gjOa42hgY_xrdRTBetdv9RXx4p7VpHIPC_oNzoAYi4o' (length=43)
'#parents' =>
array
0 => string 'form_token' (length=10)
'form_id' =>
array
'#type' => string 'hidden' (length=6)
'#value' => string 'file_entity_add_upload' (length=22)
'#id' => string 'edit-file-entity-add-upload' (length=27)
'#parents' =>
array
0 => string 'form_id' (length=7)
'#id' => string 'file-entity-add-upload' (length=22)
'#method' => string 'post' (length=4)
'#action' => string '/media/browser?render=media-popup&plugins=' (length=42)
'#theme_wrappers' =>
array
0 => string 'form' (length=4)
'#post_render' =>
array
0 => string 'ckeditor_link_form_post_render' (length=30)
'#tree' => boolean false
'#parents' =>
array
empty
'#validate' =>
array
empty
'#submit' =>
array
0 => string 'file_entity_add_upload_submit' (length=29)
1 => string 'media_browser_form_submit' (length=25)
'#theme' =>
array
0 => string 'file_entity_add_upload' (length=22)
Comments
Comment #1
das-peter commented#stepis part of thefile_entitymodule, if it's not present it's likely you use an incompatible version.Please provided detail information:
admin/config/development/performanceIt's always a good idea to do complete cache flush:
drush cc allor useadmin/config/development/performanceComment #2
plinto commentedSorry about that:
Drupal version: 7.22
File Entity: 7.x-2.0-unstable7
Media: 7.x-2.0-unstable7
Theme: Adaptive Themes 7.x-3.1
I tried in Chrome (26) and Firefox (20) and got the same error
Error message:
Notice: Undefined index: #step in media_browser_plus_form_file_entity_add_upload_alter() (line 747 of /usr/local/web/cms-htdocs/sites/all/modules/media_browser_plus/media_browser_plus.module).
Comment #3
plinto commentedComment #4
das-peter commentedNevermind :)
I found the issue, MBP effectively relies on the File Entity module past 2012-11-21 13:00 :|
Looks like this patch #1553114: Adding files should be a multi-step process provided the very handy
'#step'item, but was committed just some days after releasing unstable7.May I ask you to give the latest dev of file entity a try?
I'd prefer not to introduce any version dependent code in this MBP branch. At least not yet ;)
Comment #5
plinto commentedThanks, Updated media and file entity to the latest dev and the error is gone.