When registrations are enabled, if capacity field is left blank, no registrations are possible and the 'Unfortunately, this event is at capacity and there are no spaces available.' message is shown.

Suggest that no value equals unlimited capacity or that the field is mandatory.

I think unlimited capacity makes most sense.

Comments

MrPaulDriver created an issue. See original summary.

owenbush’s picture

Good find, thanks Paul.

I'll get this looked at.

mrpauldriver’s picture

Help text to be worded accordingly.

mrpauldriver’s picture

Revisiting this today.

When completing the event form it is easy to miss 'Total Number of Spaces Available' field. If the field is not populated then registrations are not possible, because the event is at capacity. This is a bug.

Please make this field mandatory.

The field also need needs a something for unlimited capacity (-1 perhaps).

owenbush’s picture

This one is on the roadmap to a 1.0 stable release as part of a bigger "form validation" piece, which is kind of lacking at this time.

owenbush’s picture

Component: Code » Recurring Events Registration (Submodule)
owenbush’s picture

Snehal Brahmbhatt’s picture

Status: Active » Needs review
StatusFileSize
new1.43 KB

@MrPaulDriver @owenbush Please find this patch to resolve the above-mentioned issue.

Hope this works for you flawlessly!

Thanks,
Snehal Brahmbhatt
https://www.drupal.org/user/3147795/track

owenbush’s picture

StatusFileSize
new1.61 KB
new1.53 KB

Thanks for the patch. There were a couple of issues:

1 - After you returned -1 for the capacity, you then also set the $capacity = 0; This won't run after the return so I removed that assignment.
2 - I moved the comment about that -1 capacity to above the line to make it more consistent with coding standards.
3 - When displaying the capacity the word 'Unlimited' should be translated, so I wrapped it in $this->t(), and also cleaned up the array a little because the line was over 80 characters.

Supplied are an interdiff and a new patch.

mrpauldriver’s picture

This is working nicely.

Suggest that help text on the edit form should be updated.

From:
Maximum number of attendees available for each series, or individual event

To:
Maximum number of attendees available for each series, or individual event. Leave blank for unlimited.

owenbush’s picture

Good idea, Paul. Thanks. I've added an interdiff and a new patch.

mrpauldriver’s picture

Status: Needs review » Reviewed & tested by the community

Looks good.

  • owenbush committed e053f4e on 8.x-1.x
    Issue #3090302 by owenbush, Snehal Brahmbhatt, MrPaulDriver:...
owenbush’s picture

Status: Reviewed & tested by the community » Fixed

Super duper, thanks for all the help. This has been merged and marked as fixed.

owenbush’s picture

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.