projectdoc Toolbox

Instead of creating a new document instance for a doctype, the template button macro only logs an error to the browser's console.

Description

When all of the sudden a document can no longer be created using the Create from Template Macro, then the reason may be an invalid projectdoc Doctype Cache. The page wizard can still be opened, but when the user clicks on Create, nothing happens in the user interface.

If your console log shows

404: Unknown doctype 'abc'.

Where abc is the identifier of a valid doctype, then the following procedure may resolve your issue.

Also in the client log there probably is the reference of the service

/rest/projectdoc-internal/1/blueprint/SPACEKEY/DOCTYPE_ID/metadata

with which the browser request metadata for the doctype.

Solution

The projectdoc Doctype Cache may be in an invalid state.

If the cache insists that there is no blueprint for a given ID of an existing doctype, then the cache probably did not have access to that information at the first time a client sent a request. To save resources, this cache miss has been recorded and no second try will be made, unless new doctypes are installed (or similar events).

To put the cache back into a valid state, it needs to be refreshed or cleared.

The projectdoc Doctype Cache can be found in the Confluence Administration on the Cache Statistics page. This page is only accessible with admin privileges.

To resolve this issue you would either need to refresh the doctype cache or simply flush/clear the cache.

Option 1: Refresh the doctype cache

To refresh the doctype cache select "Refresh Doctype Cache" from the page menu.

If the action is not part of the menu, follow the instructions on Cache Refresh Actions (administration privileges required).

Option 2: Flush/Clear the cache

Go to the Cache Statistics page (administration privileges required) and click on Flush for the projectdoc Doctype Cache.

The cache is reinitialized on the next access.