Closed (fixed)
Project:
Ubercart Event Registration
Version:
6.x-1.2
Component:
Main Module
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
9 Apr 2011 at 16:16 UTC
Updated:
8 Jun 2011 at 09:41 UTC
Jump to comment: Most recent file
Comments
Comment #1
andyf commentedOoh, I was just about to post a patch to fix event registration page break behaviour. I'm not using attributes and didn't really look at that aspect of the code. Let me know if this fixes it - if not, hopefully it'll be relatively painless to add it.
Comment #2
ChrisLaFrancis commentedLooks like the attributes are still showing up on every page and being reset. I am, however, no longer seeing the message about the form being submitted after clicking the "Next" button.
Comment #3
andyf commentedThanks for the feedback fivefrank. I've done a modification to the patch but it's based on inspection only I'm afraid. I'm a bit busy at the mo so probably won't be able to look at it this week. Let me know if it works (fingers crossed!).
Comment #4
ChrisLaFrancis commentedDefinitely getting closer. The attributes only appear on the first page of the webform, but by the time we make it to checkout, they're not affecting the price as they should, so I'm guessing their values are being lost.
Getting two errors in the log when the form is submitted:
I really appreciate all the work you're putting into this.
Comment #5
andyf commentedThanks fivefrank. I really don't have time to properly look at it. The error on line 188 is the problem:
I think
$form['#post']only contains the details from the latest page submission, which is why it doesn't contain page 1's attributes. I believe if you look in$form_state['values']you should find it. So try replacing line 188 withIf that fails try a
dpm($form_state)and try to find the location ofuc_event_attributeson the final page submission.HTH
A.
Comment #6
ChrisLaFrancis commentedThanks again for all your help. I couldn't find 'uc_event_attributes' in $form_state, but I was able to find it in $form... $form['#parameters'][1]['values']['uc_event_attributes'] seems to be working.
Comment #7
andyf commentedGreat stuff! Would you be able to post the final patch for other users/module author?
Comment #8
ChrisLaFrancis commentedFirst time I made a patch using git. It's the same as your last patch with the exception of the one line that I changed. Thank you again.
Comment #9
ChrisLaFrancis commentedActually just realized attributes values are still being lost if there are more than two pages in the webform.
Comment #10
ChrisLaFrancis commentedChecked $form and $form_state, and 'uc_event_attributes' just isn't present anymore by the time we make it to checkout if the webform has more than two pages.
Comment #11
andyf commentedThat's a shame. The place to look is in webform's submit handler. It's possible that the attributes were added to
$form_state['storage']and then removed by the final submit handler (otherwise the form wouldn't submit properly) before our submit handler's called. It could be that webform's just ignoring that data entirely (ie not copying it to$form_state['storage']) because it's not part of the webform, in which case we either want to write our own submit handler, or maybe we can hide the attributes amongst the webform components and get webform to store them for us. That's all I can think of at the mo. I can maybe take a look this weekend.Comment #12
andyf commentedThis works for me, let me know if any problems.
Comment #13
Rob_Feature commentedThis patch is now in the latest dev (April 18, 2011). Please test.
Comment #14
ChrisLaFrancis commentedWorking for me also. Thanks for your hard work, AndyF.
Comment #15
Saoirse1916 commentedJust wanted to confirm this works great for me as well. Thanks for a nice module!
Comment #16
andyf commented