At least, I think that's a fair summary of the bug. ;)

While working on #648322: Download tables should be sorted by core version I ran into a bug in Views. Earl was gracious enough to debug it, and discovered that the problem lies with views_query::add_relationship(). Basically, we don't record the relationship table alias, so if someone calls both ensure_my_table() and ensure_table(), the ensure_table() call can't find that the table was already added to the query and it tries to add it again. In the case of a taxonomy sort, for example, this leads to all kinds of badness.

Comments

dww’s picture

Status: Active » Needs review
StatusFileSize
new587 bytes

Here's Earl's patch to solve this, against DRUPAL-6--2. Tested on d6.project.drupal.org and it seems to be working great. Didn't try on DRUPAL-6--3 or DRUPAL-7--3 yet.

dww’s picture

Untested patch for DRUPAL-6--3

dww’s picture

Version: 6.x-2.x-dev » 6.x-3.x-dev

This was accidentally committed as part of #639430: theme.inc warning when comments are displayed without links
Reverted: http://drupal.org/cvs?commit=297052
Re-committed to DRUPAL-6--2 so cvs annotate points here: http://drupal.org/cvs?commit=297056

Needs review/testing/commit for DRUPAL-6--3 now.

dagmar’s picture

Issue tags: +alpha-2 blocker

tagging

dagmar’s picture

Status: Needs review » Reviewed & tested by the community

I tested this in views 3 the same day that patch was committed to views 2.

It seems to be working fine. I though that #650152: user warning: Unknown column 'node_book.bid' in 'on clause' query was related to this issue, but now that merlinofchaos fixed it (and it isn't related) I think is safe to mark this as RBTC.

merlinofchaos’s picture

Status: Reviewed & tested by the community » Fixed

Committed to 6.x and 7.x 3.x branches.

Status: Fixed » Closed (fixed)

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

dawehner’s picture

Issue tags: -alpha-2 blocker

remove tag