Forrest
  1. Forrest
  2. FOR-733

wholesite.pdf does not work with the locationmap

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 0.8, 0.9
    • Fix Version/s: 0.9
    • Component/s: Locationmap
    • Labels:
      None

      Description

      Whilst there a number of isues with wholesite the one described by Greg Yenchi appear to be related to the locationmap.

      http://www.mail-archive.com/dev@forrest.apache.org/msg06175.html

      1. locationmap.log
        407 kB
        Ross Gardler

        Activity

        Hide
        Ross Gardler added a comment -
        Locationmap log provided by Greg

        A very quick glance shows that we are looking for a "lm:project.wholesite.fo" match - this will certainly be one of the problems as there is no such match in the default setup.
        Show
        Ross Gardler added a comment - Locationmap log provided by Greg A very quick glance shows that we are looking for a "lm:project.wholesite.fo" match - this will certainly be one of the problems as there is no such match in the default setup.
        Hide
        Greg Jenci added a comment -
        The original problem ("Access is Denied") is not confined to the wholesite.pdf. I also receive the error when using a locationmap to resolve external references and when I use a custom skin. To eliminate anything I did in my real site, I recreated the error using Forrest Seed by uncommenting the wholesite.pdf with the assumption that the root cause was the same.
        Show
        Greg Jenci added a comment - The original problem ("Access is Denied") is not confined to the wholesite.pdf. I also receive the error when using a locationmap to resolve external references and when I use a custom skin. To eliminate anything I did in my real site, I recreated the error using Forrest Seed by uncommenting the wholesite.pdf with the assumption that the root cause was the same.
        Hide
        Ross Gardler added a comment -
        The locationmap is still under development, the error message "access is denied" occurs when there is no match for a request via the locationmap. The root cause for the problem between wholesite.pdf and your own custom site is only the same in that there is no match in the locationmap.

        If you are having problems with the locationmap in a customised site then please discuss that issue specifically as it is probably not a problem with Forrest but with your customisations. Please fo that on the dev list.
        Show
        Ross Gardler added a comment - The locationmap is still under development, the error message "access is denied" occurs when there is no match for a request via the locationmap. The root cause for the problem between wholesite.pdf and your own custom site is only the same in that there is no match in the locationmap. If you are having problems with the locationmap in a customised site then please discuss that issue specifically as it is probably not a problem with Forrest but with your customisations. Please fo that on the dev list.
        Hide
        Thorsten Scherler added a comment -
        I just had a real quick look and found one problem in the core sitemap:

        <map:match pattern="**body-*.html">
                <map:generate src="cocoon:/{1}{2}.xml"/>
                <map:transform type="idgen"/>
                <map:transform type="xinclude"/>
                <map:serialize type="xml" />
                <map:transform type="linkrewriter" src="cocoon:/{1}linkmap-{2}.html"/>
                <map:transform src="{lm:transform.html.broken-links}" />
                
                <map:call resource="skinit">
                  <map:parameter name="type" value="transform.xdoc.html"/>
                  <map:parameter name="path" value="{1}{2}.html"/>
                  <map:parameter name="notoc" value="false"/>
                </map:call>
              </map:match>

        Will work but as soon you are doing
        <map:match pattern="**body-*.html">
                <map:generate src="cocoon:/{1}{2}.xml"/>
                <map:transform type="idgen"/>
                <map:transform type="xinclude"/>
                <map:transform type="linkrewriter" src="cocoon:/{1}linkmap-{2}.html"/>
                <map:serialize type="xml" />
                
                <map:transform src="{lm:transform.html.broken-links}" />
                
                <map:call resource="skinit">
                  <map:parameter name="type" value="transform.xdoc.html"/>
                  <map:parameter name="path" value="{1}{2}.html"/>
                  <map:parameter name="notoc" value="false"/>
                </map:call>
              </map:match>

        will fail.

        Meaning something wrong with
        <map:transform type="linkrewriter" src="cocoon:/{1}linkmap-{2}.html"/>


        When I reviewed the include I was surprised to find the linkmap in the aggregation.
        Show
        Thorsten Scherler added a comment - I just had a real quick look and found one problem in the core sitemap: <map:match pattern="**body-*.html">         <map:generate src="cocoon:/{1}{2}.xml"/>         <map:transform type="idgen"/>         <map:transform type="xinclude"/>         <map:serialize type="xml" />         <map:transform type="linkrewriter" src="cocoon:/{1}linkmap-{2}.html"/>         <map:transform src="{lm:transform.html.broken-links}" />                  <map:call resource="skinit">           <map:parameter name="type" value="transform.xdoc.html"/>           <map:parameter name="path" value="{1}{2}.html"/>           <map:parameter name="notoc" value="false"/>         </map:call>       </map:match> Will work but as soon you are doing <map:match pattern="**body-*.html">         <map:generate src="cocoon:/{1}{2}.xml"/>         <map:transform type="idgen"/>         <map:transform type="xinclude"/>         <map:transform type="linkrewriter" src="cocoon:/{1}linkmap-{2}.html"/>         <map:serialize type="xml" />                  <map:transform src="{lm:transform.html.broken-links}" />                  <map:call resource="skinit">           <map:parameter name="type" value="transform.xdoc.html"/>           <map:parameter name="path" value="{1}{2}.html"/>           <map:parameter name="notoc" value="false"/>         </map:call>       </map:match> will fail. Meaning something wrong with <map:transform type="linkrewriter" src="cocoon:/{1}linkmap-{2}.html"/> When I reviewed the include I was surprised to find the linkmap in the aggregation.
        Hide
        Thorsten Scherler added a comment -
        The problem was the order of calls. One have to place the more specific match expression before the general (catch all) ones. Otherwise the match will never called since processing ends before (see svn commit).
        Committed revision 614043.
        Show
        Thorsten Scherler added a comment - The problem was the order of calls. One have to place the more specific match expression before the general (catch all) ones. Otherwise the match will never called since processing ends before (see svn commit). Committed revision 614043.
        Hide
        Thorsten Scherler added a comment -
        You can fix 0.8 as follow:

        Index: locationmap-transforms.xml
        ===================================================================
        --- locationmap-transforms.xml (revision 556746)
        +++ locationmap-transforms.xml (working copy)
        @@ -104,12 +104,12 @@
         <!-- ================================== -->
         <!-- aggregate transforms -->
         <!-- ================================== -->
        + <match pattern="transform-aggregate.linkmap.relativized-linkmap">
        + <location src="{forrest:forrest.stylesheets}/aggregates/relativize-split-linkmap.xsl" />
        + </match>
             <match pattern="transform-aggregate.*.*">
               <location src="{forrest:forrest.stylesheets}/aggregates/{1}-to-{2}.xsl" />
             </match>
        - <match pattern="transform-aggregate.linkmap.relativized-linkmap">
        - <location src="{forrest:forrest.stylesheets}/aggregates/relativize-split-linkmap.xsl" />
        - </match>
             <match pattern="transform.old-skinconf.new-skinconf">
               <location src="{forrest:forrest.stylesheets}/upgrade-skinconf.xsl" />
             </match>
        Show
        Thorsten Scherler added a comment - You can fix 0.8 as follow: Index: locationmap-transforms.xml =================================================================== --- locationmap-transforms.xml (revision 556746) +++ locationmap-transforms.xml (working copy) @@ -104,12 +104,12 @@  <!-- ================================== -->  <!-- aggregate transforms -->  <!-- ================================== --> + <match pattern="transform-aggregate.linkmap.relativized-linkmap"> + <location src="{forrest:forrest.stylesheets}/aggregates/relativize-split-linkmap.xsl" /> + </match>      <match pattern="transform-aggregate.*.*">        <location src="{forrest:forrest.stylesheets}/aggregates/{1}-to-{2}.xsl" />      </match> - <match pattern="transform-aggregate.linkmap.relativized-linkmap"> - <location src="{forrest:forrest.stylesheets}/aggregates/relativize-split-linkmap.xsl" /> - </match>      <match pattern="transform.old-skinconf.new-skinconf">        <location src="{forrest:forrest.stylesheets}/upgrade-skinconf.xsl" />      </match>

          People

          • Assignee:
            Unassigned
            Reporter:
            Ross Gardler
          • Votes:
            1 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development