When adding a group node the form is rendered on the enabled theme (and not on the admin theme despite the proper configs).

If the content type has a file field, the user is unable to upload the file with the following error:

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 841 of /var/vhosts/drupal/includes/form.inc).

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

ydahi’s picture

Version: 7.x-1.0-beta2 » 7.x-1.x-dev
Status: Active » Needs review
FileSize
946 bytes
kristiaanvandeneynde’s picture

Title: Broken file upload on node add pages (gnode) » Properly include node.pages.inc on node forms
FileSize
3.02 KB

I've reworked the function to do what we need at the right level (form). No need to place the file include on the menu level. I've also fixed the menu items to properly be set as MENU_CALLBACK and changed the page title for node add forms when shown in a group context.

Please review.

ydahi’s picture

Wonderful, patch works as described.

Just a note: I'm not sure if your intention was to have the node edit forms show in the admin theme (if configured that way)? The edit forms are displaying in the front-end theme despite having the site configured to show them in the admin theme.

This isn't a problem for me, but just wanted to add that side note in case your patch above tried to address that as well.

Thanks again for the speedy patch!

kristiaanvandeneynde’s picture

Status: Needs review » Fixed

Fixed that one too just now. Check out dev.

Status: Fixed » Closed (fixed)

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