Problem:
URLs (fully formed external absolute links) are being output (using formatter: URL, absolute) as internal relative links.
For Example:
http://www.external.com/food/pizza.phpIs being saved into the database.- A view is outputting the link using formatter:
URL, absolute - The URL being output by views (and by tokens) is only:
/food/pizza.php - I can see in the database (using phpMyAdmin) that the full URL is being saved:
http://www.external.com/food/pizza.php
It seems like the URL is being filtered, or put through eh Drupal url() function, without flagging it as an external URL. Anyone have a clue why the external URL is being converted to an internal URL ?
Comments
Comment #1
wOOge commentedComment #2
wOOge commentedI've narrowed the issue down to the following code in:
7.x-1.x-dev (March 23rd)link.modulearoundline 472It seems that the lines:
Take an (external) URL as input
$url_parts['url'], and output an internal URL (having stripped away any protocol or domain). I tried hard-coding'external' => TRUE,to see if that fixed the issue, but it doesn't.Is anyone able to point me in a better direction?
Comment #3
wOOge commentedTrying this code in a plain (drupal bootstrapped) php file :
Works as expected — and aside from hard coding the
$urlvariable, it's a code for code copy.So this routine works in general, but not in the
link.moduleComment #4
wOOge commented... ok getting closer, but now I'm really stumped:
Using
http://www.twitter.com?test=faooas my test URL, theurl()function returns this:http://www.twitter.com?test=faooUsing
http://www.twitter.com/test/?test=faooas my test URL (note the addition of /test/, theurl()function returns this:/test/?test=faooSo, clearly the url() function is confused somehow... is this a core bug? Anyone else seeing this problem?
Comment #5
Johannes De Boeck commentedDid you resolve this issue?
I am having the same problem.. an email url gets the root url (domain name) added to it in front. Other links work fine.
Comment #6
dqdThis sounds weird. Can you please provide more info? Drupal core version, subversion, and additional modules involved? You have mentioned a view, so have you already checked issues queues from views and D7 core on this?
Comment #7
dqdComment #8
fredeee commentedhave the issue as well.
appeared to occur after some upgrades.
have three content types (forms), 2 are producing the correct result and one is not.
all three are using panels for output.
drupal 7.28
still using v1.2 not 7.x-1.x-dev
also http://www.xxx.com opens to blank web page
Comment #9
fredeee commentedthis is proving difficult to understand
on checking it appears that we upgraded this site in march with these modules
Entity API 7.x-1.3 7.x-1.4 (Release notes)
jQuery Update 7.x-2.3 7.x-2.4 (Release notes)
Panopoly Images 7.x-1.1 7.x-1.2 (Release notes)
Panopoly Magic 7.x-1.1 7.x-1.2 (Release notes)
Panopoly Theme 7.x-1.1 7.x-1.2 (Release notes)
Panopoly Widgets 7.x-1.1 7.x-1.2 (Release notes)
Panopoly WYSIWYG 7.x-1.1 7.x-1.2 (Release notes)
after such the unexpected change in link display occurred.
we reverted back after the problems.
we have upgraded a number of modules, inc those above again in june and the problem is there.
the problem is consistent across content types, however some content types do not have the problem as stated above.
have used - http://un.org in the link, with no title and with tile, and all works OK
using http;//un.org/en/events/.... it breaks and http://un.org is ignored when the link is selected for opening
will have a look at entity module as this has had some other effects from problems in formatting, however we are not programmers.
Comment #10
wOOge commentedI found it seemed to be a problem with Any Menu Path. There is a patch that people are reporting fixes the issue — i have yet to test it:
https://drupal.org/node/2237615
Comment #11
dqdmove it to Any Menu path ... and close it as duplicate of #2237615: External links are converted to internal links