Relationships defined using wrong base field
drewish - September 22, 2009 - 19:43
| Project: | Views |
| Version: | 7.x-3.x-dev |
| Component: | Views Data |
| Category: | bug report |
| Priority: | minor |
| Assigned: | Unassigned |
| Status: | closed |
Description
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.
| Attachment | Size |
|---|---|
| views_base_field.patch | 5.9 KB |

#1
here's a patch for 3.x. no real changes besides accounting for a change in an adjacent line.
#2
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
Fast port
#4
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
Today it tomorrow :)
Thanks for the review!
Fixed.
#7
Automatically closed -- issue fixed for 2 weeks with no activity.