Possible bug - can join waiting list when can_register is false

  • Jeff Dun
  • Topic Author
  • Offline
  • New Member
  • New Member
More
3 weeks 4 days 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
3 weeks 4 days 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
3 weeks 4 days 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.

  • Jeff Dun
  • Topic Author
  • Offline
  • New Member
  • New Member
More
3 weeks 4 days ago #178033 by Jeff Dun
my code was wrong haha - it should have been $item instead of $event doh.
I'll check your updates
Thanks
Jeff

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

More
3 weeks 4 days ago #178035 by Tuan Pham Ngoc
OK Jeff. Just download and update your site to latest package of Events Booking and you will be fine

Regards,

Tuan

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

Moderators: Tuan Pham Ngoc