Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
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
Comment | File | Size | Author |
---|---|---|---|
WeekView.JPG | 22.33 KB | wernervanhooren | |
DayView.JPG | 35.44 KB | wernervanhooren |
Comments
Comment #1
CrashNet CreditAttribution: CrashNet commentedI am having this same issue. Subscribe.
Comment #2
wernervanhooren CreditAttribution: wernervanhooren commentedComment #3
David D CreditAttribution: David D commentedI 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.
Comment #4
David D CreditAttribution: David D commentedOn 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.
Comment #5
David D CreditAttribution: David D commentedThis issue may be related to (or a duplicate of) http://drupal.org/node/1256898
Comment #6
David D CreditAttribution: David D commentedI'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.
Comment #7
wernervanhooren CreditAttribution: wernervanhooren commentedWhen 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?
Comment #8
phelix CreditAttribution: phelix commentedThis 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??
Comment #9
rtdean93 CreditAttribution: rtdean93 commentedsubscribe. Same issue - only is incorrect on the weeks view
Comment #10
dercheffethe same. my event does have only a start date and start time. subscribe.
Comment #11
Syd Barrett CreditAttribution: Syd Barrett commentedSame problem. In the week view it shows everything such as All day.
Comment #12
pbfleetwood CreditAttribution: pbfleetwood commentedSame here: Events with no end time set show as all day events.
Comment #13
igorik CreditAttribution: igorik commentedsame problem, in views 6.3 + date + calendar
Comment #14
KarenS CreditAttribution: KarenS commentedThis 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.
Comment #15
bennettee CreditAttribution: bennettee commentedEvents 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.
Comment #16
audua CreditAttribution: audua commentedWhen 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.
Comment #18
dariogcode CreditAttribution: dariogcode commentedI'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?
Comment #19
dhalbert CreditAttribution: dhalbert commentedThis 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.
Comment #20
dariogcode CreditAttribution: dariogcode commentedThanks buddy but I follow these steps and don't work, still showing fields in "all day" row.
Comment #21
oneidprod CreditAttribution: oneidprod commentedI'm having the same issue and the steps in #11 mentioned in #19 didn't work for me either. Subscribing
Comment #22
SlashCrew CreditAttribution: SlashCrew commentedSame bug here. Subscribing
Comment #23
heatherwoz CreditAttribution: heatherwoz commentedI'm still having this problem too. Events without end times show as "all day" events in month and week views.
Comment #24
dhalbert CreditAttribution: dhalbert commentedI 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!
Comment #25
KarenS CreditAttribution: KarenS commentedThere 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
Comment #26
DrupalNovice CreditAttribution: DrupalNovice commented- 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.
Comment #27
DrupalNovice CreditAttribution: DrupalNovice commentedSorry Karen, didn't see you when I started writing
Comment #29
luison CreditAttribution: luison commentedI 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.
Comment #30
luison CreditAttribution: luison commentedComment #31
apaderno