PHP version: 5.2.9
Drupal version: 6.16
Bookings API: 6.x-1.0-alpha5
Views: 6.x-2.10
CCK: 6.x-2.6
Date API: 6.x-2.4
I first described this error here:
http://drupal.org/node/809222#comment-3017148
It's not the same as the issue reported there (which was fixed), so I thought it appropriate to create a new issue.
I'm trying to add an availability constraint. When I "Save" the availability I get this (see attached file availability-5.jpg):
"user warning: Table 'fence8_cms.content_type_bookingsapi_resource' doesn't exist query: SELECT drupal_node.nid FROM drupal_node LEFT JOIN content_type_bookingsapi_resource ON drupal_node.vid = content_type_bookingsapi_resource.vid WHERE drupal_node.type = 'bookingsapi_resource' AND content_type_bookingsapi_resource.field_ba_parent_nid = 10 in /home/fence8/public_html/sites/all/modules/bookingsapi/bookingsapi.module on line 1358."
The problem appears to be that the table in my database is named drupal_content_type_bookingsapi_resource, not content_type_bookingsapi_resource. "drupal_" is the value I assigned to the $db_prefix variable in my settings.php file.
| Comment | File | Size | Author |
|---|---|---|---|
| #4 | bookingsapi.811906-d6.patch | 1.66 KB | Anonymous (not verified) |
| #2 | bookingsapi.811906-d6.patch | 1.01 KB | Anonymous (not verified) |
| availability-5.jpg | 72.26 KB | sah62 |
Comments
Comment #1
Anonymous (not verified) commentedThanks, I'll look into it. Seems like I forgot some {..} somewhere :)
Comment #2
Anonymous (not verified) commentedCould you test the attached patch?
Comment #3
sah62 commentedPatch test result:
user warning: Table 'fence8_cms.content_type_bookingsapi_resource' doesn't exist query: SELECT n.nid FROM drupal_node as n LEFT JOIN content_type_bookingsapi_resource as c ON n.vid = c.vid WHERE n.type = 'bookingsapi_resource' AND c.field_ba_parent_nid = 10 in /home/fence8/public_html/sites/all/modules/bookingsapi/bookingsapi.module on line 1358.
Comment #4
Anonymous (not verified) commentedApologies - my bad.. forgot one mistake (attached patch against dev again)
Comment #5
sah62 commentedMuch better - no SQL error! I still get this warning, though:
"Possible conflicts with this availability. Please check the list of bookings."
Is that expected? There are no bookings.
Comment #6
Anonymous (not verified) commentedThats okay - if there are no availabilities defined for a resource its impossible to check whether a new availability would conflict, thus the system issues a warning :)
Thanks for the bugreport & check, its committed now :)