Hi, I need to run a booking module for anonymous users. However, when I make a reservation as an anonymous person, I get the error that I do not have any user assigned. The error below:

Drupal\Core\Entity\EntityStorageException: SQLSTATE[23000]: Integrity constraint violation: 1048 Column 'uid' cannot be null: INSERT INTO "booking_contact" ("uuid", "email", "uid", "party_size", "booking_instance", "checked_in") VALUES (:db_insert_placeholder_0, :db_insert_placeholder_1, :db_insert_placeholder_2, :db_insert_placeholder_3, :db_insert_placeholder_4, :db_insert_placeholder_5); Array ( [:db_insert_placeholder_0] => d664ab62-b1a0-4f98-8a07-fcf81d973702 [:db_insert_placeholder_1] => biuro@e-jankowska.pl [:db_insert_placeholder_2] => [:db_insert_placeholder_3] => 1 [:db_insert_placeholder_4] => 858 [:db_insert_placeholder_5] => 0 ) in Drupal\Core\Entity\Sql\SqlContentEntityStorage->save() (line 811 of core/lib/Drupal/Core/Entity/Sql/SqlContentEntityStorage.php

In addition, is it possible to send an e-mail to an anonymous user with the option of canceling your booking?

Thanks for the help.

Comments

Katarzyna_Starzynska created an issue. See original summary.

josh.fabean’s picture

Hi, thanks for the bug report. I should be able to get that fixed shortly.

Katarzyna_Starzynska’s picture

Hi. We already have the patch ready. We will throw it into your verification in a moment.

Mirek_Sabiniewicz’s picture

StatusFileSize
new2.25 KB

Hi :)
A patch that resolved in our case:

  • the possibility of booking by an anonymous user
  • a redirection to the home page after removing the booking date from the link sent in the confirmation email
josh.fabean’s picture

Thank you very much. I tested, and that patch works and is pushed to 2.1.3 and 2.1.x.

josh.fabean’s picture

Status: Active » Fixed

Status: Fixed » Closed (fixed)

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