Hello,

When trying to restore a form that was saved with no errors (and everything was indeed in the autosaved_forms db table) i got some error like

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()

i think the problem is this restore functionality is accessed by ajax and drupal might not be fully bootstrapped there? seems the error goes away adding

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

to the bottom of the $items['autosave/restore'] array in the autosave_menu() hook implementation.

thanks!

CommentFileSizeAuthor
#2 2829595-php_error_on_restore.patch442 bytesjoey-santiago
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

joey-santiago created an issue. See original summary.

joey-santiago’s picture

Hello,

this is the patch i created for this. Applies fine to 2.2 and dev. I only tested 2.2 as dev gives me many other errors.

Hope it's useful to anyone :)

cheers