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

Automatic redirect not working for 'download' action

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 7.4.2
    • Fix Version/s: 7.4.3, 8.1-milestone-2
    • Component/s: Old Core
    • Labels:
      None
    • Difficulty:
      Unknown
    • Documentation:
      N/A
    • Documentation in Release Notes:
      N/A
    • Similar issues:

      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

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

              Dates

              Created:
              Updated:
              Resolved:
              Date of First Response: