XML Import Failed Due to Missing Column for PAGETEMPLATES Table

Still need help?

The Atlassian Community is here for you.

Ask the community

Symptoms

The Confluence instance from which the XML backup was taken has been upgraded from a version of Confluence prior to 4.0. 


The following appears in the atlassian-confluence.log:

java.lang.RuntimeException: Error rendering template for decorator root
at com.atlassian.confluence.setup.velocity.ApplyDecoratorDirective.render(ApplyDecoratorDirective.java:186)
caused by: java.lang.RuntimeException: Error rendering template for decorator page
at com.atlassian.confluence.setup.velocity.ApplyDecoratorDirective.render(ApplyDecoratorDirective.java:186) "

Diagnosis

Run this query against the database of the source Confluence instance from which the backup was taken:

show columns from PAGETEMPLATES;

There is a LABELS column in the source/old confluence, but no LABELS column in the target/new Confluence's PAGETEMPLATES table:

Old/Source confluence's PAGETEMPLATES

TEMPLATEIDbigint(20)NOPRINULL
TEMPLATENAMEvarchar(255)NO
NULL
TEMPLATEDESCvarchar(255)YES
NULL
LABELSvarchar(255)YES
NULL
CONTENTmediumtextYES
NULL
SPACEIDbigint(20)YESMULNULL
PREVVERbigint(20)YESMULNULL
VERSIONint(11)NO
NULL
CREATORvarchar(255)YES
NULL
CREATIONDATEdatetimeYES
NULL
LASTMODIFIERvarchar(255)YES
NULL
LASTMODDATEdatetimeYES
NULL
BODYTYPEIDsmallint(6)YES
NULL

New/Target confluence's PAGETEMPLATES

TEMPLATEIDbigint(20)NOPRINULL
TEMPLATENAMEvarchar(255)NO
NULL
TEMPLATEDESCvarchar(255)YES
NULL
CONTENTmediumtextYES
NULL
SPACEIDbigint(20)YESMULNULL
PREVVERbigint(20)YESMULNULL
VERSIONint(11)NO
NULL
CREATORvarchar(255)YES
NULL
CREATIONDATEdatetimeYES
NULL
LASTMODIFIERvarchar(255)YES
NULL
LASTMODDATEdatetimeYES
NULL
BODYTYPEIDsmallint(6)YES
NULL

Cause

The LABELS column has been deprecated since Confluence 4.0.

Workaround

 Install a fresh, empty Confluence 3.5 with a new database, then upgrade Confluence to be the same version as your Source Confluence instance. This way the target database will contain the deprecated LABELS column in the PAGETEMPLATES table.

Notes

(info) Confluence does not support backward version compatibility. You cannot restore backups from a newer version to an older version or across major versions. For example, if you create a site backup in Confluence 2.4.3, it cannot be restored into a Confluence 2.2.2 site. It can however, be restored into 2.4.5 or 2.5.x, because 2.4.5 and 2.5.x are newer versions of Confluence. Importing an old XML backup file to a new major version (for example, Confluence 3.5 to Confluence 4.0) is not supported.

Last modified on May 13, 2025

Was this helpful?

Yes
No
Provide feedback about this article
Powered by Confluence and Scroll Viewport.