I get errors creating a Hotel Type with alpha1 and dev. The node gets created but fields don't get saved and viewing it throws a very long list of undefined errors. I've re-installed several times and downgraded my Date to Date 1.x (apparently in 2.x there's been some 'field-handling' changes). The tables mentioned in dev errors exist but are empty. Is there anything else to check in my database?

Steps to reproduce errors:
1) Completely uninstall Rules, Hotel Booking, and Date.
2) Flush cache twice from Performance page
3) Fresh upload and enabling, one at a time, UC beta2, Rules 2.x dev, Date 1.x, Hotel Booking alpha1
Upon enabling Hotel Booking, I get the error:

Notice: Undefined index: full in field_info_max_weight() (line 797 of /hanlovelights/modules/field/field.info.inc).

4) Disable and re-enable the module, and the error does not return.
5) Go to admin/store/hotel_booking from browser bar (my Ubercart menu items disappeared a while ago and have not come back)
6) Add base rate, and fill in values for all days
7) Create node on node/add/hotel-room-type

Trying to add content in HB dev returns these errors:

Notice: Trying to get property of non-object in hotel_booking_auto_availability() (line 594 of /hanlovelights/sites/all/modules/uc_hotel/hotel_booking/hotel_booking.util.inc).
Notice: Trying to get property of non-object in hotel_booking_auto_availability() (line 595 of /hanlovelights/sites/all/modules/uc_hotel/hotel_booking/hotel_booking.util.inc).
Notice: Trying to get property of non-object in hotel_booking_auto_availability() (line 605 of /hanlovelights/sites/all/modules/uc_hotel/hotel_booking/hotel_booking.util.inc).
Notice: Trying to get property of non-object in hotel_booking_auto_availability() (line 607 of /hanlovelights/sites/all/modules/uc_hotel/hotel_booking/hotel_booking.util.inc).
PDOException: SQLSTATE[22007]: Invalid datetime format: 1292 Incorrect datetime value: '' for column 'calendar_dt' at row 1: INSERT INTO {hotel_booking_availability_calendars} (nid, calendar_dt, available) VALUES (:db_insert_placeholder_0, :db_insert_placeholder_1, :db_insert_placeholder_2); Array ( [:db_insert_placeholder_0] => 0 [:db_insert_placeholder_1] => [:db_insert_placeholder_2] => 0 ) in drupal_write_record() (line 6776 of /hanlovelights/includes/common.inc).

Trying to add content in alpha1 errors:

Warning: preg_match() expects parameter 2 to be string, object given in DateObject->parse() (line 368 of /hanlovelights/sites/all/modules/date/date_api/date_api.module).
Warning: array_shift() [function.array-shift]: The argument should be an array in DateObject->parse() (line 369 of /hanlovelights/sites/all/modules/date/date_api/date_api.module).
Warning: preg_match() expects parameter 2 to be string, object given in DateObject->parse() (line 368 of /hanlovelights/sites/all/modules/date/date_api/date_api.module).
Warning: array_shift() [function.array-shift]: The argument should be an array in DateObject->parse() (line 369 of /hanlovelights/sites/all/modules/date/date_api/date_api.module).
Warning: preg_match() expects parameter 2 to be string, object given in DateObject->parse() (line 368 of /hanlovelights/sites/all/modules/date/date_api/date_api.module).
Warning: array_shift() [function.array-shift]: The argument should be an array in DateObject->parse() (line 369 of /hanlovelights/sites/all/modules/date/date_api/date_api.module).
Warning: preg_match() expects parameter 2 to be string, object given in DateObject->parse() (line 368 of /hanlovelights/sites/all/modules/date/date_api/date_api.module).
Warning: array_shift() [function.array-shift]: The argument should be an array in DateObject->parse() (line 369 of /hanlovelights/sites/all/modules/date/date_api/date_api.module).
Warning: preg_match() expects parameter 2 to be string, object given in DateObject->parse() (line 368 of /hanlovelights/sites/all/modules/date/date_api/date_api.module).
Warning: array_shift() [function.array-shift]: The argument should be an array in DateObject->parse() (line 369 of /hanlovelights/sites/all/modules/date/date_api/date_api.module).
Warning: preg_match() expects parameter 2 to be string, object given in DateObject->parse() (line 368 of /hanlovelights/sites/all/modules/date/date_api/date_api.module).
Warning: array_shift() [function.array-shift]: The argument should be an array in DateObject->parse() (line 369 of /hanlovelights/sites/all/modules/date/date_api/date_api.module).
Warning: preg_match() expects parameter 2 to be string, object given in DateObject->parse() (line 368 of /hanlovelights/sites/all/modules/date/date_api/date_api.module).
Warning: array_shift() [function.array-shift]: The argument should be an array in DateObject->parse() (line 369 of /hanlovelights/sites/all/modules/date/date_api/date_api.module).
Notice: Object of class stdClass could not be converted to int in drupal_write_record() (line 6733 of /hanlovelights/includes/common.inc).
PDOException: SQLSTATE[22007]: Invalid datetime format: 1292 Incorrect datetime value: '' for column 'calendar_dt' at row 1: INSERT INTO {hotel_booking_availability_calendars} (nid, calendar_dt, available) VALUES (:db_insert_placeholder_0, :db_insert_placeholder_1, :db_insert_placeholder_2); Array ( [:db_insert_placeholder_0] => 143 [:db_insert_placeholder_1] => [:db_insert_placeholder_2] => 1 ) in drupal_write_record() (line 6776 of /hanlovelights/includes/common.inc).

Comments

larowlan’s picture

Hi
How do you get on if you disable the 'auto availablity feature' from the hotel booking settings?
This is where the error is being thrown.

I'll try and make some time for this in the next two days. I'll aim to get it to work with date v2.

LR

larowlan’s picture

Category: support » bug
mattcasey’s picture

It works when I set auto availability to 0 :)

mattcasey’s picture

Also, my available dates weren't showing green until I went and saved the calendar in node settings for each month.

larowlan’s picture

Status: Active » Fixed

Fixed in dev version

Status: Fixed » Closed (fixed)

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