Closed (duplicate)
Project:
Link
Version:
7.x-1.0
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
9 Dec 2011 at 21:28 UTC
Updated:
16 Feb 2012 at 01:03 UTC
Thanks for maintaining what has become a vital module!
A few notes:
Comments
Comment #1
kpa commentedYou are right, strpos expects a string. I'm not sure why/what module is putting forwards $item['attributes']['rel'] as an array of ['rel'], but this code fixes the problem.
In ../modules/link/link.module
Change to:
For those interested, the $item['attributes']['rel']['rel'] element is a duplicate of the parent array. Somewhere, something is setting
Comment #2
deborra-1 commentedI too hit this problem, and may have some info that could help better identify the root.
I let folks input urls and check them in my code with the Drupal API method valid_url(). Even with this check, bad URLs could be input including http://www.mfg-6/Widget. This URL caused the problem. When I fixed the URL to http://www.mfg-6.com/Widget, the problem went away. I tried several times to ensure that this was indeed causing and "fixing" the problem. Hopefully it is not a red herring.
Comment #3
tomceek commentedI have removed that option from link module, but my need is to have nofollow attribute even for internal links too so it would be nice to have it as function in module settings.
Comment #4
dqdI have to agree with what tomceek says, and have opened another issue for that #1441702: Rel attribute should have an option to get automaticly turned on/off if link is internal/external,
... since it isn't only useful for the condition that the link is internal, but also if the link is external in some cases. So it needs a more complete solution for rel attribute getting turned on/off, if the link is internal or external. The patch is provided in this http://drupal.org/node/1441702#comment-5607360 and even if the rules say to rather close the new issue for the old one, I close this issue here, since it should be solved by the patch for a new solution, and I would like to lead you over there to test the patch to commit it as soon as possible.