NullPointerException when Editing Page Restrictions
Symptoms
While saving a page after editing its page restrictions, the following error message appears:
java.lang.NullPointerException
at com.atlassian.confluence.pages.actions.EditPageAction.pageAlreadyExists(EditPageAction.java:268)
at com.atlassian.confluence.pages.actions.EditPageAction.validate(EditPageAction.java:53)
at com.opensymphony.xwork.interceptor.DefaultWorkflowInterceptor.intercept(DefaultWorkflowInterceptor.java:44)
at com.atlassian.confluence.core.ConfluenceWorkflowInterceptor.intercept(ConfluenceWorkflowInterceptor.java:35)
at com.opensymphony.xwork.DefaultActionInvocation.invoke(DefaultActionInvocation.java:165)
The page has no title and it appears as null in the breadcrumb.
Also, while browsing the space's pages in Page Tree mode, page tree does not stop from loading.
Cause
There are some pages with a NULL title in the space. These pages may have been added to Confluence via external tools, corrupted backup or due to this Office Connector bug. The following query should return at least one row:
SELECT contentid, title FROM content WHERE title IS NULL AND contenttype = 'PAGE';
Resolution
- Set a unique title for the affected pages. Run the following query on each of them:
UPDATE content SET title = '<a_unique_title>' WHERE contentid = <contentid>;
- Rebuild the content indices and the ancestors table.