NullPointerException when Editing Page Restrictions

Platform Notice: Data Center Only - This article only applies to Atlassian products on the Data Center platform.

Note that this KB was created for the Data Center version of the product. Data Center KBs 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

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, the page tree does not stop 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: CONFSERVER-17414 - Doc Import allows empty title . The following query should return at least one row:

SELECT contentid, title FROM content WHERE title IS NULL AND contenttype = 'PAGE';

Resolution

Always back up your data before making any database modifications. If possible, test any alter, insert, update, or delete SQL commands on a staging server first.

  1. 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>;

    ℹ️ <contentid> is the contentid value returned in the select query. Make sure to specify a title not already in use for <a_unique_title>.

  2. Rebuild the content indices and the ancestors table.

Updated on May 22, 2025

Still need help?

The Atlassian Community is here for you.