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
Comment | File | Size | Author |
---|---|---|---|
#7 | 829170-pageroute-button-weight.patch | 874 bytes | mrfelton |
Comments
Comment #1
brei9000 CreditAttribution: brei9000 commentedI also noticed the back button malfunctioning.
Comment #2
NathanM CreditAttribution: NathanM commentedAlso having the button layout problem.
Comment #3
steviesky CreditAttribution: steviesky commentedHi,
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
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.
Comment #4
NathanM CreditAttribution: NathanM commentedThanks for the tip. The one line fix was fine.
Comment #5
cbear42 CreditAttribution: cbear42 commentedHi -
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!
Comment #6
mrfelton CreditAttribution: mrfelton commentedFix at 5 does it for me.
Comment #7
mrfelton CreditAttribution: mrfelton commentedPatch attached