Uploaded image for project: 'Cocoon'
  1. Cocoon
  2. COCOON-1542

File generator resolves to root context with empty src attribute

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 2.2
    • Fix Version/s: None
    • Component/s: * Cocoon Core
    • Labels:
      None
    • Environment:
      Operating System: All
      Platform: PC
    • Bugzilla Id:
      35526

      Description

      When passing an empty string/null value to a file generator's "src"
      attribute, it seems to resolve to the root context (sitemap
      directory).

      For example,
      <map:match pattern="**tab-*.html">
       <map:select type="exists">
         <map:when test="{project:content.xdocs}tabs.xml">
              <map:generate src="{project:content.xdocs}tabs.xml"/>
         </map:when>
         <map:otherwise>
            <map:generate src="{lm:tabs.xml}"/>
         </map:otherwise>
       </map:select>
      ...

      In the above snippet, {lm:tabs.xml} returns null but the generator
      resolves to (on my box) "C:\src\apache-forrest-lm\main\webapp" which
      throws an Access Denied exception. What I would have expected is a
      SourceNotFoundException because, after all, an empty source couldn't
      be found.

      Discussion was here:
      http://marc.theaimsgroup.com/?t=111996379000002&r=1&w=2

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                Unassigned
                Reporter:
                williamstw Tim Williams
              • Votes:
                0 Vote for this issue
                Watchers:
                1 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: