You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@wicket.apache.org by "Mike Comb (JIRA)" <ji...@apache.org> on 2009/04/23 02:33:47 UTC

[jira] Created: (WICKET-2235) Image tags using full paths are broken when wrapped in an a tag that uses wicket:link

Image tags using full paths are broken when wrapped in an a tag that uses wicket:link
-------------------------------------------------------------------------------------

                 Key: WICKET-2235
                 URL: https://issues.apache.org/jira/browse/WICKET-2235
             Project: Wicket
          Issue Type: Bug
          Components: wicket
    Affects Versions: 1.4-RC2, 1.4-RC1
         Environment: Safari  on OS X, probably others
            Reporter: Mike Comb


HTML that looks like this:

<wicket:link><a href="SomePage.html"><img src="/some/full/path/image.gif" /></a></wicket:link>

Will get converted to this:

<wicket:link><a href="../SomePage"><img onclick="window.location.href='/some/full/path/image.gif';return false;" src="/some/full/path/image.gif"/></a></wicket:link>

The onclick that gets added to the image is unnecessary and results in the browser directing to the image rather than the intended target page when the image is clicked on.  This behavior is still present in trunk as of 4/22/09.  A temporary workaround is to comment out the offending line in ExternalLink.java that is adding the onclick event.  It's unclear to me what the purpose of that event is.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Issue Comment Edited: (WICKET-2235) Image tags using full paths are broken when wrapped in an a tag that uses wicket:link

Posted by "Jeremy Thomerson (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/WICKET-2235?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12703503#action_12703503 ] 

Jeremy Thomerson edited comment on WICKET-2235 at 4/27/09 11:12 PM:
--------------------------------------------------------------------

Not sure, but it may be related to a patch I submitted (someone else committed - before I was a committer) around that timeframe for the following:
WICKET-1513

I will try to look soon.

NEVER MIND - I have looked at that patch and it did not change the behavior for IMG tags at all - it just added input and embed tags to the AutoLinkResolver.


      was (Author: jthomerson):
    Not sure, but it may be related to a patch I submitted (someone else committed - before I was a committer) around that timeframe for the following:
https://issues.apache.org/jira/browse/WICKET-1513

I will try to look soon.
  
> Image tags using full paths are broken when wrapped in an a tag that uses wicket:link
> -------------------------------------------------------------------------------------
>
>                 Key: WICKET-2235
>                 URL: https://issues.apache.org/jira/browse/WICKET-2235
>             Project: Wicket
>          Issue Type: Bug
>          Components: wicket
>    Affects Versions: 1.4-RC1, 1.4-RC2
>         Environment: Safari  on OS X, probably others
>            Reporter: Mike Comb
>            Assignee: Igor Vaynberg
>
> HTML that looks like this:
> <wicket:link><a href="SomePage.html"><img src="/some/full/path/image.gif" /></a></wicket:link>
> Will get converted to this:
> <wicket:link><a href="../SomePage"><img onclick="window.location.href='/some/full/path/image.gif';return false;" src="/some/full/path/image.gif"/></a></wicket:link>
> The onclick that gets added to the image is unnecessary and results in the browser directing to the image rather than the intended target page when the image is clicked on.  This behavior is still present in trunk as of 4/22/09.  A temporary workaround is to comment out the offending line in ExternalLink.java that is adding the onclick event.  It's unclear to me what the purpose of that event is.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (WICKET-2235) Image tags using full paths are broken when wrapped in an a tag that uses wicket:link

Posted by "Juergen Donnerstag (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/WICKET-2235?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12703495#action_12703495 ] 

Juergen Donnerstag commented on WICKET-2235:
--------------------------------------------

and which JIRA issue was meant to be fixed by that 1.4rc1 patch

> Image tags using full paths are broken when wrapped in an a tag that uses wicket:link
> -------------------------------------------------------------------------------------
>
>                 Key: WICKET-2235
>                 URL: https://issues.apache.org/jira/browse/WICKET-2235
>             Project: Wicket
>          Issue Type: Bug
>          Components: wicket
>    Affects Versions: 1.4-RC1, 1.4-RC2
>         Environment: Safari  on OS X, probably others
>            Reporter: Mike Comb
>            Assignee: Igor Vaynberg
>
> HTML that looks like this:
> <wicket:link><a href="SomePage.html"><img src="/some/full/path/image.gif" /></a></wicket:link>
> Will get converted to this:
> <wicket:link><a href="../SomePage"><img onclick="window.location.href='/some/full/path/image.gif';return false;" src="/some/full/path/image.gif"/></a></wicket:link>
> The onclick that gets added to the image is unnecessary and results in the browser directing to the image rather than the intended target page when the image is clicked on.  This behavior is still present in trunk as of 4/22/09.  A temporary workaround is to comment out the offending line in ExternalLink.java that is adding the onclick event.  It's unclear to me what the purpose of that event is.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (WICKET-2235) Image tags using full paths are broken when wrapped in an a tag that uses wicket:link

Posted by "Igor Vaynberg (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/WICKET-2235?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12703475#action_12703475 ] 

Igor Vaynberg commented on WICKET-2235:
---------------------------------------

we do not guarantee any functionality in milestone builds. where is the commit that introduced the bug?

> Image tags using full paths are broken when wrapped in an a tag that uses wicket:link
> -------------------------------------------------------------------------------------
>
>                 Key: WICKET-2235
>                 URL: https://issues.apache.org/jira/browse/WICKET-2235
>             Project: Wicket
>          Issue Type: Bug
>          Components: wicket
>    Affects Versions: 1.4-RC1, 1.4-RC2
>         Environment: Safari  on OS X, probably others
>            Reporter: Mike Comb
>            Assignee: Igor Vaynberg
>
> HTML that looks like this:
> <wicket:link><a href="SomePage.html"><img src="/some/full/path/image.gif" /></a></wicket:link>
> Will get converted to this:
> <wicket:link><a href="../SomePage"><img onclick="window.location.href='/some/full/path/image.gif';return false;" src="/some/full/path/image.gif"/></a></wicket:link>
> The onclick that gets added to the image is unnecessary and results in the browser directing to the image rather than the intended target page when the image is clicked on.  This behavior is still present in trunk as of 4/22/09.  A temporary workaround is to comment out the offending line in ExternalLink.java that is adding the onclick event.  It's unclear to me what the purpose of that event is.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (WICKET-2235) Image tags using full paths are broken when wrapped in an a tag that uses wicket:link

Posted by "Mike Comb (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/WICKET-2235?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12703431#action_12703431 ] 

Mike Comb commented on WICKET-2235:
-----------------------------------

This isn't a feature request, it's a bug.  This worked fine through 1.4m3 and we built websites around the way it used to work.  In 1.4rc1 a bug was introduced that broke previously working functionality.  Going back through our existing websites and updating them to make every link a component is not an option.  I'd be glad to submit a patch that reverts this functionality to the way in was in 1.4m3 if that would help.

> Image tags using full paths are broken when wrapped in an a tag that uses wicket:link
> -------------------------------------------------------------------------------------
>
>                 Key: WICKET-2235
>                 URL: https://issues.apache.org/jira/browse/WICKET-2235
>             Project: Wicket
>          Issue Type: Bug
>          Components: wicket
>    Affects Versions: 1.4-RC1, 1.4-RC2
>         Environment: Safari  on OS X, probably others
>            Reporter: Mike Comb
>            Assignee: Igor Vaynberg
>
> HTML that looks like this:
> <wicket:link><a href="SomePage.html"><img src="/some/full/path/image.gif" /></a></wicket:link>
> Will get converted to this:
> <wicket:link><a href="../SomePage"><img onclick="window.location.href='/some/full/path/image.gif';return false;" src="/some/full/path/image.gif"/></a></wicket:link>
> The onclick that gets added to the image is unnecessary and results in the browser directing to the image rather than the intended target page when the image is clicked on.  This behavior is still present in trunk as of 4/22/09.  A temporary workaround is to comment out the offending line in ExternalLink.java that is adding the onclick event.  It's unclear to me what the purpose of that event is.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (WICKET-2235) Image tags using full paths are broken when wrapped in an a tag that uses wicket:link

Posted by "Jeremy Thomerson (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/WICKET-2235?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12703503#action_12703503 ] 

Jeremy Thomerson commented on WICKET-2235:
------------------------------------------

Not sure, but it may be related to a patch I submitted (someone else committed - before I was a committer) around that timeframe for the following:
https://issues.apache.org/jira/browse/WICKET-1513

I will try to look soon.

> Image tags using full paths are broken when wrapped in an a tag that uses wicket:link
> -------------------------------------------------------------------------------------
>
>                 Key: WICKET-2235
>                 URL: https://issues.apache.org/jira/browse/WICKET-2235
>             Project: Wicket
>          Issue Type: Bug
>          Components: wicket
>    Affects Versions: 1.4-RC1, 1.4-RC2
>         Environment: Safari  on OS X, probably others
>            Reporter: Mike Comb
>            Assignee: Igor Vaynberg
>
> HTML that looks like this:
> <wicket:link><a href="SomePage.html"><img src="/some/full/path/image.gif" /></a></wicket:link>
> Will get converted to this:
> <wicket:link><a href="../SomePage"><img onclick="window.location.href='/some/full/path/image.gif';return false;" src="/some/full/path/image.gif"/></a></wicket:link>
> The onclick that gets added to the image is unnecessary and results in the browser directing to the image rather than the intended target page when the image is clicked on.  This behavior is still present in trunk as of 4/22/09.  A temporary workaround is to comment out the offending line in ExternalLink.java that is adding the onclick event.  It's unclear to me what the purpose of that event is.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (WICKET-2235) Image tags using full paths are broken when wrapped in an a tag that uses wicket:link

Posted by "Mike Comb (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/WICKET-2235?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12703813#action_12703813 ] 

Mike Comb commented on WICKET-2235:
-----------------------------------

That is correct.  The "return false" is what is causing the problem.  The onclick was previously there at least as far back as 1.3 and was not problematic on it's own, at least not in our application.

> Image tags using full paths are broken when wrapped in an a tag that uses wicket:link
> -------------------------------------------------------------------------------------
>
>                 Key: WICKET-2235
>                 URL: https://issues.apache.org/jira/browse/WICKET-2235
>             Project: Wicket
>          Issue Type: Bug
>          Components: wicket
>    Affects Versions: 1.4-RC1, 1.4-RC2
>         Environment: Safari  on OS X, probably others
>            Reporter: Mike Comb
>            Assignee: Igor Vaynberg
>
> HTML that looks like this:
> <wicket:link><a href="SomePage.html"><img src="/some/full/path/image.gif" /></a></wicket:link>
> Will get converted to this:
> <wicket:link><a href="../SomePage"><img onclick="window.location.href='/some/full/path/image.gif';return false;" src="/some/full/path/image.gif"/></a></wicket:link>
> The onclick that gets added to the image is unnecessary and results in the browser directing to the image rather than the intended target page when the image is clicked on.  This behavior is still present in trunk as of 4/22/09.  A temporary workaround is to comment out the offending line in ExternalLink.java that is adding the onclick event.  It's unclear to me what the purpose of that event is.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (WICKET-2235) Image tags using full paths are broken when wrapped in an a tag that uses wicket:link

Posted by "Jeremy Thomerson (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/WICKET-2235?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12703516#action_12703516 ] 

Jeremy Thomerson commented on WICKET-2235:
------------------------------------------

All that commit did was add a "return false" to the already present onclick.

I agree that the onclick is not needed and should not be added to an img tag within wicket:link - but that doesn't seem to be the commit that caused it.

