I'm having a strange problem with the views "Group by" feature on my timelines. Seems the grouping is working fine and the colors are applied correctly to each group. But when selecting the event, the field used for the grouping is not accurate in the event bubble? It has a value, but it's clearly not the correct value even though it is being grouped correctly by the correct value? I can't quite figure out where it is getting the incorrect data from? Is anyone else experiencing this issue?

Comments

rallycivic’s picture

Yes, I am. I hadn't worked out that it was to do with the "Group By" feature, so thanks for that!

I have a timeline with wrong values in the popups here:
http://chelmsfordmc.co.uk/events/timeline_bad

And one that shows the right things with "Group By" turned off here:
http://chelmsfordmc.co.uk/events/timeline

veran’s picture

I have encountered the same problem but I also found a simple workaround:

You just have to add a "Sort criteria" in the view-settings. Simply choose the same field you selected in the "Grouping field" dropdown list and select ascending order.

I hope this resolves the issue.

rallycivic’s picture

Thnks.

That hasn't worked for me so far when grouping by one of my taxonomies.

When editing the view, the query shows as:

GROUP BY nid
ORDER BY node_data_field_date_field_date_value ASC, term_data_name ASC

(I tried ordering by taxonomy).

Caligan’s picture

Same problem. I've tried adding sorts and filters both before and after the existing sorts and filters with no success - most of the time I end up with a pile of duplicates, of which sometimes one or two may be correct but the majority of the time the link goes to the wrong node. I haven't found a pattern yet in which ones are being mis-linked.

The following produces a set without duplicates but with basically all the links wrong. Many of the popups have repeat content, though none of the titles are repeated incorrectly. I'm tentatively guessing a javascript oddity that can't properly sort out what belongs where with certain kinds of grouping (specifically taxonomy)?

SELECT node.nid AS nid,
node_data_field_date_hist.field_date_hist_value AS node_data_field_date_hist_field_date_hist_value,
node_data_field_date_hist.field_date_hist_value2 AS node_data_field_date_hist_field_date_hist_value2,
node.type AS node_type,
node.vid AS node_vid,
node.title AS node_title,
node_revisions.body AS node_revisions_body,
node_revisions.format AS node_revisions_format
FROM node node
LEFT JOIN content_type_history node_data_field_date_hist ON node.vid = node_data_field_date_hist.vid
LEFT JOIN node_revisions node_revisions ON node.vid = node_revisions.vid
WHERE (node.status <> 0) AND (node.type in ('history'))
ORDER BY node_data_field_date_hist_field_date_hist_value ASC

Note: Verified (in case it helps) that this does not occur when grouping by either date or title.

Additional notes: NOT strictly a taxonomy issue --

Occurs when a select list CCK field is used as the grouping field, even when a sort-by is added for that field.

Causes duplicates if the select list permits more than one value (whether any are set or not).

Showing incorrect content even when the select list is locked to a single item, though the duplications disappear.

ec’s picture

@veran, thank you for your simple workaround, it works fine for me using either a group-by node type or a group-by CCK field. I'm using as the sort critera the same critera I'm using for the group-by within the timeline settings.

If it can be of any help, my settings are drupal 6.15 (with the patch here -> http://drupal.org/node/284392#comment-2389644 in #397), views 2.8 and timeline 2.1.

loophole080’s picture

#2 sort criteria fixed this same issue for me - i only have one sort criteria (tax term) which is same as group by

iuk2’s picture

Sorting option does not work for me either.

FranCarstens’s picture

Has this issue been resolved yet?

sammos’s picture

No I am using the latest dev version and I am having this problem, too. I'm wondering if I can use the module because I really need accurate bubbles and it's otherwise such an awesome module :-(

SocialNicheGuru’s picture

I am experiencing the same thing.

pixlkat’s picture

I'm using the latest dev version and sorting on my grouping field fixed it for me as well. I was very puzzled, it didn't happen until I'd added the sixth item, and then everything was randomly incorrect.

ifrik’s picture

I'm using a taxonomy term to group nodes on the timeline, and found that everything works fine for a while, and then suddenly the content in the blurb does not match up with the title of the node any more.
It appears that that happens after I changed the taxonomy term of one of the events, and all events after that are messed up.
I tried adding the sort criteria as proposed in #2, but that had no effect.
Update: When I turn of the grouping, the blurbs are displayed correctly, but when I group them again (after clearing cache) the blurbs are mixed up again, apparently in the same way they were before.

xamanu’s picture

Version: 6.x-2.1 » 6.x-3.x-dev
Status: Active » Fixed

This should be fixed within the newest 6.x-3.x-dev version. Please test. In case that it is not working, please reopen this issue.

Status: Fixed » Closed (fixed)

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

lightsurge’s picture

For anybody like me not yet using Views 3, to fix groupings for the 2.x branch, all you need to do is alter part of function getEvents in classes/Timeline.class.inc (around line 87) to look like:

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