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.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

magicmyth’s picture

I 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.

mikl’s picture

Status: Active » Fixed

Committed, thanks.

mikl’s picture

Status: Fixed » Closed (fixed)

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

Anonymous’s picture

Issue summary: View changes

More occurrences of same issue.