-6

I have the same problem described in I get image field upload errors with a custom node_add() form.

How do I add these lines to the menu item array?

'file path' => drupal_get_path('module', 'node'),
'file' => 'node.pages.inc',

I get the following errors:

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 800 of C:\xampp\htdocs\semt1\includes\form.inc).
Notice: Undefined index: #node in comment_form_node_form_alter() (line 1194 of C:\xampp\htdocs\semt1\modules\comment\comment.module).
Notice: Trying to get property of non-object in comment_form_node_form_alter() (line 1211 of C:\xampp\htdocs\semt1\modules\comment\comment.module).
Notice: Undefined index: #node in location_node_form_node_form_alter() (line 14 of C:\xampp\htdocs\semt1\sites\all\modules\location\location_node.module).
Notice: Trying to get property of non-object in location_node_form_node_form_alter() (line 15 of C:\xampp\htdocs\semt1\sites\all\modules\location\location_node.module).
Notice: Undefined index: #node in menu_form_node_form_alter() (line 629 of C:\xampp\htdocs\semt1\modules\menu\menu.module).
Notice: Trying to get property of non-object in menu_form_node_form_alter() (line 629 of C:\xampp\htdocs\semt1\modules\menu\menu.module).
Notice: Undefined index: #node in menu_form_node_form_alter() (line 630 of C:\xampp\htdocs\semt1\modules\menu\menu.module).
Notice: Trying to get property of non-object in menu_form_node_form_alter() (line 630 of C:\xampp\htdocs\semt1\modules\menu\menu.module).
Notice: Undefined index: #node in translation_form_node_form_alter() (line 135 of C:\xampp\htdocs\semt1\modules\translation\translation.module).
Notice: Trying to get property of non-object in translation_form_node_form_alter() (line 135 of C:\xampp\htdocs\semt1\modules\translation\translation.module).
Notice: Undefined index: field_im in file_ajax_upload() (line 271 of C:\xampp\htdocs\semt1\modules\file\file.module).
Notice: Undefined index: #suffix in file_ajax_upload() (line 280 of C:\xampp\htdocs\semt1\modules\file\file.module).

I am using this module.

closed as too localized by Chapabu, Clive, Anil Sagar, Letharion, kiamlaluno Nov 21 '12 at 11:39

This question is unlikely to help any future visitors; it is only relevant to a small geographic area, a specific moment in time, or an extraordinarily narrow situation that is not generally applicable to the worldwide audience of the internet. For help making this question more broadly applicable, visit the help center. If this question can be reworded to fit the rules in the help center, please edit the question.

  • This seems like a very localized issue concerning a non-Drupal hosted module. You would probably be better off asking whoever wrote the original code. – Chapabu Oct 21 '12 at 19:12
1

Try this:

function yourmodule_menu_alter(&$items) {
  $items['system/ajax']['file path'] = drupal_get_path('module', 'node');
  $items['system/ajax']['file'] = 'node.pages.inc';
}
  • I try this function bus still same error when upload file – Omar Shbaro Oct 21 '12 at 17:43
  • if you have another solution tell me about – Omar Shbaro Oct 21 '12 at 17:56
  • did you flushed all chaches? – Marius Ilie Oct 21 '12 at 19:24
  • yes I clear all cache – Omar Shbaro Oct 21 '12 at 19:49
  • Have you replaced yourmodule in the function's name with your actual module name? – Marius Ilie Oct 22 '12 at 8:55

Not the answer you're looking for? Browse other questions tagged or ask your own question.