Closed (duplicate)
Project:
Views (for Drupal 7)
Version:
6.x-2.6
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
18 May 2009 at 15:26 UTC
Updated:
11 Dec 2009 at 14:44 UTC
Jump to comment: Most recent file
Comments
Comment #1
damienmckennaI'm experiencing the first bug with 2.6, any time I add [view_node] as the link string the link is inserted as: base_path() . 'view'
Comment #2
damienmckennaThe reason is that Node:Link creates a link in the format (pseudocode):
with the default $link_string being just the word "link".
So, when you want to wrap that as a link around something else, the code is parsing the string for plaintext, presumably using strip_tags() or equivalent, which results in the single word "link".
Ta-daa!
Now to fix it.
Comment #3
damienmckennaThis is a dupe of #482162: Link paths run through check_plain() break argument handling (thanks merlin for pointing this out).
Comment #4
damienmckennaAlso #399534: Add fragment and query to render_as_link is related.
Comment #5
damienmckennaOk, apologies, #482162: Link paths run through check_plain() break argument handling does not actually fix *this* specific issue. This isssue is more to do with Node:Link than "Display as link".
Comment #6
damienmckennaAm removing the second part of this issue as it is handled by #399534: Add fragment and query to render_as_link.
Comment #7
damienmckennaHere's a small patch that adds an option to output the Node:Link field as a raw URL as generated by url('node/$nid'); by default it still generates the full link.
Comment #8
damienmckennaComment #9
alienzed commentedever find out why it was doing that? it's doing it for me now too...
Comment #10
damienmckennamerlinofchaos said that for this desired result we should do the following:
* Add a Node ID field. Set it to be hidden and move it above the field we want to make a link.
* In the field we're turning into a link add the following as the link URL: node/[nid]
* When it is going to be displayed it will then be converted into the friendly URL.
Not completely intuitive, but it works.
Comment #11
alienzed commentedMaybe unrelated, maybe not. I JUST noticed after weeks of randomly having this problem that turning THEME DEVELOPER, part of the devel package, on and off, also makes a similar problem with the basepath being appended appear and disappear.
So if you are experiencing this problem, make sure you don't have theme developper enabled.
Comment #12
damienmckennaalienzed: that's not directly related to this, but thanks.
Comment #13
damienmckenna(edit)
Nevermind, that was an invalid use case that used Content:Link not Node:Link.
Comment #14
dagmarI think this patch needs a better explanation of what it does in the #description field.
Maybe if you create an small html text for advanced help users can know how works this feature.
Comment #15
jimboh commentedSorry if this is unrelated but I am a noob when it comes to views etc.
I have a view with a field set as 'output as link' with the following in link path: node/1/[field_bname_value]
The problem I am getting is the handling of '& ' in the field.
With field_bname_value =' Schooner landing B&B and Cottage' the link is being supplied as ' /node/1/Schooner%20Landing%20B%2526amp%3BB%20and%20Cottage%20'
which doesent work.
If I remove the 'amp%3b' it works fine
Hope this info is of use
Comment #16
merlinofchaos commented#15: Your problem sounds like http://drupal.org/node/482162 and should be fixed in the -dev version.
Comment #17
dagmarDuplicate of #470018: Allow absolute url in node and comments links