1. while adding new booking:

user warning: Field 'subtype' doesn't have a default value query: INSERT INTO inside_bookings_records (resource_id, type, start, end, name, description, rrule, priority, status) VALUES (1, 1, '2009-08-24 13:20:00', '2009-08-24 16:20:00', 'встреча', 'вввв', '', 0, 4)

no matter dev or alpha version, fresh install.

2. what are meanings of type and subtype fields?

CommentFileSizeAuthor
#17 Added .txt to post1.71 KBmatholum
#16 bookingsapi.557744-2-d6.patch2.84 KBAnonymous (not verified)
#15 patch_output2.jpg34.81 KBmatholum
#14 bookingsapi.557744-2-d6.patch2.96 KBAnonymous (not verified)
#11 patch_output.jpg41.79 KBmatholum
#10 bookingsapi.557744-d6.patch1.12 KBAnonymous (not verified)

Comments

stanley78’s picture

hmm.. very strange

perhaps later I'll get the same with not nullable rrule, rrule_until, created, changed.

Anonymous’s picture

Project: Public Bookings » Bookings API
Assigned: Unassigned »
Category: support » bug

Type and Subtype should be used later on - in other words "for historical reasons" ;)
This seems more like a problem with Bookings API, and I'm looking into it :)

Anonymous’s picture

Status: Active » Postponed (maintainer needs more info)

Which versions of Drupal are you using? Which database (and version)? Which version of PHP?
Could you try to allow NULL values in type and subtype (NULL=yes) in the table and test whether it would be working then?

Anonymous’s picture

Status: Postponed (maintainer needs more info) » Fixed

Setting to fixed - feel free to reopen if new information is available or if the problem persists.

Status: Fixed » Closed (fixed)

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

matholum’s picture

I am having the same problem, dev or alpha versions of both. I am running Drupal 6 with php 5.2.8 and mysql 5.1.30 on my own apache 2.2.11 server. I have resources defined but I get the following when I try to save/create a booking.

user warning: Field 'subtype' doesn't have a default value query: INSERT INTO drupal_bookings_records (resource_id, type, start, end, name, description, rrule, priority, created, status) VALUES (1, 1, '2009-12-25 19:00:00', '2009-12-25 19:00:00', 'test', 'testing...', '', 0, '2009-12-25 14:04:19', 1) in D:\webs\drupal\includes\common.inc on line 3467.

Any help would be much appreciated.

-Matt

matholum’s picture

Version: 6.x-1.x-dev » 6.x-3.x-dev
Status: Closed (fixed) » Active
Anonymous’s picture

Status: Active » Postponed (maintainer needs more info)

Apologies for the delay.

Did you run the update-script after upgrading the version?

matholum’s picture

Yes I did. I even tried a fresh install of both I believe. Either way I just ran update.php again and still no change (no updates either). Any ideas?

Anonymous’s picture

Status: Postponed (maintainer needs more info) » Needs review
StatusFileSize
new1.12 KB

Could you test the attached patch? The subtype field is actually unneeded and it will disappear with the cck-change for the records, thus we are now allowing null-values for it.

matholum’s picture

StatusFileSize
new41.79 KB

Ok, I'm not the best with patches as I have only done one before however I'm pretty sure I'm doing it right. I copied the bookingsapi.install to my GnuWin32\bin folder since that was the only file modified and ran the patch. I get an error (see attachment) though so I'm not sure what to do now...

matholum’s picture

never mind... google told me to add --binary and it worked... one sec and i will see if it worked (updating drupal now)

matholum’s picture

Ok, now I get this when I try to add a booking...

user warning: Field 'rrule_until' doesn't have a default value query: INSERT INTO drupal_bookings_records (resource_id, type, start, end, name, description, rrule, priority, created, status) VALUES (1, 1, '2009-12-27 18:30:00', '2009-12-27 18:30:00', 'Test Booking', 'this is a test...', '', 0, '2009-12-27 13:34:56', 1) in D:\webs\drupal\includes\common.inc on line 3467.
Anonymous’s picture

StatusFileSize
new2.96 KB

Please test the attached patch (or wait for the next dev, it's already committed). Dont forget to run update.php afterwards :)
(I will port this back to 1.x as soon as its fixed).

matholum’s picture

StatusFileSize
new34.81 KB

OK, I got another patch error but I don't think there is anything I can do this time. It says it is a malformed patch at line 15...

Anonymous’s picture

StatusFileSize
new2.84 KB

Apologies, wrong file.

matholum’s picture

StatusFileSize
new1.71 KB

Lol, this doesn't seem to like me today. It says Hunk #1 failed at 1 and Hunk #6 failed at 489. Here is the file it created (added .txt to post). I don't know if that means that it is ok or not now...

matholum’s picture

Status: Needs review » Fixed

Noob... I feel stupid. The Hunk failure means that that was already updated, probably from the first patch. The problem I ran into was that it was the same version number and thus update.php did not work. I ended up wiping the site (nothing was on it anyways) and installed it from scratch with the patched file and everything worked great. I was able to use Public Bookings perfectly.

Thanks for all your help tirsales, I appreciate it!

-Matt

Status: Fixed » Closed (fixed)

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