When updating an existing hour block nothing seems to happen unless you view the JS console. Turns out the request page is throwing a 500 due to a PDO exception because the opening_hours table is not being found. I am using prefixed tables here.
The error occurs in opening_hours_instance_load() line 278 of current (1.2) release. Simple error and fix. The table name is not being wrapped in braces.
So this line:
$query = db_query("SELECT * FROM opening_hours WHERE instance_id = :id LIMIT 1", array(
Should be
$query = db_query("SELECT * FROM {opening_hours} WHERE instance_id = :id LIMIT 1", array(
Thanks for the great module.
UPDATE
Should have done this before posting :-[ I just did a quick scan through the code and opening_hours_cron() appears to have the same issue (I've not actually tested that cron yet) on line: 164 with the $propagate_query assignment. The table name needs to be wrapped in braces. There may be more similar occurrences so I'm giving it a quick scan through and if there are several I'll make a patch.
Comment | File | Size | Author |
---|---|---|---|
#1 | opening_hours--missing-table-braces-1844564-1.patch | 1.26 KB | magicmyth |
Comments
Comment #1
magicmyth CreditAttribution: magicmyth commentedI found a few bugs in this module so I'm posting a commit patch that resolves this issue and will post another in a different bug report.
Comment #2
mikl CreditAttribution: mikl commentedCommitted, thanks.
Comment #3
mikl CreditAttribution: mikl commentedFix released: http://drupal.org/node/1854494
Comment #4.0
(not verified) CreditAttribution: commentedMore occurrences of same issue.