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

lefnire’s picture

I'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.

lefnire’s picture

When 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 194

when 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 195

Is there some unimplemented stuff, or is this a bug? If unimplemented, I'd be willing to submit a patch with implementation

cyu’s picture

Also 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.

cyu’s picture

Is the root of this the line in pageroute.page_user_edit.inc that has commented out...

class pageroute_page_user_edit {// extends pageroute_page {  

This needs to extend pageroute_page in order to work correctly, doesn't it?

deekayen’s picture

I guess we can all assume it doesn't get fixed by uncommenting that so that it will extend pageroute_page?

duellj’s picture

@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.

lefnire’s picture

I 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:

  1. uncomment the line mentioned above
  2. change get_form(&$form_state, &$args) { to set_form(&$form, &$form_state, &$args) {
  3. you're all having issues with user_edit, I'm working on node_manage. I had to change some lines like return pageroute_page_add::get_node_add_form($form_state, $this); [line 26] to return 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.

Tauran’s picture

Hi 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.

Tauran’s picture

Version: 6.x-1.0-beta1 » 6.x-1.x-dev
Status: Active » Fixed

Status: Fixed » Closed (fixed)

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