Page Copy Operation Results in 'Cannot create new content property' Error
Platform Notice: Data Center - This article applies to Atlassian products on the Data Center platform.
Note that this knowledge base article was created for the Data Center version of the product. Data Center knowledge base articles 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
Problem
Users are experiencing an issue when attempting to copy a page or space. The process fails, and the following error message is recorded in the atlassian-confluence.log: 'Cannot create new content property.'
2024-03-15 13:06:38,528 ERROR [https-jsse-nio-8443-exec-30 url: /500page.jsp; user: znajmon] [atlassian.confluence.status.SystemErrorInformationLogger] logException Unhandled exception 181c8488-160b-4b27-8345-4d6997595b1a: Cannot create new content property: JsonContentProperty{id='null', key='comalaworkflowparameters', content=CollapsedReference{idProperties={id=ContentId{id=458555739}, status=draft, version=CollapsedReference{idProperties={number=1}, referentClass=class com.atlassian.confluence.api.model.content.Version}}, referentClass=class com.atlassian.confluence.api.model.content.Content}, version=null}
-- traceId: f028e6d6563b1617
com.atlassian.confluence.api.service.exceptions.ConflictException: Cannot create new content property: JsonContentProperty{id='null', key='comalaworkflowparameters', content=CollapsedReference{idProperties={id=ContentId{id=32232321}, status=draft, version=CollapsedReference{idProperties={number=1}, referentClass=class com.atlassian.confluence.api.model.content.Version}}, referentClass=class com.atlassian.confluence.api.model.content.Content}, version=null}: [SimpleMessage{key='jsonproperty.duplicate.key', args=[], translation='null'}]
at com.atlassian.confluence.api.model.validation.SimpleValidationResult.convertToServiceException(SimpleValidationResult.java:84)
at com.atlassian.confluence.api.model.validation.ValidationResult.throwIfNotSuccessful(ValidationResult.java:197)
at com.atlassian.confluence.plugins.contentproperty.ContentPropertyServiceImpl.create(ContentPropertyServiceImpl.java:63)
at com.atlassian.confluence.plugins.contentproperty.ContentPropertyServiceImpl.copyAllJsonContentProperties(ContentPropertyServiceImpl.java:105)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:77)
at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMetho
Environment
Confluence version - 8.5.7, 8.7.2
Comala Document Management - v7.2.1
Cause
The issue is caused by the Comala Document Management app. The vendor introduced a few changes in Comala Document Management V7.2.1, which are impacting copy operation.
Solution
The issue has now been fixed in the Comala Document Management(CDM) app Version 7.3.0. Customers are advised to upgrade to v7.3.0 or higher. However, if your existing pages have been affected by the issue and are giving the error mentioned above, you will have to follow the workaround for the impacted pages.
Workaround
- Disable the “Comala Document Management WorkflowParameters JCP Updater“ scheduled job (only if the CDM version is lower than 7.3.0 or the CDC and CDA versions are lower than 2.1.0). Skip this step if you are on CDM 7.3.0 and higher.
- Running the following SQL query will get you the IDs of all the affected pages by this problem (in the PAGEID column, but some might appear more than once):Postgres
SELECT * FROM content AS c JOIN bodycontent AS b ON c.contentid = b.contentid WHERE c.contenttype = 'CUSTOM' AND c.title = 'comalaworkflowparameters' and c.pageid in ( SELECT c.pageid FROM content AS c JOIN bodycontent AS b ON c.contentid = b.contentid WHERE c.contenttype = 'CUSTOM' AND c.title = 'comalaworkflowparameters' GROUP BY c.pageid HAVING COUNT(*) > 1 )
- For each of the different page ids retrieved from the SQL before you must execute the following 2 curl commands (or call to that REST endpoint using another method) taking into account they have to replace the following elements:
- USER → user name to login and perform the action
- PASSWORD → user password to login and perform the action
- CONFLUENCE_HOST → the hostname of your Confluence instance
PAGE_ID → the page id where to perform the action
curlCommandcurl -i -u USER:PASSWORD -X DELETE "http://CONFLUENCE_HOST/rest/api/content/PAGE_ID/property/comalaworkflowparameters" curl -i -u USER:PASSWORD -X DELETE "http://CONFLUENCE_HOST/rest/api/content/PAGE_ID/property/comalaworkflowsworkflowparameterscurrentmodelversion"