Closed (fixed)
Project:
Views (for Drupal 7)
Version:
6.x-2.x-dev
Component:
Code
Priority:
Normal
Category:
Task
Assigned:
Unassigned
Reporter:
Created:
5 Dec 2008 at 14:20 UTC
Updated:
8 Jul 2010 at 21:47 UTC
While views_query::ensure_path() requires a join, it actually continues if it cannot be fetched. $traced gets a key which is an empty string '' which in the second recursion call matches if (isset($traced[$join->left_table])) and returns.
Reading views_query::ensure_table() then reading views_query::ensure_path() also confused me actually. Because the first explicitly checks for a join. The second doesn't so I wan under the impression it doesn't require a join.
Patch attached.
| Comment | File | Size | Author |
|---|---|---|---|
| views_ensure_path_join_check.patch | 576 bytes | AmrMostafa |
Comments
Comment #1
merlinofchaos commentedI think this is right.
Comment #3
grafsl commentedHi,
This patch breaks my views handler.
I define new views_handler_field:
I use this handler on Attachment View.
Without this patch View build this query:
After implementing patch :
One join statement is missing:
and two unknown fields in SELECT phase: width and height.
P.S. In Page View this handler works fine.
Comment #4
AmrMostafa commentedMy views2 is too rusty at the moment to be able to produce something like what your code does. If someone can help me reproduce the same issue, I will work on it.
Comment #5
merlinofchaos commentedThis is too complex for me to understand what's going on here. Also not a patch so 'needs review' is the wrong status.
Comment #6
esmerel commentedGiven the age of this issue, I have hope that it's resolved or no longer relevant.