Posted: November 24, 2021 at 7:39 am
|
Hi, I have an event with a wait list that’s currently running. When I try to view it as an end user, I get the following error: Argument 2 passed to EventEspresso\WaitList\domain\services\forms\WaitListForm::__construct() must be of the type array, null given You can see the page here: https://rawumberstudios.com/events/figure-painting-with-luca-indraccolo-november-2021/ Any ideas? Thanks! |
Hi there, That’s strange! The error means the waitlist add-on couldn’t find tickets for the event to display on the form. Can you add a screenshot of your Event Datetimes & Tickets section so I can take a look? https://eventespresso.com/wiki/troubleshooting-checklist/#screenshots Note you can set your reply private so only EE staff can view it. |
|
|
This reply has been marked as private. |
|
This reply has been marked as private. |
Hmm, yeah thats really strange, I can’t reproduce this. Do you have the full stack trace for the above error? It’ll usually be within your sites error logs, or if you add this snippet to your sites wp-config.php file: https://eventespresso.com/wiki/troubleshooting-checklist/#wpdebug In place of what is normally just:
That will log errors to a location I can view them. |
|
|
Hi Tony, Thanks for the reply! For some reason the stack trace isn’t being logged, but I’ve done a bit of investigation and I’ve noticed 2 things: a) This used to work in a previous version of EE4 The call stack being: WaitListFormHandler.php!EventEspresso\WaitList\domain\services\forms\WaitListFormHandler->generate() Line 98 PHP |
Your 100% with that same setup this used to work? The waitlist add-on doesn’t display ‘expired’ tickets (tickets where the sale dates have passed) iirc, only sold out tickets that are technically ‘available’ otherwise.
That event hasn’t passed, it’s currently an ‘Active’ event (now() is between the start date of 2021-11-24 and the end date of 2021-11-26). You don’t have any active tickets for the waitlist add-on to display (the end date of the ticket is 2021-11-23) so your right, the above call for active_tickets() wouldn’t return that ticket… However, as you don’t have any active tickets the ticket selector shouldn’t be displaying anyway and the waitlist add-on wouldn’t be called. With that setup, it should show a message stating ticket sales had ended. |
|
|
I’m pretty sure it used to work in a previous version. I have been using a child theme to override some of the pages, so it’s possible I’ve messed something up somewhere. If I had to guess, it’s because this event is a multi-day event that is currently running, so it’s started but not finished, and has a wait list. I’m happy to send you a backup of my site if that would help? |
Thank you for the offer, but I’ve managed to reproduce this with fresh eyes. It happens when the ticket selector is set to display expired tickets and did indeed work prior to a recent update. I’ve created a ticket to investigate this further and will post the findings here. |
|
On further investigation with previous versions, although the waitlist option showed up on the page it couldn’t actually be used as no tickets are available in the ‘preferred option’ section. See here: https://monosnap.com/file/sTGkfJ65yNrgGJIxe6yzqn1wEXy24T The waitlist option should likely not show at all with that set up as there are no tickets available. |
|
The support post ‘TypeError thrown when viewing event with waitlist’ is closed to new replies.
Have a question about this support post? Create a new support post in our support forums and include a link to this existing support post so we can help you.