{viewdoc} macro not loading images

Platform Notice: Data Center Only - This article only applies to Atlassian products on the Data Center platform.

Note that this KB was created for the Data Center version of the product. Data Center KBs for non-Data-Center-specific features may also work for Server versions of the product, however they have not been tested. Support for Server* products ended on February 15th 2024. If you are running a Server product, you can visit the Atlassian Server end of support announcement to review your migration options.

*Except Fisheye and Crucible

Summary

Preview for some attachment types are not loading (load as a corrupted image, with a white paper crossed in red).

Environment

Confluence 8.5.4

Diagnosis

There's a very distinct error log:

1 2 3 2024-01-25 15:16:26,187 WARN [http-nio-8090-exec-419 url: /conf/display/BB/2022+BSS+Business+Interactions+Report, /conf/pages/viewpage.action] [opensymphony.xwork2.ognl.SecurityMemberAccess] isAccessible Access to non-public [private java.lang.String com.atlassian.confluence.security.actions.NotPermittedAction.title] is blocked! -- url: /conf/display/BB/2022+BSS+Business+Interactions+Report | userName: anonymous | referer: https://statics.teams.cdn.office.net/ | traceId: fd22d5c312eee78d 2024-01-25 15:17:33,468 WARN [http-nio-8090-exec-404 url: /conf/pages/viewpage.action; user: <Retracted>] [xhtml.view.macro.ViewMacroMarshaller] handleMacroExecutionException Exception executing macro: viewdoc, with message: com.atlassian.confluence.macro.MacroExecutionException: com.atlassian.confluence.macro.MacroExecutionException: The viewfile macro is unable to locate the attachment \"<Retracted>.docx\" on this page

Cause

At the moment, the causes for this problem are not known. This document will be updated once those are located.

Solution

Disable and reenable the plugins responsible for the file preview.

  1. Go to Administration>Manage apps

  2. In the drop-down select "All apps"

  3. Check if the following plugins are enabled

    • Office Connector plugin

    • Confluence View File Macro

    • Confluence Document Conversion Library

  4. If they are all enabled, please disable and re-enable them

  5. Check if there was any change in the .docx file preview

Updated on February 26, 2025

Still need help?

The Atlassian Community is here for you.