Closed (cannot reproduce)
Project:
Payment for Drupal Commerce
Version:
7.x-1.x-dev
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
9 Jun 2013 at 12:33 UTC
Updated:
2 Aug 2013 at 18:02 UTC
When selecting another payment method during the first checkout step, the checkout process gets stuck in the first step. The form is submitted but the user is led right back to step 1, without any error messages (checked the log as well).
From there:
Something that I've noticed:
This only occurs if the payment method is switched before the form is filled out completely. If I first fill out all the form fields and only then switch the payment method, the submission of the form works and I can proceed to step 2.
So basically if I switch the payment method before completely filling out the rest of the form, I am stuck in the first checkout step. Any ideas what might be causing this?
Comments
Comment #1
mobweb commentedWe figured out that the cause of this problem is an ajax call that is sent while the user is filling out the form. One such call was placed by the "Commerce Shipping" module, and it was named "Recalculate Shipping". We completely disabled that logic, and now it seems to be working and the bug is gone. However, if the user switches the shipping country, another such ajax call is made (to check if the newly selected country has a "Postal Code" field among others).
So the problem seems to be caused by these ajax calls. If such a call is made and the payment method is switched afterward, the checkout won't advance past the first step. What's really odd about this is that we inspected all the data that is sent and received via these calls, and the data is identical with and without the bug occurring. If somebody would like to take a look at this I'll happily provide the debugging logs that I created with the various ajax data!
Comment #2
luksakmobweb and me are working on the same project. After disbling all possibly related modules and setting the theme to Bartik, I discovered that disabling the "Calculate shipping rates via AJAX as addresses are updated on the checkout form. " on the shipping payment pane solved the issue. How is this related to payment?
Comment #3
xanoThanks for reporting this issue. Payment uses some AJAX to refresh the payment method-related form elements when a different method is selected. Maybe this clashes with some of Commerce's code.
Comment #4
luksakYes, it seems to. How can we fix this?
Comment #5
xanoPlease provide step-by-step instructions on how to reproduce the problem on a clean install using Drupal 7.x-dev, Payment 7.x-1.x-dev and Payment for Drupal Commerce 7.x-1.x-dev. Otherwise other people won't have the possibility to examine the problem.
Comment #6
xanoClosing this due to lack of response.