By Ology on
I am sure this is simple and I have searched around and not found anything yet.
I used the CCK to create a node and one of the fields is a url and another is the string to appear for that link. In the Views module I add both, excluding the url from the view and then for the text I say make this into a link and use the other filed as the url.
Now those urls have & in the url and in my database, but when the Page is created the urls now say & amp; and don't work.
How do I fix it so that the links created use the text as it is in field?
Thanks
Comments
CCK Display Fields
My gut reaction is that your Display Fields option for that field is not set to "Plain Text" which could cause some issues with stripping out or altering things like the ampersand. What's it set to for the full node view?
I appreciate the help and
I appreciate the help and that sounds like it would be it and I went in and changed it to make sure its "Plain Text" and I still have the same issue.
For the field in question I have the following settings in that View:
Output this field as a link checked, and then in the link path I have [field_url_value] which has the url value in it with simple & in the text.
I then have the label set to Widget label (link String)
and Format is "Plain Text"
The settings for the [field_url_value] are:
Exclude from display
Widget Label (link)
Format = "Plain Text"
I am not sure if helps but when I do a normal search of the site and look at the node the string that is used as [field_url_value] is correct and does not have the & instead it is simply &.
To try a test I then changed the [field_url_value] to not be excluded so I could see the text. The first result was an error "Validation error, please try again. If this error persists, please contact the site administrator." I then retryed the change and it worked.
So I end up with a table that has the url string showing without the amp; and then right next to it the link with the amp; in it.
Same Issue Here
I seem to be experiencing the same or a similar issue. I have a taxonomy field that I'm outputting as a link. A couple of my terms have ampersands in them and now they don't work. I'm reasonably sure that they worked in 6.9 and they stopped working when we upgraded to 6.10. Whether it's a bug in 6.10 or just a coincidence I'm not sure, but it looks like the link is getting encoded twice.
subscribe - I have the same
subscribe - I have the same symptoms
same problem, an issue for me
same problem, an issue for me using feedapi / feed element mapper as many URLs have & in them. subscribe.
Quick Fix
Hey, I don't know how advisable a fix this is, but I was able to put a bandaid on the problem by using a regular expression to replace HTML-escaped ampersands with regular ampersands in the return value of render_as_link() in views_handler_fields.inc:
For me this is on line 493 of views_handler_fields.inc
I'm running Drupal 6.10 with the following:
Views 6.x-2.5
CCK 6.x-2.2
I'm having the same issue -
I'm having the same issue - using taxonomy fields as tags.
After reading your post, I downloaded Views 6.x-2.5 (I'm using a later version) and looked for views_handler_fields.inc - there's only a views_handler_field.inc file I could find - without the "s."
Insofar as I'm looking to fix taxonomy terms and the site is almost "live," I'd rather not muck around unless/until I'm sure.
Could you (or anyone) possibly confirm what the correct .inc file would be, or whether I should be looking at views_handler_field_taxononomy.inc instead... and perhaps even where the "bandaid" might go in Views 6.x-2.7?
Thanks so much for what seems to be the last thing I need to finish the site!
Oops!
Hello bcobin, sorry for the oversight! The file you need to change is indeed called "views_handler_field.inc" with no "s".
The line I replaced contains the code for the return of the function "render_as_link". In Views 6.x-2.7 this line is 632.
Please be advised, however, I haven't tried the fix on this version of the views module. Best of luck!
Subscribe - having the same
Subscribe - having the same issue
same here
same here
Is this still unresolved?
Subscribe
Hello, I have the same issue
Hello,
I have the same issue with views in drupal 7. Is there a solution for that?
Best regards
Frank