-
Bug
-
Resolution: Fixed
-
Low
-
8.9.1, 8.9.3
-
5
-
Severity 3 - Minor
-
6
-
Issue Summary
Space exports as PDF fail (Normal Export or Custom Export) If the Code Block macro header contains [] or the Wiki Markup macro includes invalid hyperlinks:
Scenario 1
If the Code Block macro header contains [] like the examples below:
TEST [1]
TEST [export]
This is reproducible on Data Center: (yes)
Steps to Reproduce
- Create a new page.
- Add the Code Block Macro.
- Specify a header with [] like Test [export].
- Go to Space Tools>Exports>PDF.
- Choose either Normal Export or Custom Export by choosing only the newly created page that contains Code Block Macro.
- Click on Export.
Scenario 2
If the Wiki Markup macro is used and invalid hyperlinks are included within it:
Steps to Reproduce
- Create a new page.
- Add the Wiki Markup Macro.
- Put the invalid hyperlink content in it similar like this:
<ac:structured-macro ac:name="unmigrated-wiki-markup" ac:schema-version="1" ac:macro-id="c52f9a03-99fc-45aa-9414-f49dd8b9499c"> ... [*Test Link*|This is invalid link] ... </ac:structured-macro>
- Go to Space Tools>Exports>PDF.
- Choose either Normal Export or Custom Export by choosing only the newly created page that contains Wiki Markup Macro.
- Click on Export.
Expected Results
Space export as PDF should be successful.
Actual Results
The below exception is thrown in the atlassian-confluence.log file:
2024-07-09 08:28:08,558 ERROR [Long running task: PDF Space Export] [atlassian.renderer.v2.V2Renderer] render Unable to render content due to system error: Cannot invoke \"javax.servlet.http.HttpServletRequest.getSession()\" because \"request\" is null -- url: /confluence/spaces/flyingpdf/doflyingpdf.action | userName: admin | action: doflyingpdf | referer: https://linux-75238.prod.atl-cd.net/confluence/spaces/flyingpdf/flyingpdf.action?key=TEST | traceId: 4606c73a6e700c70 java.lang.NullPointerException: Cannot invoke "javax.servlet.http.HttpServletRequest.getSession()" because "request" is null at com.atlassian.xwork.SimpleXsrfTokenGenerator.getToken(SimpleXsrfTokenGenerator.java:20) at com.atlassian.confluence.links.linktypes.PageCreateLink.makeCreatePage(PageCreateLink.java:46) at com.atlassian.confluence.links.linktypes.PageCreateLink.<init>(PageCreateLink.java:30) at com.atlassian.confluence.links.ConfluenceLinkResolver.makeCreateLink(ConfluenceLinkResolver.java:308) at com.atlassian.confluence.links.ConfluenceLinkResolver.makePageLink(ConfluenceLinkResolver.java:251) at com.atlassian.confluence.links.ConfluenceLinkResolver.createLink(ConfluenceLinkResolver.java:179) at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ... at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:635) at java.base/java.lang.Thread.run(Thread.java:840) 2024-07-09 08:28:09,414 WARN [Long running task: PDF Space Export] [confluence.impl.hibernate.ConfluenceHibernateTransactionManager] doRollback Performing rollback. Transactions:\n ->[PluginReadWriteTx]: PROPAGATION_REQUIRED,ISOLATION_DEFAULT (Session #919557477) -- url: /confluence/spaces/flyingpdf/doflyingpdf.action | userName: admin | action: doflyingpdf | referer: https://linux-75238.prod.atl-cd.net/confluence/spaces/flyingpdf/flyingpdf.action?key=TEST | traceId: 4606c73a6e700c70
The below error is demonstrated in Confluence UI:
Transaction rolled back because it has been marked as rollback-only
Workaround
- If Code Block macro is used, then remove "[]" from the Code Block macro header and try to export the space once again.
- If Wiki Markup macro is used, then remove the hyperlinks or link to a valid page.
Note
The page export as PDF for the single page that contains the Code Block macro from the ...> Export to PDF menu works as expected.
Form Name |
---|
A fix for this issue is available in Confluence Server and Data Center 9.3.1. Upgrade now or check out the Release Notes to see what other issues are resolved.