Problem/Motivation

When I click to "Book now" button, given an error:
The website encountered an unexpected error. Please try again later.

Error: Call to a member function getOptions() on null in Drupal\bookable_calendar\DateFormatter::formatDateToBooking() (line 28 of /home/clients/client4/web18/web/kozterulet/web/modules/contrib/bookable_calendar/src/DateFormatter.php)

Warning: array_flip(): Can only flip STRING and INTEGER values! in Drupal\Core\Entity\EntityStorageBase->loadMultiple() (line 312 of /home/clients/client4/web18/web/kozterulet/web/core/lib/Drupal/Core/Entity/EntityStorageBase.php)

Steps to reproduce

Normal installation, only one calendar book opening, and clicked the button.

Comments

tomchy created an issue. See original summary.

tomchy’s picture

Component: User interface » Code
josh.fabean’s picture

Hi, I think I know what mistake I've made. I'm now letting you choose what format to output the dates based on the manage display settings of the Booking Entity. I will need to make a default display for that and probably add some checking to not break too.

To quickly fix this if you go to "/admin/structure/bookable-calendar/booking/display" and use the "smart date formatter" and set a format.

I should be able to get a fix out later today, or tomorrow for this.

josh.fabean’s picture

@tomchy this is fixed on 2.1.2, sorry about the issue.

tomchy’s picture

Status: Active » Fixed

Thank you the fast response!

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.