Uploaded image for project: 'Confluence Data Center'
  1. Confluence Data Center
  2. CONFSERVER-53118

Confluence fails exporting page to Word when the page links an image with "resources" in the URL path

    XMLWordPrintable

Details

    • Bug
    • Resolution: Unresolved
    • Low
    • None
    • 5.10.1, 5.10.8, 6.0.4, 6.3.2, 8.5.3, 8.5.7
    • Page - Export / Import
    • None

    Description

      Summary

      If a Confluence page includes an image via URL, and the URL has the following text pattern in the path: resources/<sub-directories>/<image>, the "Export to Word" functionality breaks.

      Steps to Reproduce

      1. Insert an image on a Confluence page using a URL that has the image stored in a sub-directory of a directory called "resources".
        Examples:
        • <domain-name>/resources/images/image.jpg
        • <domain-name>/stuff/resources/images/jpegs/image.jpg
      2. Save page
      3. Click > Export to word

      Expected Results

      A prompt to save the word export file appears.

      Actual Results

      An immediate null response is returned from <confluence-base-url>/exportword.

      Chrome:

      Firefox:

      Two errors are shown in atlassian-confluence.log:

      2017-07-20 10:23:51,931 ERROR [http-nio-443-exec-8] [ContainerBase.[Standalone].[localhost].[/]] log Unhandled exception occurred whilst decorating page
       -- url: /exportword | traceId: 0fe81678df6ea33f | userName: jdoe
      java.lang.NullPointerException
      ...
      2017-07-20 10:23:51,933 ERROR [http-nio-443-exec-8] [[Standalone].[localhost].[/].[exportword]] log Servlet.service() for servlet [exportword] in context with path [] threw exception
      java.lang.NullPointerException
      

      Notes

      • Export to pdf completes, but the image will not appear in the exported pdf.
      • Issue does not occur if image is directly in the "resources" folder in the URL path (<domain-name>/resources/image.jpg)
      • Last working in 5.9.14

      Workaround

      Escape the forward slash directly after "resources" with a backslash:

      • <domain-name>/resources\/images/image.jpg
      • <domain-name>/stuff/resources\/images/jpegs/image.jpg

      NOTE: This workaround does not work if there is more than one "resources" directory in the URL path.

      Attachments

        1. chrome_error.png
          chrome_error.png
          80 kB
        2. firefox_error.png
          firefox_error.png
          90 kB

        Issue Links

          Activity

            People

              Unassigned Unassigned
              zlaughton Zak Laughton
              Votes:
              15 Vote for this issue
              Watchers:
              10 Start watching this issue

              Dates

                Created:
                Updated: