Unable to Set Homepage for a Space

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

Note that this knowledge base article was created for the Data Center version of the product. Data Center knowledge base articles 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

  1. The option to choose homepage in Browse >> Space Admin >> Edit Space Details is not selectable.
  2. Attempting to edit or remove this page causes the following error:

    java.lang.NullPointerException
    at com.atlassian.confluence.pages.actions.AbstractCreateAndEditPageAction.setTitle
    (AbstractCreateAndEditPageAction.java:311) 
    ...
    
  3. An attempt to add the title and save the page results in the following error:

    java.lang.NullPointerException
    at com.atlassian.confluence.pages.actions.EditPageAction.validate(EditPageAction.java:41)
    ...
    

Diagnosis

  • The "Home" page is an orphaned page in space.
  • There is also an additional orphaned page titled $webwork.htmlEncode($content.displayTitle). This can be observed in Browse >> Pages >> Tree View.

Cause

See the following bug reports:

Resolution

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

  1. Shutdown Confluence

  2. Run the following SQL query to get a list of affected pages:

    SELECT contentid FROM content WHERE title IS NULL AND contenttype='PAGE';
  3. Rename the affected pages:

    UPDATE content SET title='Your Title', lowertitle='your title' WHERE contentid in (SELECT contentid FROM content WHERE title IS NULL AND contenttype='PAGE');
  4. Restart Confluence
  5. Rebuild the index

Last modified on Feb 19, 2025

Was this helpful?

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