Registration open/close dates can be empty with series registration

Created on 11 January 2023, over 1 year ago
Updated 3 February 2023, over 1 year ago

Problem/Motivation

When Series Registration is chosen and Scheduled Registration is chosen, the event can be saved with no registration dates causing event pages and any event views to produce errors.

Steps to reproduce

On a fresh install or using simplytest.me, enable Recurring Events and Recurring Events Registration modules.

Create an event with registration enabled and set to "series registration"

Set "Registration Dates" to "Scheduled Registration"

The Registration Opens and Registration Closes fields are not required.

Save the event and see that the event can be saved with no registration dates.

View one of the created event instances and get WSOD. In error log:

Notice: Undefined variable: reg_start in Drupal\recurring_events_registration\RegistrationCreationService->registrationOpeningClosingTime() (line 660 of /var/lib/tugboat/stm/web/modules/contrib/recurring_events/modules/recurring_events_registration/src/RegistrationCreationService.php)
Notice: Undefined variable: reg_end in Drupal\recurring_events_registration\RegistrationCreationService->registrationOpeningClosingTime() (line 661 of /var/lib/tugboat/stm/web/modules/contrib/recurring_events/modules/recurring_events_registration/src/RegistrationCreationService.php)
Error: Call to a member function getTimestamp() on null in Drupal\recurring_events_registration\RegistrationCreationService->registrationIsOpen() (line 549 of /var/lib/tugboat/stm/web/modules/contrib/recurring_events/modules/recurring_events_registration/src/RegistrationCreationService.php)

Proposed resolution

  • Ensure the form states make the registration dates fields required
  • Add some checks to make sure empty registration dates do not cause site-breaking errors.
πŸ› Bug report
Status

Fixed

Version

2.0

Component

Recurring Events Registration (Submodule)

Created by

πŸ‡¨πŸ‡¦Canada endless_wander

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

Production build 0.69.0 2024