Images linked wrongly

vizechef - August 26, 2007 - 12:50
Project:Context links
Version:5.x-1.x-dev
Component:Code
Category:bug report
Priority:normal
Assigned:Unassigned
Status:needs review
Description

Hi !
I installed the module and activated it.
When I tried out my first context link, everything worked fine - with one exception: Instead of the image I excepted to come up, the 'alt'-text was shown (e.g. 'external').
The image link was rendered as foo/bar/?q=modules/contextlinks/images/external.gif.
I think it's the ?q= that causes my problems.
I don't have clean URLs activated and I don't want to.
Is there a way to change the current behaviour to a "normal" image link such as foo/bar/modules/contextlinks/images/external.gif ??

Thanks for your help in advance !

#1

jonathan1055 - April 23, 2009 - 18:51

I have exactly the same problem, with the latest version 1.2. I do not have clean urls activated, but I guess the developers of this module did, so they did not notice the error.

I would appreciate having this fixed. It should be easy enough to do. I might even try to fix it myself, and if so, I will post the change here in case anyone else wants it.

Jonathan

#2

jonathan1055 - April 23, 2009 - 18:58
Title:Images linked wrong ?» Images linked wrongly
Version:5.x-1.2» 5.x-1.x-dev
Component:Miscellaneous» Code
Category:support request» bug report
Status:active» needs review

I know it is a long time ago, but looking back and trying to wrap up some of my old issues, I realised that I had not submitted the fix I made. The problem is calling url() which is not required in this situation. It is not making an active clickable url, just the src value for the image tag. Take a look at the url() documentation to see what I mean.

It is simply a case of removing the line which changes $class->image into url($class->image) and the attached patch makes this change.

Jonathan

AttachmentSize
_contextlinks.image_src.patch.txt 458 bytes
 
 

Drupal is a registered trademark of Dries Buytaert.