opening a new message as per http://drupal.org/node/455888#comment-5100506. the issue and fix is at http://drupal.org/node/455888#comment-4674252
relevant comments 62, 65-70
would really appreciate if the patch can be adopted.

CommentFileSizeAuthor
#4 unable-to-send-mail-455888-D6.patch642 bytessukr_s

Comments

longwave’s picture

Status: Active » Postponed (maintainer needs more info)

As Island Usurper said in #65

Well, I don't have a problem that the patch fixes. Causing a validation error on the checkout page doesn't prevent an email from being sent once checkout is completed, for my test site, anyway. The email address still shows up on the review page, doesn't it?

If you are using a module that skips checkout review and disabling the module causes this problem, then the issue lies with that module.

sukr_s’s picture

Status: Postponed (maintainer needs more info) » Active

with due respect, we can debate where the fix should be. if you check the couple of lines above the proposed fix, the order's uid is being set. and it would only be appropriate to set the order's primary_mail as well to make complete.
In the end it's your call.

tr’s picture

Status: Active » Postponed (maintainer needs more info)

@sukr_s: Please edit your original post above to completely state the problem and the proposed solution, instead of just providing a pointer to that other thread. The reason that other thread was closed because many people were reporting many completely unrelated problems with similar symptoms, making it extremely difficult to sort out what had been reported and which of those items had been fixed.

In the above, you simply provide a link to a comment where you say "I had the same problem ...", without stating which of the previous 60 comments yours is the "same" as. So in order to figure this out we would have to re-read that entire muddled thread and try to separate what's relevant to your issue from all the other stuff in there, which defeats the point of opening a new issue for your problem.

This may be a bug with Ubercart and it may not, but the only way it's going to get resolved is if you start from scratch, assume nothing, and post the symptoms of the problem as well as the steps needed to reproduce the problem. If you have a patch to fix the problem, post it here so the testbot can try it out.

sukr_s’s picture

Status: Postponed (maintainer needs more info) » Active
StatusFileSize
new642 bytes

Fair enough. Here is the detailed problem.

On our ecommerce site, we have eliminated the step of order review and users can directly place the order. We do not allow anonymous users to place orders. In the normal course, the order gets placed and the emails are sent out.

However, there are cases, where an error occurs during checkout e.g. mandatory field not filled. The users then correct the error and place the order. The order is placed successfully, however the emails are not sent. I've identified that this problem occurs because the $order->primary_email is not set. In the uc_cart_checkout_form_validate function, the $order->uid is being set and this is the point in time where the $order->primary_email can be set. Once this value is set, the order processing goes through fine and the email is as well sent without any error. I've deployed this on my site, in production and it works fine.

Trust this details out the problem. If you need any further information, do let me know.

I'm uploading the same patch that I had posted in the other thread.

longwave’s picture

Status: Active » Closed (works as designed)

I still don't see how this can happen, unless the 'process' callback of uc_checkout_pane_customer() is being skipped somehow. I don't think this is worth modifying in 6.x-2.x now anyway, as nobody else has reported the same problem.