You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@wicket.apache.org by "Martin Grigorov (JIRA)" <ji...@apache.org> on 2014/04/17 09:50:15 UTC

[jira] [Commented] (WICKET-5560) Click on any link leads to a 404 error

    [ https://issues.apache.org/jira/browse/WICKET-5560?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13972371#comment-13972371 ] 

Martin Grigorov commented on WICKET-5560:
-----------------------------------------

Please provide a quickstart application that shows the issue (http://wicket.apache.org/start/quickstart.html).
Please try to create it without @MountPath because this is not part of Wicket distro and thus is not officially supported by us.
Thanks!

> Click on any link leads to a 404 error
> --------------------------------------
>
>                 Key: WICKET-5560
>                 URL: https://issues.apache.org/jira/browse/WICKET-5560
>             Project: Wicket
>          Issue Type: Bug
>          Components: wicket
>    Affects Versions: 6.14.0
>            Reporter: Dirk Reichelt
>
> Under certain prerequisites a click on any link in an instance of SomePage leads to a 404 error.
> The prerequisites are:
> - Class SomePage is not annotated with @MountPath
> - SecuritySettings.enforceMounts is set to true
> - A CryptoMapper is used as RequestMapper
> Reason:
> In BookmarkableMapper.parseRequest (called indirectly by CryptoMapper.mapRequest) the method matches returns false,
> as reverseUrl is the encrypted URL (rootRequestMapper is a CryptoMapper) but BookmarkableMapper.matches expects a decrypted URL.
> BookmarkableMapper - lines 132 ff.:
> {code}
> Url reverseUrl = application.getRootRequestMapper().mapHandler(
> 	new RenderPageRequestHandler(new PageProvider(pageClass)));
> if (!matches(request.cloneWithUrl(reverseUrl)))
> {
> 	return null;
> }
> {code}
> 	
> As a result BookmarkableMapper.mapRequest and hence CryptoMapper.mapRequest returns null resulting in a 404 error.
> 	
> The Problem came up with the change in the if-clause in Component.urlFor(Behavior, RequestListenerInterface, PageParameters) [lines 3341 ff.].
> Now BookmarkableListenerInterfaceRequestHandler is used instead of ListenerInterfaceRequestHandler.
> (Page isBookmarkable and wasCreatedBookmarkable, but is not stateless.) 
> So BookmarkableMapper became responsible.



--
This message was sent by Atlassian JIRA
(v6.2#6252)