Error 'argument content is null' when saving a page
Platform notice: Server and Data Center only. This article only applies to Atlassian products on the Server and Data Center platforms.
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
While saving a page that uses special third-party plugin functionality, the below error can pop up:
Environment
Confluence + affected third-party plugin(s)
Diagnosis
The following ERROR appears in the <confluence-home>/atlassian-confluence.log
:
20XX-XX-XX XX:XX:XX,XXX ERROR [http-nio-8080-exec-20 url: /pages/doeditscaffold.action; user: admin] [plugin.scaffolding.action.EditScaffoldContentAction] handleException Error editing Scaffolding content.
-- page: 654971698 | referer: <baseURL>/pages/editscaffold.action?pageId=XXX | traceId: XXX | userName: admin | action: doeditscaffold | url: /pages/doeditscaffold.action
java.lang.IllegalArgumentException: argument "content" is null
Cause
The root cause of this error is well explained in the following bug report:
- CONFSERVER-92486 - Getting issue details... STATUS
Solution
As the bug mentioned, with Confluence LTS 8.5.5, 8.7.2, and higher versions, we increased the default value for the limit to 100kb for the authenticated users. If the issue is still observable with these versions, you can use the new system property, multipart.authenticated.max.param.length, that is introduced with these versions.
In the example below, the limit is increased to 150kb - we cannot suggest a specific value as this is totally based on the data size you are using in this third-party plugin functionality and should be assessed case by case.
-Dmultipart.authenticated.max.param.length=150000
Please check the Configuring System Properties to see how to set this accordingly based on your OS and your startup type.
Caution
We highly discourage using the below workaround as this changes the global limit (includes unauthenticated users) and will heighten the risk of DDoS attacks. If you have previously applied this workaround, please remove it as soon as practical.
Set struts.multipart.maxStringLength in confluence.cfg.xml to a desired value. Do this by adding the following line within the properties element:
<property name="struts.multipart.maxStringLength">10000</property>