Content Profile Pageroute > Edit Profile fails to render the profile node form, giving the error message
warning: call_user_func_array() [function.call-user-func-array]: First argument is expected to be a valid callback, 'node_form' was given in form.inc on line 376.
I recognized this notorious message from other troubleshooting: node.pages.inc was missing.
Apparently the parent class, PageroutePageEdit, never calls its own setUp function before handing the request off to its subclass.
The attached patch modifies ContentProfilePageEditProfile::setUp to include_once() node.pages.inc, addressing the issue.
Note: if you are not able to reproduce this issue, your drupal site may have already included node.pages.inc -- e.g. if you are rendering any part of a node or a node form in a block or view on the page.
Comments
Comment #1
dragonwize commentedI can confirm this.
You should use module_load_include() instead of include_once() though.
Comment #2
vishun commentedI can also confirm that the above patch and the module_load_include() approach resolves the issue. It would appear that the Pageroute API documentation may need to be updated at http://drupal.org/node/310810
Replacement
Comment #3
vishun commentedComment #4
vishun commented