Project:Link
Version:6.x-2.9
Component:Code
Category:support request
Priority:major
Assigned:Unassigned
Status:closed (fixed)

Issue Summary

ok I am new to this so it is most lickly a setting but when I am logged in I can see the links on the page for a list of website links i set up,
But when I am logged out and just viewing the node I dont see the link list.
where could I have messed up??

Keith

Comments

#1

Title:Link Display Problem» URL is Truncated in Views
Component:User interface» Code

I use views to output image as a link.
I added field link which is excluded from display.
Then I added image field, check "Output this field as a link" and typed [field_link_url] in path.

The problem occurred when url was being too long and url was truncated. I tried to change "Format" but it did not helped.
Please fix it or provide any working solution for that.

#2

I've fixed it for my site, but isn't a best solution:

I have commented code in link.module on line 335:

<?php
/*
if ($field['display']['url_cutoff'] && strlen($display_url) > $field['display']['url_cutoff']) {
    $display_url = substr($display_url, 0, $field['display']['url_cutoff']) ."...";
  }
*/
?>

#3

I am experiencing this issue as well.

#4

In the content type field setting, there is a field that lets you tell it when to truncate the URL, or if you want to truncate it at all.

"If the user does not include a title for this link, the URL will be used as the title. When should the link title be trimmed and finished with an elipsis (…)? Leave blank for no limit."

Unhack your CCK code and go check :)

#5

That is only for display of the url. I am experiencing the same problem. The url is truncated ( with this field left blank...)

#6

Priority:normal» critical

I think truncation of the URL is caused by the database field type. In can see in myphpadmin that the field is: varchar(255). I have some very long urls and they are way longer than 256 characters. Is there a way to fix this?

#7

Priority:critical» normal
Status:active» postponed (maintainer needs more info)

I'm not really sure what the problem is here.

wernerglinka: The Max URL length has been expanded to 2048 in the latest dev version - try that.

Otherwise - what is the problem? The display of the url is truncated, but that's changed by going into the configuration - if you don't want any truncation on the display, just set the URL Display Cutoff field to a blank.

#8

Priority:normal» major
Status:postponed (maintainer needs more info)» active

I think I'm having the same problem as http://drupal.org/node/628312 (posted for Link module), which is: the actual HREF string is truncated for the URL as well as its display

I have tried without success:
1. setting the URL display cutoff to blank
2. setting the URL display cutoff to a value longer than any URL used
3. swearing

I've exhausted my repertoire of fixes and would be grateful for any advice.

e.g.
Display text: Effects of a school-based intervention on adherence of 7–9-year-olds to food-based dietary guidelines and intake of nutrients
Desired URL: http://journals.cambridge.org/action/displayAbstract?fromPage=online&aid...
Actual URL: http://journals.cambridge.org/action/displayAbstract?fromPage=online&aid...

Link source node: http://sheu.org.uk/content/link/effects-school-based-intervention-adhere...
Misbehaving View: http://sheu.org.uk/research-news-primary-latest-old (about half-way down the food links)

#9

I now notice this is posted under the Link project, but I think it's a Views thing: http://drupal.org/node/925046

#10

In the content type field setting, there is a field that lets you tell it when to truncate the URL, or if you want to truncate it at all.

Wow, I'd never noticed that before. Thanks!

#11

DrDaveExeter, your desired link has a query in it, which Drupal is saving separately from the [url]. Everything after the '=' in your desired URL is sending instructions to that site's server, and Drupal is separating those instructions out.

You have 2 options: you can write a function that pastes the [url] and the [query] together (example), or you can use the [display_url]. Setting the URL display cutoff to blank will affect the [display-url], not the [url]. I suspect you've been using [url] up until now, which is why that's not helping.

See this thread for more info.

#12

Thanks HeatherAnn. I've just been using the Views forms so far, I haven't dared put my toe into the water of writing PHP, but I'll have a look.

#13

Version:6.x-2.8» 6.x-2.9
Category:support request» bug report

The same problem.

#14

Category:bug report» support request
Status:active» fixed

Solution is very easy:
When you using Link field using as a token, change the Format to: 'URL, as plain text' in that Link field which is 'Excluded from display'.
It works for me, if not, re-open it please. Make sure that you testing 2.9 or newer.

#15

Status:fixed» closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.