OH is displaying "Closed" when input is 4:00 PM to 10:00 PM.
Initially I input 4pm-10pm and it displayed "Closed". Now I can change any of the hours 10am-10pm, 3pm-10am, 3pm-4pm... no matter what the setting Sunday displays as "Closed". 14 hour blocks are enabled.
Any thoughts?
Comments
Comment #1
bstrange commentedI am going to go out on a limb and assume this is something that no one else using the dev version has experienced (at least I couldn't find any other mentions of this in queue) and that the immediate solution would be for me to roll back to last stable.
Comment #2
Ozeuss commentedI couldn't reproduce this bug.
What are your settings?
Could you try and replicate this after turning "closed" off?
Comment #3
bstrange commentedSo sorry for the long delay, been extremely busy lately.
I can't find anywhere to turn closed off. I have looked everywhere. The only settings I could find were required checkbox, number of values, hours format, granularity of time, limit for start and end times, validate hours, display 'add more hours', and show empty days.
If you could point me in the right direction, that would be outstanding. I am thinking maybe my upgrade from earlier version was in some way corrupted?
Comment #4
bstrange commentedOk, to be absolutely certain, I deleted all office hours fields from all content types, then disabled and then uninstalled office hours. I deleted the folder from sites/all/modules and then reuploaded the current dev version. Enabled, ran update.php, then added office hours to a single content type and created two nodes.
In both cases, regardless of what times are entered into "Sunday", Sunday always shows up as closed, or not present if 'show empty days' is unchecked.
To troubleshoot, I am going to repeat the process only this time I am going to go manually rummage through the database and see if there are any latent pieces of office hours left over, that is the only explanation I can think of.
Also, I still cannot find any dropdown or checkbox option for "closed" as you mentioned in #2. My Global settings contain only the following:
Required (unchecked)
Number of values:
14
Hours format:
12 hrs
granularity of time:
Half hours
Limit widget start hours: (untouched)
Validate hours (unchecked)
Display the "Add more hours" link (unchecked)
Show empty days (checked currently)
Thanks in advance :)
I will update after I root through DB after uninstall and post findings.
Comment #5
bstrange commentedI couldn't find any leftovers in the db; however, I noticed in the content_field_office_hours table, Sunday, in all nodes, shows up with a delta value of '0' and a field_office_hours value of '0'. This seems contrary to the way the other field and deltas work for Mon-Sat. For example, Monday entries for all nodes show up with a delta value of '2' and a field_office_hours value of '1'. Tuesday shows up with a delta value of '4' and a field_office_hours value of '2' and so on and so on....
Unlike Mon-Sat whose delta value is double the field_office_hours value, Sunday is 0 / 0. I think this may be the problem but I am uncertain...just making an observation. It could be working as intended, I honestly have no idea; but regardless, no mater what I do, no mateer how many times i uninstall/reinstall and go through the DB, Sunday is always displayed as "Closed" regardless of time selection.
Comment #6
ionmedia commentedsame problem
dsm for OH array here:
there is all looks fine
sunday is [0] key in the array, but on page i see sunday closed
Comment #7
adiatisProblem solved by editing line 17 in dev version in office_hours.theme.inc.
Before:
Line 17: if (!empty($day)) {
After:
Line 17: if ($day!='') {
Sunday is index '0'.
The problem is function empty(). The following things are considered to be empty:
* "" (an empty string)
* 0 (0 as an integer)
* "0" (0 as a string)
* NULL
* FALSE
* array() (an empty array)
* var $var; (a variable declared, but without a value in a class)
You have to try it with several OH settings. I don't know if it's right for all of them. I show every day, even if they are closed.
Good luck ;-)
Comment #8
h1ghpr0 commentedconfirm #7 does fix problem with first day of OH shown as "closed" or not displayed depending on "Show empty days" setting regardless of the OH for first day.
Uninstall / reinstall module did not fix problem.
Comment #9
johnvcommitted to D6.