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).
Comment | File | Size | Author |
---|---|---|---|
#1 | fix_filefield_ajax_upload-1601182-1.patch | 1.29 KB | Arrow |
Comments
Comment #1
ArrowI 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.
Comment #2
mikey_p CreditAttribution: mikey_p commentedDuplicate of #1167076: AJAX Callbacks do not include node.pages.inc and throw an error.