[Catalyst] The old double-post issue
Perrin Harkins
perrin at elem.com
Thu Sep 21 23:09:07 CEST 2006
On Wed, 2006-09-20 at 21:33 -0700, Bill Moseley wrote:
> Even if I trap the exception the user is still going to get a
> confusing message if they double post. Instead of "Transaction
> Complete" they will see "Sorry, this transaction is already complete"
> kind of thing.
Sure, but something strange happened, so a different message is a
reasonable response. We just provide a message for this about how the
transaction wasn't processed because another identical one just came
through in the last minute and it looks like a duplicate. That seems
pretty easy to understand.
> I'm wondering what others are doing to deal with double-posts. Is
> using Javascript to disable the form after posting helpful?
Hard to tell, since like you, I never figured out how this was happening
at all. We don't use a unique ID in the form, but we do redirect
immediately. I figured it must be some brief network problem or
something.
The fix we settled on was form-specific. It checks the database for
something that looks like a dupe of the submitted transaction within a
certain time span.
- Perrin
More information about the Catalyst
mailing list