Unable to Set Homepage for a Space

Still need help?

The Atlassian Community is here for you.

Ask the community

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 backup your data before performing any modifications to the database.

  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 May 24, 2018

Was this helpful?

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