When I try to upload a file to a not created node I receive following:

Warning: call_user_func_array() expects parameter 1 to be a valid callback, function 'node_form' not found or invalid function name в функции drupal_retrieve_form() (строка 795 в файле C:\xampp\htdocs\bt__\includes\form.inc).
Notice: Undefined index: #node в функции comment_form_node_form_alter() (строка 1193 в файле C:\xampp\htdocs\bt__\modules\comment\comment.module).
Notice: Trying to get property of non-object в функции comment_form_node_form_alter() (строка 1210 в файле C:\xampp\htdocs\bt__\modules\comment\comment.module).
Notice: Undefined index: #node в функции menu_form_node_form_alter() (строка 629 в файле C:\xampp\htdocs\bt__\modules\menu\menu.module).
Notice: Trying to get property of non-object в функции menu_form_node_form_alter() (строка 629 в файле C:\xampp\htdocs\bt__\modules\menu\menu.module).
Notice: Undefined index: #node в функции menu_form_node_form_alter() (строка 630 в файле C:\xampp\htdocs\bt__\modules\menu\menu.module).
Notice: Trying to get property of non-object в функции menu_form_node_form_alter() (строка 630 в файле C:\xampp\htdocs\bt__\modules\menu\menu.module).
Notice: Undefined index: field_issue_files в функции file_ajax_upload() (строка 271 в файле C:\xampp\htdocs\bt__\modules\file\file.module).
Notice: Undefined index: #suffix в функции file_ajax_upload() (строка 280 в файле C:\xampp\htdocs\bt__\modules\file\file.module).

But there is everything alright when uploading files to an excisting node.
It seems to me that this error appered after updating Project and Project Issue Tracking modules.

CommentFileSizeAuthor
#4 1684974-fix-callback.patch1.51 KBbdragon

Comments

bdragon’s picture

Have you tried clearing caches? (admin/config/development/performance)

mvlabat’s picture

Done. Nothing has changed... I still get the same error. (

mvlabat’s picture

The problem still exists. How to solve it?

bdragon’s picture

Status: Active » Needs review
StatusFileSize
new1.51 KB

Ah, I see what's going on.

Since node_add is in node.pages.inc, it's usually implicitly included. But since we're manually setting up the form, it's only ensuring issue_node_form.inc is loaded...

Try this patch.

dww’s picture

Issue tags: +project, +drupal.org D7

Tagging so this doesn't get lost.

I'll try to review test in the near future if possible, although if mvlabat can test the latest patch and report back your findings, that'd be great.

Thanks,
-Derek

mvlabat’s picture

Excuse me for my being absent for so long...
But yes! The patch works for me! Thank you a lot! :)

bdragon’s picture

Automatically closed -- issue fixed for 2 weeks with no activity.