Closed (fixed)
Project:
Pageroute
Version:
6.x-1.x-dev
Component:
Code
Priority:
Critical
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
30 Jan 2009 at 01:06 UTC
Updated:
2 Mar 2009 at 17:40 UTC
I'm trying to setup pageroute in conjuction with Content Profile by setting up a User editing form. I created a pageroute with two pages, one with the user settings and one with the content profile node. Here's the export code:
array (
'options' =>
array (
'tabs' => '2',
'access' =>
array (
'allowed_roles' =>
array (
1 => 1,
2 => 2,
3 => 3,
6 => 6,
4 => 4,
5 => 5,
7 => 7,
),
),
'redirect_path' => 'test2',
'no_messages' => 1,
),
'pages' =>
array (
0 =>
array (
'name' => 'step1',
'module' => 'pageroute',
'type' => 'user_edit',
'title' => 'Account Settings',
'options' =>
array (
'activated' => 1,
'no_tab' => 0,
'forward' => 'Next',
'back' => 'Back',
'cancel' => '',
'category' => 'account',
),
'weight' => '-10',
),
1 =>
array (
'name' => 'step2',
'module' => 'pageroute',
'type' => 'user_edit',
'title' => 'Agent Info',
'options' =>
array (
'activated' => 1,
'no_tab' => 0,
'forward' => 'Next',
'back' => 'Back',
'cancel' => '',
'category' => 'agent_profile',
),
'weight' => '-10',
),
),
'page_index' =>
array (
'step1' => 0,
'step2' => 1,
),
'page_access' =>
array (
),
'path' => 'test',
'page_data_current' => NULL,
'page_data_previous' => NULL,
)
When going to the page, I get the following php error:
Fatal error: Call to protected method pageroute_page_user_edit::set_up() from context 'pageroute_page' in ***/sites/all/modules/pageroute/pageroute.page.inc on line 68
If I change the method to be public, I get the following error:
Fatal error: Call to undefined method pageroute_page_user_edit::set_form() in ***/sites/all/modules/pageroute/pageroute.route.inc on line 194
Comments
Comment #1
lefnire commentedI'm getting the same error with no complicated route. It's just node-manage to node-view, and I get
Fatal error: Call to protected method pageroute_page_manage::set_up() from context 'pageroute_page' in D:\workspace\eclipse\elc2\sites\all\modules\pageroute\pageroute.page.inc on line 68(along with all those other Call-time pass-by-reference errors)This bugger's definitely critical.
Comment #2
lefnire commentedWhen I make these methods public, the next error is
Fatal error: Call to undefined method pageroute_page_manage::set_form() in D:\workspace\eclipse\elc2\sites\all\modules\pageroute\pageroute.route.inc on line 194when I create a dummy function set_form(), i get
Fatal error: Call to undefined method pageroute_page_manage::configure_form() in D:\workspace\eclipse\elc2\sites\all\modules\pageroute\pageroute.route.inc on line 195Is there some unimplemented stuff, or is this a bug? If unimplemented, I'd be willing to submit a patch with implementation
Comment #3
cyu commentedAlso running across this error when trying to tie content profile and pageroute together. I'm trying this on an upgraded d5 site coming from nodeprofile and nodefamily, but will also try a fresh install and see if I have this same error.
Comment #4
cyu commentedIs the root of this the line in pageroute.page_user_edit.inc that has commented out...
This needs to extend pageroute_page in order to work correctly, doesn't it?
Comment #5
deekayen commentedI guess we can all assume it doesn't get fixed by uncommenting that so that it will extend pageroute_page?
Comment #6
duellj commented@deekayen, cYu:
If you haven't tried it already, uncommenting the parent class for pageroute_page_user_edit results in a fatal error. The abstract function set_form() defined in pageroute_page isn't defined in pageroute_page_user_edit. It seems like it's a critical function (the comments in pageroute.page.inc for set_form: "Returns the form to display the page type."), but I'm not sure what form elements need to be set for the user page type.
Comment #7
lefnire commentedI was playing around with code... I don't know what the fago/tauran intended (so this might be a step in the wrong direction), but here's what I got:
get_form(&$form_state, &$args) {toset_form(&$form, &$form_state, &$args) {return pageroute_page_add::get_node_add_form($form_state, $this); [line 26]toreturn pageroute_page_add::set_node_add_form($form, $form_state, $this);Will work on some more tomorrow, burned out now. I'll submit a patch if I can figure things out.
Comment #8
Tauran commentedHi all,
I'm sorry I didn't respond for quite a while - I was very busy with other things (university)...
Lefnire your suggestions are going in the right direction.
I will fix this until tomorrow.
Comment #9
Tauran commented