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

thebuckst0p’s picture

Issue tags: -field node link +link, +node, +field
deshilachado’s picture

"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?

thebuckst0p’s picture

I 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.

edwardcuf’s picture

Hi 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 :)

merlinofchaos’s picture

Status: Active » Postponed (maintainer needs more info)

Yeah, 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.

dkocis’s picture

And 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?

thebuckst0p’s picture

I'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?

thebuckst0p’s picture

Aha! 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!!

dkocis’s picture

That worked awesome thanks!

esmerel’s picture

Status: Postponed (maintainer needs more info) » Closed (fixed)
enkara’s picture

I 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