Unable to Set Homepage for a Space
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
Summary
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:
1 2 3 4
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:
1 2 3
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:
CONFSERVER-17414 - Doc Import allows empty title (fixed in 3.3.1 and later)
Solution
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.
Shutdown Confluence
Run the following SQL query to get a list of affected pages:
1
SELECT contentid FROM content WHERE title IS NULL AND contenttype='PAGE';
Rename the affected pages:
1
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
Was this helpful?