Possibility to register over limit #1223
Replies: 5 comments
-
I could not reproduce the problem with the steps you described. I opened the registration form in 2 browsers for an event with exactly one possible participant and after submitting the second form, the expected message showed up, that the max. participants for the event is reached. The This check is implemented to make sure, that it is not possible to register over limit. The check takes care of many possible scenarios, but would of course fail, if 2 registrations are submitted at exactly the same time (registration1 and registration2 are both not persisted to DB while saveRegistrationAction is processed). I think, this scenario may only appear in very rare circumstances on high traffic websites with lots of registrations at the same time. Do you have the "Enable Waitlist" feature enabled for the event? If yes, this seems the only way to save registrations over the configured limit (saved registrations are flagged as "Waitlist Registrations"). If possible, is there any chance to debug your problem together, since I really can't reproduce the problem? |
Beta Was this translation helpful? Give feedback.
-
You're right, the waitlist was the issue. I propose to add a field on the Event "amount of registrations" which should be always updated in a transaction to make sure no parallel registrations are happening. Then inserting registration records can happen outside this transaction. In the past TYPO3 projects I have plenty of issues with many people trying to register in the same time when code was not using transactions. So this issue is not a theoretical case. |
Beta Was this translation helpful? Give feedback.
-
Even without Waitlist it seems to be possible that a logged in feuser registrates itself multiple times. Steps to reproduce: => Create Event => Login as User |
Beta Was this translation helpful? Give feedback.
-
You may have got the option "Max. simultaneous registrations per user" wrong. This setting is used to allow a user to create multiple registrations at once. When a user submits a registration with "Amount of registrations" set to "3", then 3 registrations will be created for this user. The only possibility to check, if a user is already registered to an event is to use the "Enable unique e-mail check for registration" on event basis |
Beta Was this translation helpful? Give feedback.
-
Oh, you are right. Sorry for the noise :-) |
Beta Was this translation helpful? Give feedback.
-
Extension version
development branch
Short problem description
Right now the only check for max number of participants is done in rendering the view of the registrationAction (using Event::getRegistrationPossible()).
So every user who opens a registration form before a limit is reached, can submit his registration without an issue.
The same issue will occur when there are few concurrent sessions writing registrations to the db in the same time, as there is no db transaction used.
Solution:
select for update
the event objectUnfortunately extbase doesn't provide an api for transactions, we would need to use direct queries for that. eg.
Steps to reproduce
Expected behaviour
Second registration should be rejected
Actual behaviour
Both registrations are accepted
Beta Was this translation helpful? Give feedback.
All reactions