Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
I had a Node, which includes an Image field.
I wanted to Clone, but to change the image, as well as a few other details.
Got this as soon as I chose "remove" image :-
* Warning: call_user_func_array() [function.call-user-func-array]: First argument is expected to be a valid callback, 'node_form' was given in drupal_retrieve_form() (line 771 of /home/likalco/public_html/core/includes/form.inc).
* Notice: Undefined index: #node in comment_form_node_form_alter() (line 1190 of /home/likalco/public_html/core/modules/comment/comment.module).
* Notice: Trying to get property of non-object in comment_form_node_form_alter() (line 1207 of /home/likalco/public_html/core/modules/comment/comment.module).
* Notice: Undefined index: #node in menu_form_node_form_alter() (line 594 of /home/likalco/public_html/core/modules/menu/menu.module).
* Notice: Trying to get property of non-object in menu_form_node_form_alter() (line 594 of /home/likalco/public_html/core/modules/menu/menu.module).
* Notice: Undefined index: #node in menu_form_node_form_alter() (line 600 of /home/likalco/public_html/core/modules/menu/menu.module).
* Notice: Trying to get property of non-object in menu_form_node_form_alter() (line 600 of /home/likalco/public_html/core/modules/menu/menu.module).
* Notice: Undefined index: field_image in file_ajax_upload() (line 265 of /home/likalco/public_html/core/modules/file/file.module).
* Notice: Undefined index: #suffix in file_ajax_upload() (line 274 of /home/likalco/public_html/core/modules/file/file.module).
I went ahead and saved anyway and the Node cloned, but with the original image.
I was then able to change the image by subsequent editing.
Comment | File | Size | Author |
---|---|---|---|
#13 | node_clone-ajax_error-1156922-13.patch | 276 bytes | cashwilliams |
#3 | cloneimagefield.info | 399 bytes | supportPIC |
#3 | cloneimagefield.txt | 4.59 KB | supportPIC |
Comments
Comment #1
supportPIC CreditAttribution: supportPIC commentedsubscribe
Comment #2
supportPIC CreditAttribution: supportPIC commentedI think all is coming from the first warning, but I can't see why its gives an error since the callback function called is the same as in a usual node addition.
Comment #3
supportPIC CreditAttribution: supportPIC commentedSeems quite similar to this issue: http://drupal.org/node/1105624
I patch it through another attached module that manage image field cloning. It is a quick/strange/ugly patch since the [files] attribute was in the $form[build_info][args] array and I added in the $form[build_info][files].
A recheck of this module (and of image management) from its creator would be welcomed. I am not sure it duplicate images properly.
Comment #4
Anonymous (not verified) CreditAttribution: Anonymous commentedSame issue here.
Also happens on clean drupal install.
Install with standard install profile. Cloning the default "article" content type and changing the image will throw this error.
Anybody a solution?
Comment #5
Anonymous (not verified) CreditAttribution: Anonymous commentedJust a note: by settings the clone node settings in "admin/config/content/clone" to "Save as a new node then edit" we can prevent the error from happening.
Comment #6
wonder95 CreditAttribution: wonder95 commentedI was having this same issue with Ctools 7.x-1.0-rc1 (it was actually in Page Manager, per the link in #3). I updated to the latest 7.x-1.x-dev (2012-Jan-23), and the error has gone away.
Comment #7
joya CreditAttribution: joya commentedsubscribe..
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() (Zeile 787 von /home/....../includes/form.inc).
Comment #8
zareth CreditAttribution: zareth commentedI had the same issue and fixed it by patching the module node clone.
Just added the line on top of the file clone.pages.inc:
PS : it seems that module_load_include doesn't work and I didn't find why)
Comment #9
tamerzg CreditAttribution: tamerzg commentedHaving same issue. Proposed change in #8 worked for me.
Comment #10
capellic#8 Works.
Comment #11
ecksley CreditAttribution: ecksley commentedYes, #8 works, thanks Zareth!
Comment #12
mstef CreditAttribution: mstef commented#8 works
Comment #13
cashwilliams CreditAttribution: cashwilliams commentedwrapped #8 into a patch
Comment #14
cashwilliams CreditAttribution: cashwilliams commentedComment #15
pwolanin CreditAttribution: pwolanin commentedThis might be fixed by #1447974: Call to undefined function node_form_validate() - please verify
Comment #16
pwolanin CreditAttribution: pwolanin as a volunteer commented