
Timothée Besse
Hi,
I ran into a critical error message from wordpress on trying to download bookings from the event card on the admin calendar view. (Link ending with eo-action=export-bookings)
The browser shows an 500 error :
Failed to load resource: the server responded with a status of 500
(Internal Server Error)
I noticed that if I remove the eo-action parameter from the link url (…?action=event-admin-cal&start=2021-07-26&end=2021-09-06&_fs_blog_admin=true&event_id=88416&occurrence_id=2179) I get a response with the (unformatted) details of the event.
And from the Bookings management view I can download a CSV of all bookings, filtered by the event.
Where can I look for the source of this bug ?
Thanks !
Timothée

renek4321
Hi,
It takes 23 seconds for the booking to be processed after a user submits a booking.
How can i best increase this performance?
thanks,

Stephen Harris
Hi Dylan,
This wasn’t originally possible because the booking process was too closely coupled with the UI and also payment gateways.
The latest major version might make this easier to implement: the admin UI could present the booking form, but not request payment and potentially immediately auto-confirm the booking. I’ll need to look into this to be sure though.

Stephen Harris
Hi Marco,
Yes there has been changes which I think has broken that code snippet slightly.
Rather than use $errors->add
you should retrieve an element from the booking form an attach errors to it.
E.g. the line(s) in question should read:
/* Throw error if user has previously made a booking for this event */
if( eo_user_has_bookings( get_current_user_id(), $post_id, $occurrence_id, eo_get_reserved_booking_statuses() ) ){
//This error will prevent the booking from being processed, and display the given error message
$form->get_element( 'ticketpicker' )->add_error( 'previous_booking', 'You have already made a booking for this event.' );
}
That should cause the error message to appear under the ticket picker.
And further down you’d want to do:
/* Throw error if booking contains multiple tickets */
if( $total_qty > 1 ){
$form->get_element( 'ticketpicker' )->add_error( 'too_many_tickets', 'You can only purchase one ticket.' );
}

Jade W.
OK
I managed to add an extra column using
add_filter( ‘manage_event_page_bookings_columns’, function( $columns ) {
$columns[‘_player_name’] = ‘Player Name’;
return $columns;
}, 20 );
I’m confused how to pull booking form fields into the column? I have a input form field ID:23

Jade W.
Hi.We need to be able to view one of the fields from the booking form when looking at all bookings. Currently the parent (adult) makes the booking for their kids so when looking at all bookings under Events > Bookings – we can only see Bookee name and not the kid’s name (the one attending). How can we add an additional column in order to view the kid’s name which is input field on the booking form? Or is there a way to change what appears under the Bookee column which is the WP user to the custom field value instead?
Thanks

Marco
Hi,
I want to limit the number of tickets in a booking according your tutorial in https://wp-event-organiser.com/blog/tutorial/limit-bookings-to-one-ticket/ (snippet copied to the site-utility.php).
My test user already has a booking, and when he tries to book an additional ticket for the course, I would actually have expected an error message, e.g. near the submit button, as with other error messages.
The message is mentioned in your article and defined in the code snippet (‘previous_booking’).
But there isn’t one… Neither above the button, nor anywhere else in the booking form.
Could you please check this. Has anything changed since 2013 that prevents the message from being displayed?
Thanks,
Marco

Benjamin Ogg
Dear Stephen
Please allow another question:
I am using shortcodes to display events [eo_fullcalender] and booking form [event_booking_form]
How can I integrate your code there accordingly?
Sorry, I am not that good in code… :o(
Cheers, Benjamin

kreevogmbh
Thanks Stephen for your quick response. Even if i change url to path the error occurs still. The file is loaded, because if the path or url is wrong i get a 404 in the console. But it seems like that the .tmpl file is not rendered correct if the first char “<” is “unexpected”. I register the button now like this:
EO_Booking_Form_Controller::register(
'file', //element type ID
'Fichier', //Label for the form customiser
'/wp-content/themes/theme_name/backbone-model.js',
'/wp-content/themes/theme_name/customiser-view.tmpl',
'advanced' //which metabox to add the button to: standard, advanced
);
Can i do something else?
Thx!

Stephen Harris
Hi Madeleine,
It should still work, but there is an easier way to do this now:
add_action( 'eventorganiser_validate_booking_submission', function( $input, $form, $errors ){
$ticketpicker = $form->get_element( 'ticketpicker' );
$tickets = count($ticketpicker->get_value());
if($tickets > 1) {
$ticketpicker->add_error( 'too_many_tickets', 'You may only book 1 ticket for this event.' );
}
return $input;
}, 20, 3);
This only prevents multiple tickets in a single booking, it doesn’t limit a customer to only one booking, though.

kreevogmbh
Hi Stephen,
first of all, thank you for the great plugin and your support. For a client i need to add a file upload to the bookingform as well and i was using your suggestion of this topic. I can see the new button in the backend of the booking form but i cannot add the button to the form. Nothing happens if i click on the it. In the console i get the error “Uncaught SyntaxError: Unexpected token ‘<‘ ” which is coming from the customiser-view.tmpl. I use the current version of WordPress 5.5 and the current plugin version.
Do you have an idea how i could get the button to work properly?
Thank you very much!
Greetings,
Denny

Stephen Harris
Hi Owen,
I’ll just sent an email to get a copy of the booking form (you can export it as json file) to help me investigate this.

Stephen Harris
Hi Jason,
There is an error in your theme which is breaking the javascript on the booking form, which is causing it not to function correctly:
Uncaught TypeError: $(…).live is not a function
Choo
jQuery 2
Choo
jQuery 4 gdlr-script.js:498:12

Stephen Harris
Hi Jef,
I wasn’t able to test the booking form on your site as its requires a log-in, but I did notice the following error in the browser console:
wpo-minify-header-eo_pro_booking_form.min.js:2 Uncaught ReferenceError: Backbone is not defined
at wpo-minify-header-eo_pro_booking_form.min.js:2
at wpo-minify-header-eo_pro_booking_form.min.js:2
It looks like you have a minify plug-in enabled (wpo-minify-header?) and it is breaking the javascript. I would suggest disabling wpo-minify (or if possible excluding Event Organiser javascript files – which are already minified).

Jason Barnett
Hello,
After a recent update to WP5.5, and updating EO, EO-Pro and Discounts, when filling in the booking form to then proceed to the payment, it kicks the user back to the form without progressing, appending #eo-bookings to the url and throwing the error at pre-form;
Warning: Illegal string offset ‘type’ in public_html/wp-content/plugins/event-organiser-pro/includes/form-customiser/class-eo-booking-form-element.php on line 1454
Try it here; https://www.jackcollisonsoccerschool.com/course/bedfordshire-summer-camp-week-2/
Thanks