Closed (won't fix)
Project:
Views (for Drupal 7)
Version:
6.x-2.12
Component:
Views Data
Priority:
Critical
Category:
Bug report
Assigned:
Reporter:
Created:
14 Oct 2010 at 20:54 UTC
Updated:
20 Jan 2011 at 03:58 UTC
Jump to comment: Most recent file
Comments
Comment #1
dawehnerCan you make a reusable views export? I will use git bisect to find the eval commit
Comment #2
ayalon commentedI can confirm this problem! The output as link is not working anymore. Also /home, and links like this are not working.
Comment #3
ayalon commentedDebugging shows that $alter['make_link'] is set to "FALSE" although the option in the view is selected.
File: views_handler_field.inc
Did not find the reason for now. Trying to investigate further. Seems to me quite critical.
Comment #4
ayalon commentedComment #5
ayalon commentedOk I found the bug, but a maintainer is needed to confirm this:
Older version of views_handler_field_node.inc:
Current dev version:
The else statement kills ALL link overrides because it sets $this->options['alter']['make_link'] = FALSE if its not a node link.
This codeline has to be reverted soon because a lot of views are affected.
Comment #6
dawehnerLet's revert the patch, find the old issue and find a working example
Comment #7
ayalon commentedCan someone have a look at this? I think it's critical. And easy to reproduce.
Comment #8
hernani commentedI can confirm that the patch submitted by ayalon on #5 solved the problem.
Thanks!
Comment #9
mattyoung commentedI'm using 6.x-2.11 and have the same problem. It used to work I think two versions ago.
now the link is like this:
http://wcegymnastics.com/node/nidComment #10
liquidcms commentedi think output field as link does work in 6.x-2.11 but it is broken in 6.x-2.x-dev.
anyone know if fix will get committed on 2.x branch as well (as would really be nice to get to use the clone a display feature that is in 2.x-dev)
Comment #11
liquidcms commentedapplied patch above to 2.x-dev and fixes there as well.
Comment #12
ea777 commentedPatch works for me. I'm running the latest dev version of views 3 (latest as of this today's date).
Comment #13
TS79 commentedHi,
i attached a patch, which will solve the current problems of this issue and the/my problem from
#762484: faulty caching of link to node (views_handler_field_node), which existed only in case of link-to-node-option is selected for th field.
All current problems of this issze (which have been caused by my last patch, see #5 above) occure in situations, where the link-to-node-option is NOT selected. Isn't it??
So I propose only to set $this->options['alter']['make_link'] to FALSE, if link-to-node-option is checked AND there is no node-data returned from DB for this field (since the handler is used for a field of a left-joined-node-table without any match).
Description of Link-tonode-option ist "This will override any other link you have set.". So each developer should be aware of this.
I think both problems are solved with this patch.
Comment #14
dawehnerCode looks fine, but i can't reproduce the bug so i can't test the patch.
Comment #15
TS79 commentedokay, I try to explain a test case: Imagine you have 2 node types: story nodes and user nodes.
You create a view, which lists all of your nodes (unfiltered) in base table.
You show nid, the primary index of them, and type.
Now you want to have a third column, which shows a hard coded string "This is linked for a story node", which is linked to the story node in case it is a story node.
To achieve this, you use a left join of the reduced node table to the full node table:
Returned data-result might be:
In views GUI you enable "link-to-node" for the n_story.nid field and overwrite the content with the hard coded string.
If everything works fine, you get the following view:
With the caching bug in place you get:
Comment #16
sreher commentedThanks for the patch, work's for me.
Comment #17
mandreato commentedThe patch #13 works for me too.
Comment #18
merlinofchaos commentedCommitted to all branches.
Comment #20
mattyoung commentedI still have this problem after update to "2.12". The path I got is "node/nid". The string "nid" should be the node id value but it's just the literal string "nid".
I fixed the problem by adding the nid field, exclude it from display, use "Output this field as a link" instead and use "node/[nid]" as Link path pattern.
Comment #21
mattyoung commentedForgot to change status
Comment #22
merlinofchaos commentedI'm sorry, why did you make this active again? The committed patch is not in 2.12.
Comment #23
mattyoung commentedSorry about this. I did looked at the code in render_link() and saw the code is like in the patch in #5, the else clause is gone. I thought that was the fix.
So the bug is still in 2.12?