Posted by aaronbauman on October 1, 2010 at 2:42pm
3 followers
| Project: | Content Profile |
| Version: | 6.x-1.x-dev |
| Component: | Miscellaneous |
| Category: | bug report |
| Priority: | normal |
| Assigned: | Unassigned |
| Status: | reviewed & tested by the community |
Issue Summary
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.
| Attachment | Size |
|---|---|
| content-profile-pageroute-node-pages.patch | 538 bytes |
Comments
#1
I can confirm this.
You should use module_load_include() instead of include_once() though.
#2
I 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
module_load_include('inc', 'node', 'node.pages');#3
#4