Uploaded image for project: 'XWiki Platform'
  1. XWiki Platform
  2. XWIKI-13332

Automatic redirect not working for 'download' action

    XMLWordPrintable

Details

    • Bug
    • Resolution: Fixed
    • Major
    • 7.4.3, 8.1-milestone-2
    • 7.4.2
    • Old Core
    • None
    • Unknown
    • N/A
    • N/A

    Description

      • Display attachments from a particular page. For example the HTML code is like this
        <img alt="XWiki.org" class="icon" src="/xwiki/bin/download/XWiki/XWikiOrg/org.png">
        
      • Now add a redirect XWiki.RedirectClass object from XWiki.XWikiOrg to NewPage1.NewPage2.WebHome
      • The image will be broken with this message
        xwiki/bin/download/NewPage1/NewPage2/WebHome 404 (Not Found)

      The problem is that the 'download' action doesn't construct correctly the URL, the last part (attachment name 'org.png') is not added in order to resolve.

      Another example:

      <img src="/xwiki/bin/download/XWiki/XWikiOrg/org.png?width=120" width="120" alt="XWiki.org">
      

      will transform in

      /xwiki/bin/download/NewPage1/NewPage2/WebHome?width=120
      

      Attachments

        Activity

          People

            gdelhumeau Guillaume Delhumeau
            evalica Ecaterina Moraru (Valica)
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: