Scaffolding REST API to a Live Template returns 500 error
Summary
When executing a Scaffolding REST API (code below) onto a page that uses a Live Template, it returns a 500 Error instead of the JSON results.
{CONFLUENCE-BASE-URL}/rest/scaffolding/1.0/api/form/meta/{pageid}
Error message:
<status-code>500</status-code> <stack-trace> java.lang.NullPointerException
at net.customware.confluence.plugin.scaffolding.api.ScaffoldApiServiceImpl.getFormStructure(ScaffoldApiServiceImpl.java:110)
at net.customware.confluence.plugin.scaffolding.api.ScaffoldApiServiceImpl.recursiveBuildForm(ScaffoldApiServiceImpl.java:265)
at net.customware.confluence.plugin.scaffolding.api.ScaffoldApiServiceImpl.getFormStructure(ScaffoldApiServiceImpl.java:114)
at net.customware.confluence.plugin.scaffolding.api.ScaffoldFormServiceImpl.getFormData(ScaffoldFormServiceImpl.java:45)
at net.customware.confluence.plugin.scaffolding.api.ScaffoldApiResource.getForm(ScaffoldApiResource.java:75)
Environment
Confluence Server/Data Center
Scaffolding version 8.20.7
Diagnostics Steps
N/A
Cause
The issue is caused by a 'colon' (':') in the template title. The bug has been reportedly fixed in the newer releases.
Workaround
Remove the colon from the template title. For example, change "template:1" to "template 1".
Resolution
Update Scaffolding to the latest version or at least the version 8.23.1 where the bug has been fixed