Hello,

Assume I make an event with a start and end date also with a start and end hour given.

In day view it shows correctly but in week view the event is shown in the All Day component.

Everything is configured as instructed in the video from Arlin Sandbulte.

How do I handle this?

Thanks and kind regards

Werner

CommentFileSizeAuthor
WeekView.JPG22.33 KBwernervanhooren
DayView.JPG35.44 KBwernervanhooren
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

CrashNet’s picture

I am having this same issue. Subscribe.

wernervanhooren’s picture

Category: support » bug
David D’s picture

I have the same problem, but with a simpler setup: An event that just has a start time, and no end day or time, shows up on the week view as an all day event. And in day view, the event shows up only on the following day, not on the correct day. Further, in that incorrect day view, the event shows as all day up to the start time. That is, it displays as going from before 1am on through the 6pm hour, ending at 7pm, which is set as the starting time (on the previous day) in the event node.

David D’s picture

On saving my comment I see that I have somehow created a new revision of the Issue. I don't know how or why that happened.

EDIT:

Ah. Now I see the same thing appears to be happening for everyone. Sorry to digress from the issue topic.

David D’s picture

This issue may be related to (or a duplicate of) http://drupal.org/node/1256898

David D’s picture

I've identified another (duplicate?) issue (http://drupal.org/node/1248754) with a fix for the Day display bug that I mentioned above:
"in the days views i change the contextual filter granularity of day to hour, all works!"

I've tested this and it fixes the Day display issue for me. Thanks, grosbedos!

When I make the same granularity change on the Week page, however, It doesn't help the "all day" erroneous status on Week display.

wernervanhooren’s picture

When I change the granularity to "hour" in the contextual filters of week display nothing changes in the view. The event is still displayed as an All day event in week view.
So, no, It doesn't help the "all day" erroneous status on Week display.

But now I have 3 errors:

Notice: Undefined index: hour in template_preprocess_date_views_pager() (regel 181 van /customers/wernervliegt.be/wernervliegt.be/httpd.www/sites/all/modules/date/date_views/theme/theme.inc).
Notice: Undefined index: hour in template_preprocess_date_views_pager() (regel 182 van /customers/wernervliegt.be/wernervliegt.be/httpd.www/sites/all/modules/date/date_views/theme/theme.inc).
Notice: Undefined variable: title in theme_date_nav_title() (regel 295 van /customers/wernervliegt.be/wernervliegt.be/httpd.www/sites/all/modules/date/date_views/theme/theme.inc).

When I put the settings back, the errors disappear.

I noticed that "Week" isn't provided in granularity. Does this matter?

phelix’s picture

This is also happening to me. On the day view it shows correctly on the right time. But on the week view it shows as an all day event. Is there anything that I can do that will fix this so that it shows on the correct time??

rtdean93’s picture

subscribe. Same issue - only is incorrect on the weeks view

dercheffe’s picture

the same. my event does have only a start date and start time. subscribe.

Syd Barrett’s picture

Same problem. In the week view it shows everything such as All day.

pbfleetwood’s picture

Priority: Normal » Major

Same here: Events with no end time set show as all day events.

igorik’s picture

same problem, in views 6.3 + date + calendar

KarenS’s picture

Status: Active » Fixed

This issue is a mess of different problems. The original report is about a date that has start and end times. Then we have reports about dates without times. I can't tell how to replicate the issue.

But it is possible that a fix I just committed for #1260380: Events for times after 6pm show up on following day in Day view. will also fix this. Test by getting the very latest dev versions of both Date and Calendar with today's commits, which will show up in tomorrow's tarball.

bennettee’s picture

Events without end date/times are still showing up in the multi-day section for me. I was able to fix it by modifying a single line of code in the calendar_build_week_day function in the calendar_plugin_style.inc file.

Change $all_day = $item->calendar_start_date == $item->calendar_end_date;
to $all_day = $item->calendar_all_day;

I don't know if this causes any side-effects, but it seems to fix the problem for me. I hope this helps...I would have submitted a patch for review, but I'm not very familiar with git.

audua’s picture

When I enabled the "Collect an end date" checkbox on the date field settings, it works fine, but it shows this error:

