Closed (fixed)
Project:
Views (for Drupal 7)
Version:
6.x-2.3
Component:
page displays
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
19 Mar 2009 at 15:41 UTC
Updated:
17 Mar 2010 at 09:20 UTC
I'm relying on the "Link this field to its node" in the Fields settings for most of my theming, but when I upgraded from 2.2 to 2.3, the links all reverted to plain text. I notice the new "Output this field as a link" option, so I wonder if the breakage of "Link this field to its node" is deliberate, but turning both on doesn't put the links back. Is this by design in 2.3 or a bug?
(I see a bunch of issues on similar lines, mostly regarding comments, but none of this specifically, so I'm making a new issue.)
Comments
Comment #1
thebuckst0p commentedComment #2
deshilachado commented"Link this field to its node" should work in Views 2.3 and it does so for me. You cannot use "Link this field to its node" and "Output this field as a link" at the same time - if "Link this field to its node" is checked it overwrites any other link you have set (or at least it claims to do so, didn't try it).
So I suppose this is a bug in your installation, maybe it can be solved as easily as clearing your cache? Did you delete the views folder before updating?
Comment #3
thebuckst0p commentedI did delete the views folder, and ran update.php, and cleared the cache. Link To Node is on (unchanged from 2.2) and Output As Link is off, but the $field->content does not include links anymore.
Comment #4
edwardcuf commentedHi thebuckst0p
I had the same problem today and after reading this managed to solve it on my installation. In the past I had edited my views-view--fields.tpl.php files in my theme and this old piece of code was in there
echo $view->field['title']->render($row);This no longer outputs the link, only the title. I reedited them back to the original views-view--fields.tpl.php file and the links worked.
Might be the same problem if you have edited your theme :)
Comment #5
merlinofchaos commentedYeah, if using render() you should probably change that to advanced_render() to get the links. That could be why it's failing for you and not others.
Comment #6
dkocis commentedAnd if I haven't edited my theme, and am using Views 2.6, any other ideas? Still not getting the titles to link to their node. Is there any other extra exhibit code I need to put in?
Comment #7
thebuckst0p commentedI'm not using render(), just
$field->content, so that's not it. I tried again today with the newest build (upgrading now from 2.2, where it worked, to 2.6) and it's still not rendering the links.I'm using a subtheme of Zen, could that be related?
Comment #8
thebuckst0p commentedAha! I had a field preprocessor which did in fact call $field->render($row). Changed it to advanced_render($row) and it's working. Thank you!!
Comment #9
dkocis commentedThat worked awesome thanks!
Comment #10
esmerel commentedComment #11
enkara commentedI have the same problem in 2.8 but I don't know how to solve it, I haven't used any render function on my own