You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@cocoon.apache.org by "Grzegorz Kossakowski (aka g[R]eK) (JIRA)" <ji...@apache.org> on 2007/01/29 10:56:49 UTC

[jira] Commented: (COCOON-1990) Redirect bug WITHIN sub sitemap WHEN using uri-prefix in map:mount

    [ https://issues.apache.org/jira/browse/COCOON-1990?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12468210 ] 

Grzegorz Kossakowski (aka g[R]eK) commented on COCOON-1990:
-----------------------------------------------------------

I couldn't reproduce this issue. I've put into build/webapp/test these sitemaps:

sitemap.xmap:
{code:xml}
<?xml version="1.0" encoding="UTF-8"?>
<map:sitemap xmlns:map="http://apache.org/cocoon/sitemap/1.0">
  <map:pipelines>
    <map:pipeline>
      <map:match pattern="test2/**">
        <map:mount check-reload="yes" src="subsitemap.xmap" uri-prefix="test2"/>
      </map:match>
  </map:pipeline>
  </map:pipelines>
</map:sitemap>
{code}

subsitemap.xmap:
{code:xml}
<?xml version="1.0" encoding="UTF-8"?>
<map:sitemap xmlns:map="http://apache.org/cocoon/sitemap/1.0">
  <map:pipelines>
    <map:pipeline>
    <map:match pattern="A.html">
      <map:redirect-to uri="cocoon:/B.html"/>
    </map:match>
    <map:match pattern="B.html">
      <map:redirect-to uri="http://www.wp.pl"/>
    </map:match>
  </map:pipeline>
  </map:pipelines>
</map:sitemap>
{code}

Could you attach simple sitemaps where bug shows up?
Also include version of your OS, Cocoon and Java.

> Redirect bug WITHIN sub sitemap WHEN using uri-prefix in map:mount
> ------------------------------------------------------------------
>
>                 Key: COCOON-1990
>                 URL: https://issues.apache.org/jira/browse/COCOON-1990
>             Project: Cocoon
>          Issue Type: Bug
>          Components: * Cocoon Core
>    Affects Versions: 2.1.10
>            Reporter: Robert Hoffmann
>
> Hi cocoon developers,
> I found the following problem with redirects within sub-sitemaps WHEN using the uri-prefix in map:mount...
> Test case:
> 1) Sitemaps:
> Root sitemap >>
> ...
> <map:pipeline>
>    <map:match pattern="test/**">
>      <map:mount check-reload="yes" src="subsitemap.xmap" uri-prefix="test" />     </map:match>
> </map:pipeline>
> ...<<
> Sub sitemap >>
> ...
>  <map:match pattern="A.html">
>   <map:redirect-to uri="cocoon:/B.html"/>
>  </map:match>
>  <map:match pattern="B.html">
>   <map:redirect-to uri="http://www.google.com"/>
>  </map:match>
> ...<<
> 2) NOW: When you request "http://testserver/cocoon/test/A.html"...
> you should get redirected to B.html WITHIN the sub sitemap (that's why we use 'cocoon:/B.html' and not 'cocoon://B.html')...
> BUT the redirect does NOT work correctly, hence we will not get the google-site which would be the correct result.
> 3) The cocoon.log says: http-11080-Processor23/CocoonServlet: No pipeline matched request: test/B.html !!!
> [So it seems to me that the uri-prefix from the sub-sitemap mount is added in the this redirect, which might be why it does not match then within the sub-sitemap.]
> 3) Important: This only goes wrong when using the uri-prefix[-remove] attribute in map:mount
> I hope this detailed test case will be helpful to one of the cocoon gurus... I really would hate if I had to use redirects to the ROOT sitemap (that's not the idea of sub sitemaps).
> Many thanks!!!
> Robert
> PS: Cocoon really rocks!
> --
> Have you tried iHOP yet? http://www.ihop-net.org/UniPub/iHOP/

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