Coming from #1046898: [release blocker] use node.title (resp users.name) in Views argument summaries
(References project, i.e D7 noderef / userref)

The patch over there uses the 'title table' and 'title field' argument properties to display node titles (resp user names) instead of raw nids (resp uids) in argument summaries.

However, the only way I could get the 'title table' ('node' or 'user') correctly in the query (i.e joined as a separate copy from the field data 'referenced nid' column), was by patching views_handler_argument.inc.

Without the patch, the 'title field' ('title' or 'name') is fetched from the base table, which at best is incorrect (for a noderef argument in a View listing nodes, gives the title of the base node instead of the referenced node) and at worst breaks the query (for a userref argument in a View listing nodes, node.name doesn't exist)

CommentFileSizeAuthor
#1 views_argument_title_table-1059646-1.patch649 bytesyched
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

yched’s picture

Status: Active » Needs review
FileSize
649 bytes

Patch attached.
I'm definitely not sure whether this is the correct fix or not, feedback welcome !

klonos’s picture

subscribing...

dawehner’s picture

Assigned: Unassigned » merlinofchaos

Assign to earl.

This might could be commited to 6.x, too.

klonos’s picture

Issue tags: +Needs backport to D6

...tagging as such then.

merlinofchaos’s picture

Status: Needs review » Fixed

Committed to both 6.x-3.x and 7.x-3.x

klonos’s picture

Thanx Earl, one less patch to keep track of ;)

Status: Fixed » Closed (fixed)
Issue tags: -Needs backport to D6

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