I have a timeline set to group events by taxonomy term (by adding the "Taxonomy Terms: All terms" as a field, restricted to a single taxonomy) - when the grouping is enabled, the popup for each event shows the body from another event (the other event seems to be related by the grouping, though not positive); when I disable grouping, event popups display content as expected.

CommentFileSizeAuthor
#2 Timeline.class_.inc_.patch648 bytesGhostthinker

Comments

rogerhoward’s picture

Following up - I also experience this problem with grouping on a simple text field (so it doesn't appear to be taxonomy related).

Ghostthinker’s picture

StatusFileSize
new648 bytes

I think it's a bug. When the view gets the data view $views->render_group, the keys remain the same, but the grouping mixes the elements up

nogroup:
1,
2,
3,
4,
5

becomes in a sample case
group_A:
1,
3,
5
group_B:
2,
4,

But now, when the elements are rendered acccording to the views field render options, timeline simply increases the index
1 -> 1
2 -> 3
3 -> 5
4 -> 2
5 -> 4

Solution:
Apply the attached patch (to 2.1) or go to classes/Timeline.class.inc:

        foreach ($set as $row) {
          $event = new TimelineEvent($this->view, $row, $this->dateformat, $css_selector, $color);
          if ($event->getData()) {
            $events[] = $event->getData();
          }
          $this->view->row_index++;
        }
      }

to

        foreach ($set as $row_key =>$row) {
          $this->view->row_index = $row_key;
          $event = new TimelineEvent($this->view, $row, $this->dateformat, $css_selector, $color);
          if ($event->getData()) {
            $events[] = $event->getData();
          }
        }
sepp68’s picture

Thx, patch works !!!

Sepp

sgeets’s picture

Great.Works fine. Thx !

BlackD’s picture

I also noticed I had this problem. Applied the patch, now everything works fine!

ak’s picture

subscribing …

IetC_development’s picture

Status: Active » Fixed

Works perfectly ! Thx for the module and the patch.

Status: Fixed » Closed (fixed)

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

ak’s picture

Status: Closed (fixed) » Needs review

Correct me if I'm wrong, but the patch must first be applied by a module maintainer to a new release before it should be marked as fixed. It's fixed if someone applies it to the downloadable codebase.

pamster’s picture

Component: Miscellaneous » Code
Priority: Normal » Critical

ak (#9) I agree ... I've been dealing with this problem for a while and it was difficult to find this thread. Code needs to be updated.

xamanu’s picture

Status: Needs review » Fixed

Thanks to Ghostwriter.
I committed it to the dev-version of the DRUPAL-6--2 branch (#387396).

Sorry for taking so long.

Status: Fixed » Closed (fixed)

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