I created a custom content type for my hours of operation. Each node title contains the open and closing times and each node contains advanced date settings indicating which days the node is in effect (date repeat settings).

I added the node title and my custom date field to the calendar default view to display the hours in the calendar. I then created a custom block view to display the current day's hours on my front page.

My problem is that the correct information displays while logged in as admin but not for anonymous users. Anonymous users seem to be behind. I have the node title in the block output as a link to a page and on that page is a link to the calendar view. When anon user clicks on the calendar view, the current day is off by two days. Even stranger is that the node title displayed in the block view is three days behind, not two (calendar month view shows Saturday while my custom block shows the node that occurs on Friday).

Navigating to the year view of the calendar shows the correct day. Navigating back to month view shows the wrong month; December every time it seems. Then to the week view shows a week in December, then the correct day is displayed in the day view. Navigating backwards, then, from the day view shows the correct day, week, and month. If I then go to the year view and then back to month view, month view again shows December as does week view, but hitting the Day view will reset everything back to the correct day. Odd.

Here is the strange thing: after a while of navigating around trying to figure this out, it just magically starts working right. The correct node title shows in my block view and when navigating to the calendar as a anon user the right day displays right away (although navigating up and down the calendar views still does that December thing). Over a couple of days I paid attention to the time of day I was doing this and it doesn't seem to happen at a particular time of day. I'm a bit dumbfounded.

My default view settings for calendar are:

Arguments=> Date: Date (node) Content: "my custom date field"
Fields=> Node: Title, Content: "my custom date field"
Sort criteria=> Node: Updated date asc
Filters=> Node: Type = "my custom hours of operation node type", Node: Published Yes

My custom block view is exactly the same but with Style: Unformatted and block caching turned off.

Comments

jimdemon’s picture

Forgot to mention that I have already made sure the content permissions were set correctly.

jimdemon’s picture

Any thoughts on this? I would up the priority, but I don't necessarily want to be a pain in the ass :)

Is there another thread I should be subscribed to? Basically, calendar displays correct day if I'm logged in as admin, but incorrect as an anonymous user until, it seems, some point during the morning when it begins displaying correctly for no apparent reason.

Also, it seems that the anonymous user calendar view is only one day behind right now. When I click on the year view it changes to the correct day. December still shows as I cycle through month and week view. After accessing the day view, which shows correctly, I can go back to the month view and the day is correct. Going back out to the home page and then back to the calendar month view shows a day behind again etc etc.

KarenS’s picture

Status: Active » Fixed

It sounds like you have caching turned on and the anonymous users are getting an old cached view. This is nothing to do with the Calendar module, you have to play around with the way you are caching and the frequency that you flush the caches. You could have page caching turned on, you could have the view caching turned on, you could have block caching turned on.

jimdemon’s picture

I hadn't found the view caching setting before now. Thanks for that. Hopefully I don't have to disable all my caching. Disabling view caching should take care of my block as well I think since it is displaying a view.

Status: Fixed » Closed (fixed)

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