> Image tags using full paths are broken when wrapped in an a tag that uses wicket:link
> -------------------------------------------------------------------------------------
>
>                 Key: WICKET-2235
>                 URL: https://issues.apache.org/jira/browse/WICKET-2235
>             Project: Wicket
>          Issue Type: Bug
>          Components: wicket
>    Affects Versions: 1.4-RC1, 1.4-RC2
>         Environment: Safari  on OS X, probably others
>            Reporter: Mike Comb
>            Assignee: Igor Vaynberg
>
> HTML that looks like this:
> <wicket:link><a href="SomePage.html"><img src="/some/full/path/image.gif" /></a></wicket:link>
> Will get converted to this:
> <wicket:link><a href="../SomePage"><img onclick="window.location.href='/some/full/path/image.gif';return false;" src="/some/full/path/image.gif"/></a></wicket:link>
> The onclick that gets added to the image is unnecessary and results in the browser directing to the image rather than the intended target page when the image is clicked on.  This behavior is still present in trunk as of 4/22/09.  A temporary workaround is to comment out the offending line in ExternalLink.java that is adding the onclick event.  It's unclear to me what the purpose of that event is.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Resolved: (WICKET-2235) Image tags using full paths are broken when wrapped in an a tag that uses wicket:link

Posted by "Igor Vaynberg (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/WICKET-2235?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Igor Vaynberg resolved WICKET-2235.
-----------------------------------

    Resolution: Won't Fix
      Assignee: Igor Vaynberg

wicket:link is a convenience and should only be used for very simple cases. if it is not doing what you want then simply use compoenents directly.

> Image tags using full paths are broken when wrapped in an a tag that uses wicket:link
> -------------------------------------------------------------------------------------
>
>                 Key: WICKET-2235
>                 URL: https://issues.apache.org/jira/browse/WICKET-2235
>             Project: Wicket
>          Issue Type: Bug
>          Components: wicket
>    Affects Versions: 1.4-RC1, 1.4-RC2
>         Environment: Safari  on OS X, probably others
>            Reporter: Mike Comb
>            Assignee: Igor Vaynberg
>
> HTML that looks like this:
> <wicket:link><a href="SomePage.html"><img src="/some/full/path/image.gif" /></a></wicket:link>
> Will get converted to this:
> <wicket:link><a href="../SomePage"><img onclick="window.location.href='/some/full/path/image.gif';return false;" src="/some/full/path/image.gif"/></a></wicket:link>
> The onclick that gets added to the image is unnecessary and results in the browser directing to the image rather than the intended target page when the image is clicked on.  This behavior is still present in trunk as of 4/22/09.  A temporary workaround is to comment out the offending line in ExternalLink.java that is adding the onclick event.  It's unclear to me what the purpose of that event is.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (WICKET-2235) Image tags using full paths are broken when wrapped in an a tag that uses wicket:link

Posted by "Mike Comb (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/WICKET-2235?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12703514#action_12703514 ] 

Mike Comb commented on WICKET-2235:
-----------------------------------

The relevant commit was 677818 which was discussed in WICKET-1535.

As an aside, I can't figure out the use case for which having an onclick action automatically added to an image makes sense.  The onclick can't do anything useful as far as I can tell because the only link you have to work with is the image path.  I must be missing the intended functionality here.

> Image tags using full paths are broken when wrapped in an a tag that uses wicket:link
> -------------------------------------------------------------------------------------
>
>                 Key: WICKET-2235
>                 URL: https://issues.apache.org/jira/browse/WICKET-2235
>             Project: Wicket
>          Issue Type: Bug
>          Components: wicket
>    Affects Versions: 1.4-RC1, 1.4-RC2
>         Environment: Safari  on OS X, probably others
>            Reporter: Mike Comb
>            Assignee: Igor Vaynberg
>
> HTML that looks like this:
> <wicket:link><a href="SomePage.html"><img src="/some/full/path/image.gif" /></a></wicket:link>
> Will get converted to this:
> <wicket:link><a href="../SomePage"><img onclick="window.location.href='/some/full/path/image.gif';return false;" src="/some/full/path/image.gif"/></a></wicket:link>
> The onclick that gets added to the image is unnecessary and results in the browser directing to the image rather than the intended target page when the image is clicked on.  This behavior is still present in trunk as of 4/22/09.  A temporary workaround is to comment out the offending line in ExternalLink.java that is adding the onclick event.  It's unclear to me what the purpose of that event is.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.