File Field o Drupal 7 regular pages works like a charm.... but in form blocks I get this error.

Warning: call_user_func_array() [function.call-user-func-array]: First argument is expected to be a valid callback, 'node_form' was given en drupal_retrieve_form() (línea 795 de /home/zumbwall/public_html/includes/form.inc).
Notice: Undefined index: #node en comment_form_node_form_alter() (línea 1193 de /home/zumbwall/public_html/modules/comment/comment.module).
Notice: Trying to get property of non-object en comment_form_node_form_alter() (línea 1210 de /home/zumbwall/public_html/modules/comment/comment.module).
Notice: Undefined index: #node en menu_form_node_form_alter() (línea 629 de /home/zumbwall/public_html/modules/menu/menu.module).
Notice: Trying to get property of non-object en menu_form_node_form_alter() (línea 629 de /home/zumbwall/public_html/modules/menu/menu.module).
Notice: Undefined index: #node en menu_form_node_form_alter() (línea 630 de /home/zumbwall/public_html/modules/menu/menu.module).
Notice: Trying to get property of non-object en menu_form_node_form_alter() (línea 630 de /home/zumbwall/public_html/modules/menu/menu.module).
Notice: Undefined index: field_documentos en file_ajax_upload() (línea 271 de /home/zumbwall/public_html/modules/file/file.module).
Notice: Undefined index: #suffix en file_ajax_upload() (línea 280 de /home/zumbwall/public_html/modules/file/file.module).

CommentFileSizeAuthor
#1 fix_filefield_ajax_upload-1601182-1.patch1.29 KBArrow
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

Arrow’s picture

Status: Active » Needs review
FileSize
1.29 KB

I also ran into this issue. It had to do with using node_add() within the module to load the form.

This patch replaces the node_add() and also eliminates the need to save and reset page title while generating the block.

After applying, you should no longer see this error.

mikey_p’s picture

Component: User interface » Code
Status: Needs review » Closed (duplicate)