The registration_waitlist module, in its default configuration, doesn't respect the allow_multiple setting on the registration node.

If you enable waitlist and leave the registration state with its default settings, anyone who registers and is put on the waitlist will be able to register themselves again. This will be confusing. The workaround is to set the waitlist registration state to be "active" on the registration states page. This causes a problem with the event count on the registrations list - it will say there are more slots filled than are available.

To reproduce...
Setup:

  1. On a vanilla Drupal site, download and enable registration, registration_waitlist, and their dependencies.
  2. Create a content type called Event.
  3. Create a registration type. Leave all settings at their defaults.
  4. Add a Registration field to the content type. Leave all field settings at their defaults. (In particular, do not check the "allow multiple" box.)
  5. Set permissions for authenticated users to create, view, and edit registrations. Set permissions for them to register themselves and to register other accounts.
  6. Create an Event node.
  7. In the registration settings for the event node: enable registration, set the capacity to 1, and enable the waitlist. Leave all other settings at the default. (In particular, do not check the "allow multiple" box.)
  8. Create an authenticated user (other than yourself).
  9. Go to the Register tab for the Event. Select "other account" in the "I am registering" field and register the other authenticated user.

The bug:

  1. Go back to the Register tab for the event. You should see the Waitlist message. Choose to register "myself." Save the registration.
  2. You should see success messages about the registration being saved and placed on the waitlist.
  3. Go back to the register tab again.
  4. Note you can still choose "myself" as a registration option.
  5. Choose to register "myself." Save the registration.
  6. Note you see the success messages.
  7. Go to the registrations list for the event.
  8. Note there are two registrations for your account, both with the status of "wait list." You should also see a capacity message that "1 of 1 spaces are filled."

The workaround:

  1. Go to the settings page for Registration States.
  2. Check the box in the Active column for the Wait list status.
  3. Save the settings.
  4. Go back to the register tab for the event.
  5. Note that you no longer have the option to register "myself."
  6. Go to the registrations list for the event.
  7. Note that the capacity message now says "3 of 1 spaces are filled."

Comments

cboyden created an issue. See original summary.

cboyden’s picture

Issue summary: View changes
cboyden’s picture

This is also an issue with any registration state that's not flagged as active. If the user's initial registration is in a non-active state, that user can collect more registrations in non-active states.

dsnopek’s picture

I'm a little concerned about the workaround of marking the "waitlist" state as active causing other collateral damage. Having a state marked as active is Registration's way of saying that the user is successfully registered for the event, so if something is detecting that (which is not specifically checking for the waitlist state) it could break.

Looking at the code in Registration, it's using 'active' states for the following:

  • The event count
  • Who to send the broadcast e-mails to
  • The result of the registration_is_registered() function, which is in turn used for:
  • The default field formatter
  • The 'Allow multiple' support (which is what this workaround is specifically working around)

Some possible alternative solutions:

  1. Adding an API function like registration_can_register() which uses a hook to determine if the user is able to register. By default, this would just check registration_is_registered() and see if multiple registrations are allowed. But the waitlist module could add it's own logic around being on the waitlist. Then this could be used by the field formatter, or anywhere where you want to determine if the user is allowed to register.
  2. Adding a hook to alter the result of registration_is_registered() so that waitlist could directly apply this rules, rather than potentially causing other problems with other uses of the 'active' state (like the broadcast message). However, I think I like #1 first, because the user isn't really registered when they are on the waitlist...
cboyden’s picture

Thanks for the suggestions @dsnopek. I also like your idea 1 better. Are you envisioning that registration_can_register() would encompass all of the existing access and capacity checks, or would it just be added as another condition in the existing internal workflow?

dsnopek’s picture

I'd say it should encompass as much of the checks as it can, unless we end up finding a certain set of checks problematic to include. Someone would need to try to implement it to see if that's the case!

john.oltman’s picture

Version: 7.x-1.x-dev » 3.0.x-dev
Component: Miscellaneous » Registration Wait List
Category: Bug report » Support request
Issue tags: -waitlist
john.oltman’s picture

Status: Active » Fixed

This was fixed in the initial 3.x release of wait list.

john.oltman’s picture

Status: Fixed » Closed (fixed)