Notice: Undefined index: groupby_times in template_preprocess_calendar_week() (line 477 of /home/quickstart/websites/feedstest.dev/sites/all/modules/calendar/theme/theme.inc).
Notice: Undefined variable: divisor in template_preprocess_calendar_week() (line 490 of /home/quickstart/websites/feedstest.dev/sites/all/modules/calendar/theme/theme.inc).
Warning: Division by zero in template_preprocess_calendar_week() (line 490 of /home/quickstart/websites/feedstest.dev/sites/all/modules/calendar/theme/theme.inc).
Notice: Undefined variable: divisor in template_preprocess_calendar_week() (line 491 of /home/quickstart/websites/feedstest.dev/sites/all/modules/calendar/theme/theme.inc).
Warning: Division by zero in template_preprocess_calendar_week() (line 491 of /home/quickstart/websites/feedstest.dev/sites/all/modules/calendar/theme/theme.inc).
Notice: Undefined index: groupby_times in template_preprocess_calendar_week() (line 477 of /home/quickstart/websites/feedstest.dev/sites/all/modules/calendar/theme/theme.inc).
Notice: Undefined variable: divisor in template_preprocess_calendar_week() (line 490 of /home/quickstart/websites/feedstest.dev/sites/all/modules/calendar/theme/theme.inc).
Warning: Division by zero in template_preprocess_calendar_week() (line 490 of /home/quickstart/websites/feedstest.dev/sites/all/modules/calendar/theme/theme.inc).
Notice: Undefined variable: divisor in template_preprocess_calendar_week() (line 491 of /home/quickstart/websites/feedstest.dev/sites/all/modules/calendar/theme/theme.inc).
Warning: Division by zero in template_preprocess_calendar_week() (line 491 of /home/quickstart/websites/feedstest.dev/sites/all/modules/calendar/theme/theme.inc).
Notice: Undefined index: groupby_times in template_preprocess_calendar_week() (line 477 of /home/quickstart/websites/feedstest.dev/sites/all/modules/calendar/theme/theme.inc).
Notice: Undefined variable: divisor in template_preprocess_calendar_week() (line 490 of /home/quickstart/websites/feedstest.dev/sites/all/modules/calendar/theme/theme.inc).
Warning: Division by zero in template_preprocess_calendar_week() (line 490 of /home/quickstart/websites/feedstest.dev/sites/all/modules/calendar/theme/theme.inc).
Notice: Undefined variable: divisor in template_preprocess_calendar_week() (line 491 of /home/quickstart/websites/feedstest.dev/sites/all/modules/calendar/theme/theme.inc).
Warning: Division by zero in template_preprocess_calendar_week() (line 491 of /home/quickstart/websites/feedstest.dev/sites/all/modules/calendar/theme/theme.inc).

this is in quickstart.

Status: Fixed » Closed (fixed)

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

dariogcode’s picture

Status: Closed (fixed) » Active

I'm also have this issue, This happen with my cck without end collect date and also with node dates (created, updated). How we can show nodes in hours rows instead of "all day" row?

dhalbert’s picture

This may be due to the uninitialized groupby_times problem described in #1398584: calendar-date/week generates errors: Undefined index: groupby_times in template_preprocess_calendar_week(), manifested in a different way. Try the steps I describe in #11 in that bug.

dariogcode’s picture

Thanks buddy but I follow these steps and don't work, still showing fields in "all day" row.

oneidprod’s picture

I'm having the same issue and the steps in #11 mentioned in #19 didn't work for me either. Subscribing

SlashCrew’s picture

Same bug here. Subscribing

heatherwoz’s picture

I'm still having this problem too. Events without end times show as "all day" events in month and week views.

dhalbert’s picture

I and others had this problem too and we mentioned it in #1398584: calendar-date/week generates errors: Undefined index: groupby_times in template_preprocess_calendar_week() (see #6 and #8 there), for our dates with no end dates. For dates with end dates, we had the "groupby_times" errors mentioned in #1398584.

I am still suspicious these errors are related, and I think it might have to do with using a calendar Week View that is obsolete in some way, that was created or cloned before the latest round of changes.

It might be good for someone with this problem to try to build a fresh set of calendar Views from the latest Calendar dev snapshot, and see if the error still happens. I am not sure what the best way to get fresh views is. (Any insight?) It might be necessary to delete your existing Calendar Views, disable the Calendar module, update it, and then re-enable it. I hope that would rebuild the prototype views. Make sure your views are using Calendar Entities, not Calendar Items. I think you will still need to apply the steps in #1398584 #11 on the Week View, as that hasn't been patched yet. (Or apply my patch in #1398584 #13 before when updating the module.) After all this, see if your Week View still has this problem.

Probably best tried on a dev system, not your production!

KarenS’s picture

Status: Active » Fixed

There was one more place that was testing whether start date == end date instead of the all_day value. That plus the previous commits should take care of this.

http://drupalcode.org/project/calendar.git/commit/6bf8093

DrupalNovice’s picture

Status: Fixed » Active

- calendar-7.x-3.x-dev
- date-7.x-2.x-dev
- views-7.x-3.1

It apperas that events with same start and end dates/time is treated as "All day" events.

benettee's solution seems to be implemented in the latest dev version, and it appears that the problem has been thrusted forward to the theme layer.

The solution seems to be simple. The cause for this behaviour can be found in the preprocessor function for the Week display.

On line 413, it marks the item as an "all_day". Change:
if ($item['item']->calendar_all_day || ($item['item']->date_start == $item['item']->date_end)) {
to
if ($item['item']->calendar_all_day)) {

Since node fields like updated and created have the same start and end time, they're therefore treated as "All day" events.

I'm not sure why we need the ($item['item']->date_start == $item['item']->date_end) there in the first place - maybe we could deal with events having the same start and end date earlier in the process?

Notice a few lines up "// If we're not grouping by time, move all items into the 'all day' array." - you must have a Time grouping scheme specified for the display in order for the events to show up (although this behaviour can be altered through the preprocessor function)

Just override template_preprocess_calendar_week() with the alteration above in the theme or in a custom module.

DrupalNovice’s picture

Sorry Karen, didn't see you when I started writing

Status: Active » Closed (fixed)

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

luison’s picture

Issue summary: View changes

I have 7.x-3.5 and I see that the patches from here are applied in this version... but I have exactly the same bug.
Date is 7.x-2.8.

luison’s picture

Version: 7.x-3.x-dev » 7.x-3.5
Status: Closed (fixed) » Active
apaderno’s picture

Version: 7.x-3.5 » 7.x-3.x-dev
Category: Bug report » Support request
Status: Active » Fixed

Status: Fixed » Closed (fixed)

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