Possible bug - can join waiting list when can_register is false

  • Jeff Dun
  • Topic Author
  • Offline
  • New Member
  • New Member
More
13 hours 39 minutes ago #178022 by Jeff Dun
Hi,
common/button.php shows either the registration buttons or the waitling list buttons:
if (empty($hideRegisterButtons) && !$item->is_multiple_date)
{
    if ($item->can_register)
    {
        echo EventbookingHelperHtml::loadCommonLayout('common/buttons_register.php', );
    }
    elseif ($item->waiting_list && $item->registration_type != 3 && !EventbookingHelperRegistration::isUserJoinedWaitingList($item->id))
    {
        echo EventbookingHelperHtml::loadCommonLayout('common/buttons_waiting_list.php', );
    }
}

I have a situation where can_register is false due to the registration not being open, but waitinglist bookings were being allowed.

Is this expected?
I changed the else clause to this in my override:
                            elseif ($item->waiting_list && $item->registration_type != 3 && !EventbookingHelperRegistration::isUserJoinedWaitingList($item->id) && $event->cannot_register_reason == 'event_is_full')
and it fixes my problem, but i'm not sure if its correct to allow joining the waiting list if can_register is false.
Thanks
Jeff

Please Log in or Create an account to join the conversation.

More
10 hours 53 minutes ago #178025 by Tuan Pham Ngoc
Hi Jeff

It does not cover all the cases. I will review it and implement a proper/better fix

Regards,

Tuan

Please Log in or Create an account to join the conversation.

More
9 hours 47 minutes ago #178026 by Tuan Pham Ngoc
Hi Jeff

Actually, your code is good. I just made small adjustment to it to prevent warning. I updated code to server. You can download latest package from My Downloads section, update it to your site to have the issue sorted

Regards,

Tuan

Please Log in or Create an account to join the conversation.

Moderators: Tuan Pham Ngoc