The issue is with agreservations-7.x-2.x-dev, date-7.x-2.x-dev, calendar-7.x-3.x-dev as stated, but this behavior was need in earlier 7.x versions.

The problem is in the "Day View" of agres_views where multiple units have reservations that begin at the same time on the same day. When this occurs, only one of the relevant reservations is shown.

The reason is in agres_view/theme.inc, in template_preprocess_agres_views_day (about line 500), the code iterates over each unit, and then nested, each event. However, when there are multiple reservations at the same start time, they are part of the same event array (with increasing numeric indices). The code does not allow for that, and hardcodes $event[0]->date_start, etc. It does not take into account that there may be $event[n>0] as part of that structure.

As far as I can tell, this is easily fixed by nesting one more loop to iterate over all the "subevents" that may be part if the event array.

Diff is attached.

If there is some Drupal trick that makes this unnecessary, I would appreciate that info.

CommentFileSizeAuthor
theme.inc_.diff.txt4.34 KBcfikevin

Comments

agill’s picture

i feel ashamed, that really was a stupid logical error.
Thanks Kevin for your contribution!
I do not know a Drupal trick that would provide a solution without
having to nest another loop to take into account multiple events on the
same start time, so i added your suggestions from your attached diff
to the latest commit to the 7.x-2.x-dev version.
Thanks again!

  • Commit ce4fd25 on 7.x-2.x, 7.x-2.1 authored by cfikevin, committed by agill:
    thanks to cfikevin for fixing issue #1422424: Day View not displaying...

  • Commit ce4fd25 on 7.x-2.x, 7.x-2.1, 7.x-3.x authored by cfikevin, committed by agill:
    thanks to cfikevin for fixing issue #1422424: Day View not displaying...