When trying to make an image link to a URL, the user-supplied http:// address gets ignored, resulting in the following output:

<a href="/">

CommentFileSizeAuthor
#9 img_assist.module_8.patch1.04 KBdarren oh

Comments

Steve Dondley’s picture

Status: Active » Needs review

Sorry, don't have time to make a proper patch right now. The problem is line 1318:

$output .= l($img_tag, $link[1], array(), NULL, NULL, FALSE, TRUE);

It should be:

$output .= l($img_tag, $attributes['url'], array(), NULL, NULL, FALSE, TRUE);
darren oh’s picture

Status: Needs review » Fixed

Fixed in CVS commit 48041.

Anonymous’s picture

Status: Fixed » Closed (fixed)
decafdennis’s picture

Component: TinyMCE Plugin (drupalimage) » Code
Status: Closed (fixed) » Active

I have a few sites (some with TinyMCE, some without) using img_assist and I had to reverse this patch for all of them. Links on images would all point to /. When I reverse this patch (so back to $link[1]) the links work again.

It seems that the patch in this issue actually causes the bug it's trying to fix...

Steve Dondley’s picture

What version of drupal are you using?

decafdennis’s picture

This patch is still assigned to 4.7.x, so that's what I'm using. (Mostly 4.7.5 or 4.7.6.)

Shai’s picture

My experience also is that this patch causes the URL problem. I manually pasted in the old code for line 1318 and it fixed the problem. I'm using Drupal 4.7.5 and this is the version: // $Id: img_assist.module,v 1.56.2.18 2006/12/14 14:41:42 darrenoh Exp $

chellman’s picture

This bug affects the 5.x-1.1 version of the module as well. The line in there is 1327, but the fix is the same. I applied the fix, and it worked for me.

I'm not sure if I should be submitting a separate bug for this or not.

darren oh’s picture

Version: 4.7.x-1.x-dev » 5.x-1.1
Status: Active » Patch (to be ported)
StatusFileSize
new1.04 KB

Bug reports that have been fixed can be reused by changing the version and setting the status to "patch (to be ported)".

decafdennis’s picture

Please read my comment #4; a different patch needs to be written. This is not just about porting the original patch to 5.x.

darren oh’s picture

Status: Patch (to be ported) » Postponed (maintainer needs more info)

I cannot reproduce this problem. If you can specify the conditions under which it appears, I'll work on it.

sun’s picture

Status: Postponed (maintainer needs more info) » Fixed

Seems to be related to http://drupal.org/node/158968 and therefore should be fixed in the latest development snapshot.

Anonymous’s picture

Status: Fixed » Closed (fixed)