Unable to Set Homepage for a Space
Symptoms
- The option to choose homepage in
Browse >> Space Admin >> Edit Space Details
is not selectable. 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) ...
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 inBrowse >> Pages >> Tree View
.
Cause
See the following bug reports:
Resolution
Always backup your data before performing any modifications to the database.
Shutdown Confluence
Run the following SQL query to get a list of affected pages:
SELECT contentid FROM content WHERE title IS NULL AND contenttype='PAGE';
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');
- Restart Confluence
- Rebuild the index
Last modified on May 24, 2018
Powered by Confluence and Scroll Viewport.