Download & Extend

Relationships defined using wrong base field

Project:Views
Version:7.x-3.x-dev
Component:Views Data
Category:bug report
Priority:minor
Assigned:Unassigned
Status:closed (fixed)

Issue Summary

The relationships that views defines for the core modules use 'field' for the base field but this doesn't match up with what views_handler_relationship defines:

* - base: The new base table this relationship will be adding. This does not
*   have to be a declared base table, but if there are no tables that
*   utilize this base table, it won't be very effective.
* - base field: The field to use in the relationship; if left out this iwll be
*   assumed to be the primary field.

I'm guessing that since it's joining on the base table's primary field this error was masked. I noticed it after copy pasting the code into another module that used a non-primary field.

The patch also fixes some spelling errors I noticed and my editor removed some trailing whitespace.

AttachmentSize
views_base_field.patch5.9 KB

Comments

#1

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

here's a patch for 3.x. no real changes besides accounting for a change in an adjacent line.

AttachmentSize
views_base_field_3x.patch 5.99 KB

#2

Version:6.x-3.x-dev» 7.x-3.x-dev
Status:needs review» patch (to be ported)

Ok, this is commited to 6.x both 2.x and 3.x branches. Doesn't apply to the 7.x--3.x branch -- needs a port.

#3

Status:patch (to be ported)» needs review

Fast port

AttachmentSize
views_base_field_3x.patch 5.94 KB

#4

Status:needs review» reviewed & tested by the community

looks good, applies clean, doesn't break anything AFAICT.

#5

Arg Earl commited this patch together with another patch. I will try to commit it tomorrow

#6

Status:reviewed & tested by the community» fixed

Today it tomorrow :)
Thanks for the review!

Fixed.

#7

Status:fixed» closed (fixed)

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

nobody click here