Recently Updated Dashboard macro not rendered in Word Export

XMLWordPrintable

    • 1
    • Severity 3 - Minor

      Issue Summary

      The Recently Updated Dashboard macro is not rendered in the exported Word document, whereas it is rendered in the PDF Export.

      This is reproducible on Data Center: (yes) / (no): Yes

      Steps to Reproduce

      • Add a Recently Updated Dashboard macro in the Confluence Page.
      • Export the page containing Recently Updated Dashboard macro to Word.
      • The Word Export does not include details for the Recently Updated Dashboard macro, but instead, it contains the following error.
      Error rendering macro: 'recently-updated-dashboard'
      
      Cannot invoke "javax.servlet.http.HttpServletRequest.getSession()" because the return value of "com.atlassian.core.filters.ServletContextThreadLocal.getRequest()" is null
      

      Expected Results

      The Word Export should contain the details for the Recently Updated Dashboard macro in the Export file.

      Actual Results

      The Work Export contains the below error for the Recently Updated Dashboard macro in the Exported file :

      Error rendering macro: 'recently-updated-dashboard'
      
      Cannot invoke "javax.servlet.http.HttpServletRequest.getSession()" because the return value of "com.atlassian.core.filters.ServletContextThreadLocal.getRequest()" is null
      
      

      Also, the below error is observed in the application logs :

      2024-05-09 04:58:02,482 ERROR [http-nio-8090-exec-44 url: /confluence/exportword; user: admin] [xhtml.view.macro.ViewMacroMarshaller] handleMacroExecutionException Error rendering macro: recently-updated-dashboard
       -- url: /confluence/exportword | userName: admin | referer: https://*******/confluence/display/TES/TestPage | traceId: bfaf3cd064d8969b
      java.lang.NullPointerException: Cannot invoke "javax.servlet.http.HttpServletRequest.getSession()" because the return value of "com.atlassian.core.filters.ServletContextThreadLocal.getRequest()" is null
          at com.atlassian.confluence.user.UserInterfaceState.getFromSession(UserInterfaceState.java:165)
          at com.atlassian.confluence.user.UserInterfaceState.getIntegerFromSessionOrUserPrefs(UserInterfaceState.java:132)
          at com.atlassian.confluence.user.UserInterfaceState.getRecentChangesSize(UserInterfaceState.java:98)
          at com.atlassian.confluence.user.UserInterfaceState.getMaxRecentChangesSize(UserInterfaceState.java:184)
          at com.atlassian.confluence.plugins.macros.dashboard.recentupdates.RecentlyUpdatedContentService.getPreferredMaxResults(RecentlyUpdatedContentService.java:146)
          at com.atlassian.confluence.plugins.macros.dashboard.recentupdates.RecentlyUpdatedContentMacro.parseMaxResults(RecentlyUpdatedContentMacro.java:183)
          at com.atlassian.confluence.plugins.macros.dashboard.recentupdates.RecentlyUpdatedContentMacro.execute(RecentlyUpdatedContentMacro.java:89)
          at com.atlassian.renderer.v2.macro.ResourceAwareMacroDecorator.execute(ResourceAwareMacroDecorator.java:51)
          at com.atlassian.confluence.macro.V2CompatibilityMacro.execute(V2CompatibilityMacro.java:35)
          at com.atlassian.confluence.macro.LazyLoadingMacroWrapper.execute(LazyLoadingMacroWrapper.java:24)
          at com.atlassian.confluence.content.render.xhtml.view.macro.ViewMacroMarshaller.executeMacro(ViewMacroMarshaller.java:239)
          at com.atlassian.confluence.content.render.xhtml.view.macro.ViewMacroMarshaller.marshalInternal(ViewMacroMarshaller.java:158)
          at com.atlassian.confluence.content.render.xhtml.view.macro.ViewMacroMarshaller.lambda$marshal$0(ViewMacroMarshaller.java:115)
          at com.atlassian.confluence.impl.content.render.xhtml.analytics.MetricsCollectingMarshaller.marshal(MetricsCollectingMarshaller.java:49)
          at com.atlassian.confluence.content.render.xhtml.view.macro.ViewMacroMarshaller.marshal(ViewMacroMarshaller.java:119)
          at com.atlassian.confluence.content.render.xhtml.view.macro.ViewMacroMarshaller.marshal(ViewMacroMarshaller.java:51)
          at com.atlassian.confluence.content.render.xhtml.UnmarshalMarshalFragmentTransformer.transform(UnmarshalMarshalFragmentTransformer.java:29)
          at com.atlassian.confluence.content.render.xhtml.transformers.DefaultFragmentTransformer.transformFragment(DefaultFragmentTransformer.java:141)
          at com.atlassian.confluence.content.render.xhtml.transformers.DefaultFragmentTransformer.transform(DefaultFragmentTransformer.java:123)
          at com.atlassian.confluence.content.render.xhtml.storage.StorageXhtmlTransformer.transform(StorageXhtmlTransformer.java:41)
          at com.atlassian.confluence.content.render.xhtml.TransformerChain.transform(TransformerChain.java:38)
          at com.atlassian.confluence.content.render.xhtml.TransformerChain.transform(TransformerChain.java:38)
          at com.atlassian.confluence.content.render.xhtml.PluggableTransformerChain.transform(PluggableTransformerChain.java:42)
          .
          .
      
      

      Complete logs attached in the file.

      Workaround

      The Recently Updated Dashboard macro renders correctly in the PDF Export which can be used as a possible workaround for this.

        1. Error_in_logs
          37 kB
        2. Word_Export.png
          Word_Export.png
          84 kB

            Assignee:
            Unassigned
            Reporter:
            Nitin Rastogi
            Votes:
            2 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated: