Hi,

We had a pageroute that was working fine with 6.x-1.0-beta4 but recently, around the time of an upgrade to 6.x-1.0-beta5, two problems have appeared:

(1) Back button stopped working: it re-loads the current form instead of going back. This consistently works with beta4 and fails with beta5 on this pageroute.

(2) The Back & Forward buttons started appearing in the middle of the forms instead of at the end. This has been intermittent on a dev site but occurring consistently on a test version of the same site running the same version of pageroute. When the broken layout occurs, the edit form is missing <div class="node-form"> and <div class="standard"> .

The pageroute where this is happening consists of a node add form followed by 6 content profile edit forms.

Any advice in tracking this down would be much appreciated.

Thanks,

Dave J

CommentFileSizeAuthor
#7 829170-pageroute-button-weight.patch874 bytesmrfelton
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

brei9000’s picture

I also noticed the back button malfunctioning.

NathanM’s picture

Also having the button layout problem.

steviesky’s picture

Hi,

I have spent all day working on this...i havent been too long working with drupal but i think i have figured out the problem.
There doesnt seem to be a weight applied to the container that holds the buttons.

From my knowledge you can do 2 things.
1) Extend or change the module by putting the following in the pageroute.module function pageroute_add_buttons

$form['bottom']['#weight'] = 200;

2) Or the better i think is too create a module yourself and put the following function in there

function impress_wizard_form_alter(&$form, $form_state, $form_id) {

  if ($form['type']['#value'] == 'wizard_website_details') {

	$form['bottom']['#weight'] = 200;	
  }

}

where the wizard_website_details is your form name....you could also use in the if the id of your from

There may be a better approach and if there is id love to hear it but for now this works so i can continue with what i was trying to do :-)

Hope this helps someone and save them a few hours going through the code.

NathanM’s picture

Thanks for the tip. The one line fix was fine.

cbear42’s picture

Hi -

One line fix *almost* works...at least there's progress....Now my buttons are split! I have "Save" at the top of the form - and "Cancel" and "Forward" at the bottom...
using the the " $form['bottom']['#weight'] = 200; " fix like this:

function pageroute_add_buttons(&$form, &$page, $button_name = 'page_op') {
//get the right options first
$form['bottom']['#weight'] = 200;
$options = pageroute_invoke($page, 'options');

if (!empty($page->options['current_group'])) {
$options = $page->options[$page->options['current_group']];

}
else {
$options = $page->options;
}

The content_groups table in my phpmyadmin do not have the content types I am trying to use in Pageroute...and the regular content_* tables do not have "weight" as an option..that I can see.

So - any way of moving "Save" to the bottom of the page?

TIA!

mrfelton’s picture

Fix at 5 does it for me.

mrfelton’s picture

Status: Active » Needs review
FileSize
874 bytes

Patch attached