Hello,
Around Christmas time our users began reporting that our website checkout was broken. At first I couldn't reproduce the error, then I realized it only affected Internet Explorer browsers.
This took me more than 1 week to narrow the issue down, and today I figured out that the latest release of Ubercart Webform Checkout Pane breaks the checkout for IE users.
Issue: On /cart/checkout, both the 'Cancel' and 'Review order' buttons at the bottom do not function in IE if a Webform is used as a Checkout Pane.
Reason: I carefully examined the source HTML and the HTML validates just fine, HOWEVER, new to version 6.x-3.6 is ...
<form action="/cart/checkout" accept-charset="UTF-8" method="post" id="" class="webform-client-form" enctype="multipart/form-data">
...
</form>... positioned within Ubercart's own ...
<form action="/cart/checkout" accept-charset="UTF-8" method="post" id="uc-cart-checkout-form" enctype="multipart/form-data">
...
</form>... form that controls the entire checkout process. Chrome, Safari, and Firefox do not mind having this embedded Webform form within Ubercart's checkout form, BUT Microcrap Internet Exploder has a heat attack here.
Initial Thought: The theming for each <fieldset>...</fieldset> displays incorrectly on each successive fieldset after the webform fieldset -- but only for IE browsers. Therefore I thought it was a theming issue, but for the life of me I was certain I hadn't messed with any core Ubercart files nor my own theme templates.
Solution: I remember upgrading both Webform and Ubercart Webform Checkout Pane modules about a week before Christmas, so I carefully compared the previous & latest versions. Here is the required downgrade in order for IE users to use our checkout page:
File: uc_webform_pane.module
Line: ~ 527
Replace this 6.x-3.6 update:
$form = drupal_retrieve_form('webform_client_form_' . $node->nid, $form_state, $node, $submission);
drupal_prepare_form('webform_client_form_' . $node->nid, $form, $form_state);
// Remove some things that get in the way
foreach (array('details', 'form_id', 'form_token', 'actions', '#parents', '#theme', '#tree', '#id') as $key) {
unset($form[$key]);
}
foreach ($form['submitted'] as $key => $field) {
$form[$key] = $field;
}
unset($form['submitted']);
With the old 6.x-3.5 code:
$form = webform_client_form($form_state, $node, $submission);
$form = $form['submitted'];
And WA-LA! Internet Exploder now recognizes the 'Cancel' and 'Review order' buttons at the bottom of the checkout process, and the fieldset theming is no longer broken.
Regards,
BigMike
Comments
Comment #1
woodp commentedI was experiencing the same problem in #1394530: Checkout buttons don't work with Internet Explorer and this fix works for me as well. Excellent troubleshooting. Thank you!
(The issue title says 6.x-3.6 and the version field says 7.x-3.6 - In my case, I'm running 6.x-3.6.)
Comment #2
arski commentedHmm, well, that change to the way the form was loaded was kind of one of the main fixes of the release as it runs through hook_form_alter and thus allows other modules to adjust your forms individually..
I think a simple fix is to replace
with
I've tested it on my machine to make sure it doesn't break anything - could you please see if that fixes the IE issue as I don't have that on my dev machine I'm afraid :( Cheers!
Comment #3
dudás gábor commentedThis fix works for me. Tested on IE9.
Comment #4
arski commentedYea I thought it would. Great then, committed.
Comment #5
denisgre commentedHi Arksi and BigMike,
Thanks very much for this - I'm just about to launch my registration site and this was broken - now its fixed.
Confirming IE9 too.
Denis Grey
Royal Astronomical Society of Canada
Comment #6
BigMike commented#2 Confirmed in IE8. Thank you arski!!
Comment #7
sergeydruua commentedБольшое спасибо!
Такой же баг был и в opera
Comment #9
Dubber Dan commentedFab thanks you that sorted it for me to. Just now wonder how many orders I lost with people not letting us know it was broken. Ah well, at least I didn't do the update until recently
Comment #10
mitchell-dupe commentedThanks for this solution. Replacing those lines in the module file worked perfectly!
Comment #11
tstackhouse commentedThe Solution in #2 above worked perfectly. This really needs to be escalated so this fix can be applied to the next release, so future installs won't encounter this problem.
Comment #12
arski commentedThe fix has been committed a long time ago already. If you don't see a stable release dated later than the commit date, it means that there was a reason for the maintainer not to roll out a release and that you should use the -dev download instead.
That being said, I will probably roll out a new release quite soon.
Comment #13
sdjewani commentedcan any one tell me exact path of file, i am using drupal 6. and facing same issue. but unable to locate File: uc_webform_pane.module, i think i have't added this module. though my ubercart is working fine with Firefox and chrome.
Thanking in advance.
Sanjay Dev
Comment #14
woodp commentedThe answer would depend on where you installed the uc_webform_pane module but a standard installation (sites/all/modules) would place your file at sites/all/modules/uc_webform_pane/uc_webform_pane.module
Comment #15
sdjewani commenteddear woodp, i didn't used this module. well i fixed this issue by blocking javascript( some javascript file ) on page.tpl for this page and found this is working.
the issue was i am using fancybox for my site which was loaded on all pages, and ubercart already have this so there was conflict in javascript.
thanks for reply.
Comment #16
arski commented@sdjewani: please go through some details on how to use the issue queues. In particular, it is not meant to be a random forum discussion on some issues you're having, but a report system for a particular module. So if your issue sounds familiar like the title of the topic, make sure you're actually using the module where it has been posted first, otherwise you're just confusing everyone and, most importantly, won't get the help you need.
Comment #16.0
arski commented.