After upgrading to the latest version of Media and File Entity I can not use the attach button on the node edit page after picking a video. The ajax callback pops up this error:

An AJAX HTTP request terminated abnormally.
Debugging information follows.
Path: /media/ajax/field_videos/und/form-73WlAmST0wKhWYAkcixmyz_9FrjysbaPWtSDI4ZIsj0
StatusText: n/a
ResponseText: 
Error  
Error message
Warning: call_user_func_array() expects parameter 1 to be a valid callback, function 'node_form' not found or invalid function name in drupal_retrieve_form() (line 807 of [...]/includes/form.inc).
Notice: Undefined index: #node in comment_form_node_form_alter() (line 1206 of [...]/modules/comment/comment.module).
Notice: Trying to get property of non-object in comment_form_node_form_alter() (line 1223 of [...]/modules/comment/comment.module).
Notice: Undefined index: #node in diff_form_node_form_alter() (line 322 of [...]/sites/all/modules/diff/diff.module).
Notice: Trying to get property of non-object in diff_form_node_form_alter() (line 323 of [...]/sites/all/modules/diff/diff.module).
Notice: Undefined index: #node in menu_form_node_form_alter() (line 629 of [...]/modules/menu/menu.module).
Notice: Trying to get property of non-object in menu_form_node_form_alter() (line 629 of [...]/modules/menu/menu.module).
Notice: Undefined index: #node in menu_form_node_form_alter() (line 630 of [...]/modules/menu/menu.module).
Notice: Trying to get property of non-object in menu_form_node_form_alter() (line 630 of [...]/modules/menu/menu.module).
Notice: Undefined index: type in xmlsitemap_node_form_node_form_alter() (line 136 of [...]/sites/all/modules/xmlsitemap/xmlsitemap_node/xmlsitemap_node.module).
Notice: Undefined index: nid in xmlsitemap_node_form_node_form_alter() (line 136 of [...]/sites/all/modules/xmlsitemap/xmlsitemap_node/xmlsitemap_node.module).
Notice: Undefined index: type in workbench_moderation_form_node_form_alter() (line 837 of [...]/sites/all/modules/workbench_moderation/workbench_moderation.module).
Notice: Undefined index: #node in menu_attributes_form_node_form_alter() (line 144 of [...]/sites/all/modules/menu_attributes/menu_attributes.module).
Notice: Trying to get property of non-object in menu_attributes_form_node_form_alter() (line 144 of [...]/sites/all/modules/menu_attributes/menu_attributes.module).
Recoverable fatal error: Argument 2 passed to _menu_attributes_form_alter() must be of the type array, null given, called in [...]/sites/all/modules/menu_attributes/menu_attributes.module on line 145 and defined in _menu_attributes_form_alter() (line 158 of [...]/sites/all/modules/menu_attributes/menu_attributes.module).
The website encountered an unexpected error. Please try again later.    

ReadyState: undefined

I managed to solve this for my use case by adding the following line to media_ajax_upload() just before the call to drupal_process_form() :

module_load_include('inc', 'node', 'node.pages');

As described in http://stackoverflow.com/questions/14252779/drupal-node-form-undefined-f... . I don't think this solution will work for every situation though.

Comments

Chris Matthews’s picture

Status: Active » Closed (outdated)

Closing this issue as outdated. However, if you think this issue is still important, please let us know and we will gladly re-open it for review.
sincerely,
- the Drupal Media Team