Creating new page or space loads forever
Platform notice: Server and Data Center only. This article only applies to Atlassian products on the Server and Data Center platforms.
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
Problem
When clicking on the Create Space, Create Page, or Create ... links, a pop up window displays with a loading icon that continuously spins. Alternatively, if creating a Software Project Space from a template, the following message is thrown: We can't create that blueprint right now. A space already exists with key...
Diagnosis
There are a few steps that can be taken to diagnose this issue.
HTTP 500 Errors
First, while reproducing the problem, check what requests and responses are being exchanged between the browser and server by recording a HAR file. When examining the HAR file or the network tab within the browser's developer tools, you may see an HTTP 500 error for requests like the following:
https://<wiki-base-url>/rest/create-dialog/1.0/spaces?promotedSpacesLimit=10&otherSpacesLimit=1000
or
https://<wiki-base-url>/rest/create-dialog/1.0/space-blueprint/dialog/web-items
For HTTP 500 on https://<wiki-base-url>/rest/create-dialog/1.0/spaces?promotedSpacesLimit=10&otherSpacesLimit=1000:
If the HTTP 500 error is occurring for the first URL, then verify if any spaces are missing either space name or space key values. This can be done using a query like the following:
SELECT * FROM SPACES WHERE SPACEKEY IS NULL OR SPACENAME IS NULL;
Depending on if and what kind of results return, we can then update the appropriate missing value.
For HTTP 500 on https://<wiki-base-url>/rest/create-dialog/1.0/space-blueprint/dialog/web-items:
In this URL results in an HTTP 500 error, an entry like the following will appear in the application logs near the time when the HAR is recorded:
2018-10-24 10:26:12,392 WARN [https-jsse-nio-8443-exec-10] [confluence.impl.hibernate.ConfluenceHibernateTransactionManager] doRollback Performing rollback. Transactions:
->[PluginReadWriteTx]: PROPAGATION_REQUIRED,ISOLATION_DEFAULT (Session #322332976)
– referer: https://<wiki-hostname>/spacedirectory/view.action | url: /rest/create-dialog/1.0/space-blueprint/dialog/web-items | traceId: 3504893171073da4 | userName: testuser
Furthermore, if database debugging is enabled, then the following will appear:
< 2015-04-29 12:03:09.099 EDT >ERROR: relation "AO_54C900_CONTENT_BLUEPRINT_AO_ID_seq" does not exist at character 16
< 2015-04-29 12:03:09.099 EDT >STATEMENT: SELECT NEXTVAL('"AO_54C900_CONTENT_BLUEPRINT_AO_ID_seq"')
< 2015-04-29 12:03:09.105 EDT >ERROR: current transaction is aborted, commands ignored until end of transaction block
< 2015-04-29 12:03:09.105 EDT >STATEMENT: SELECT NULL AS TABLE_CAT, n.nspname AS TABLE_SCHEM, c.relname AS TABLE_NAME, CASE n.nspname ~ '^pg_' OR n.nspname = 'information_schema' WHEN true THEN CASE WHEN n.nspname = 'pg_catalog' OR n.nspname = 'information_schema' THEN CASE c.relkind WHEN 'r' THEN 'SYSTEM TABLE' WHEN 'v' THEN 'SYSTEM VIEW' WHEN 'i' THEN 'SYSTEM INDEX' ELSE NULL END WHEN n.nspname = 'pg_toast' THEN CASE c.relkind WHEN 'r' THEN 'SYSTEM TOAST TABLE' WHEN 'i' THEN 'SYSTEM TOAST INDEX' ELSE NULL END ELSE CASE c.relkind WHEN 'r' THEN 'TEMPORARY TABLE' WHEN 'i' THEN 'TEMPORARY INDEX' WHEN 'S' THEN 'TEMPORARY SEQUENCE' WHEN 'v' THEN 'TEMPORARY VIEW' ELSE NULL END END WHEN false THEN CASE c.relkind WHEN 'r' THEN 'TABLE' WHEN 'i' THEN 'INDEX' WHEN 'S' THEN 'SEQUENCE' WHEN 'v' THEN 'VIEW' WHEN 'c' THEN 'TYPE' WHEN 'f' THEN 'FOREIGN TABLE' ELSE NULL END ELSE NULL END AS TABLE_TYPE, d.description AS REMARKS FROM pg_catalog.pg_namespace n, pg_catalog.pg_class c LEFT JOIN pg_catalog.pg_description d ON (c.oid = d.objoid AND d.objsubid = 0) LEFT JOIN pg_catalog.pg_class dc ON (d.classoid=dc.oid AND dc.relname='pg_class') LEFT JOIN pg_catalog.pg_namespace dn ON (dn.oid=dc.relnamespace AND dn.nspname='pg_catalog') WHERE c.relnamespace = n.oid AND c.relname LIKE 'PROBABLYNOT' AND (false OR ( c.relkind = 'r' AND n.nspname !~ '^pg_' AND n.nspname <> 'information_schema' ) ) ORDER BY TABLE_TYPE,TABLE_SCHEM,TABLE_NAME
This means that Confluence cannot find a relation between the table and its foreign key.
NullPointerException in Logs
If a NullPointerException message like the following is noticed in the application logs:
2020-11-06 20:36:21,853 ERROR [http-nio-8090-exec-9] [plugins.createcontent.exceptions.RestExceptionMapper] toResponse
-- referer: https://mycompany.com | url: /rest/create-dialog/1.0/spaces | traceId: b147f4867b70831f | userName: josie
java.lang.NullPointerException
at com.atlassian.confluence.plugins.createcontent.impl.DefaultSpaceCollectionService.lambda$getOtherSpaces$0(DefaultSpaceCollectionService.java:116)
at java.util.TimSort.binarySort(TimSort.java:296)
at java.util.TimSort.sort(TimSort.java:239)
at java.util.Arrays.sort(Arrays.java:1512)
at java.util.ArrayList.sort(ArrayList.java:1462)
at com.atlassian.confluence.plugins.createcontent.impl.DefaultSpaceCollectionService.getOtherSpaces(DefaultSpaceCollectionService.java:116)
at com.atlassian.confluence.plugins.createcontent.impl.DefaultSpaceCollectionService.getSpaces(DefaultSpaceCollectionService.java:75)
at com.atlassian.confluence.plugins.createcontent.rest.SpaceResource.getSpaces(SpaceResource.java:68)
Then, like the HTTP 500 above, we'll want to verify if any spaces are missing either space name or space key values. This can be done using a query like the following:
SELECT * FROM SPACES WHERE SPACEKEY IS NULL OR SPACENAME IS NULL;
Depending on if and what kind of results return, we can then update the appropriate missing value.
XhtmlException
This exception typically occurs while trying to create a Software Project Space from a template. Within the application logs, a message like the following will be present:
2021-07-06 19:52:19,347 WARN [http-nio-8090-exec-32 url: /rest/create-dialog/1.0/space-blueprint/create-space; user: spiderman@marvel.com] [confluence.plugins.macro.DrawioMacroUtil] updateMacroRevision There was an error updating draw.io diagram revision:
-- referer: https://my.marvel.com/ | url: /rest/create-dialog/1.0/space-blueprint/create-space | traceId: 12df38cc4f6f625f | userName: spiderman@marvel.com
com.atlassian.confluence.content.render.xhtml.XhtmlException: RuntimeException occurred while performing an XHTML storage transformation (null)
at com.atlassian.confluence.content.render.xhtml.storage.StorageXhtmlTransformer.transform(StorageXhtmlTransformer.java:53)
at com.atlassian.confluence.impl.content.render.xhtml.MacroDefinitionTransformerImpl.updateMacroDefinitions(MacroDefinitionTransformerImpl.java:31)
at com.atlassian.confluence.content.render.xhtml.DefaultXhtmlContent.updateMacroDefinitions(DefaultXhtmlContent.java:156)
Note the involvement of the Draw.io plugin which is trying to update a diagram revision value, but encountering a null value.
Incorrect Installation Date
And finally, check if the Confluence installation date value is set to null or references a WST timezone. This can be done by checking for the following line entry during startup within the Confluence application logs:
installationDate = null
Or, running the following query and inspecting the results to see if a value is returned and, if so, if WST is referenced:
SELECT * FROM BANDANA WHERE BANDANAKEY LIKE 'confluence.server.installation.date';
Other Symptoms
If a HAR file is recorded while reproducing the issue, you notice that the following URL results in a HTTP 504 Gateway timeout response:
https://myconfluence.com/rest/create-dialog/1.0/space-blueprint/create-space
Also, it's observed that the space key was used in creating the space is present within the SPACES table.
Causes
The cause of these issues can be multifold:
- If a space is missing a name or space key, it could be that a space import failed and didn't properly update the space's meta data in the SPACES table.
- In the case where an HTTP 500 error was received for the https://<wiki-base-url>/rest/create-dialog/1.0/space-blueprint/dialog/web-items request, this has been found to be caused by bug CONFSERVER-57943 - Getting issue details... STATUS . Fortunately, this has already been fixed in Confluence versions 6.15.3, 6.13.5, 6.15.4 or later.
- For the XhtmlException error, the cause is currently unknown.
- For the timezone issue, WST is no longer a valid option.
- If a HTTP 504 response code is received and the space key being created is present in the SPACES table, then it's most likely that the proxy fronting the Confluence instance has too short of a timeout configuration.
Solutions
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.
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.
For HTTP 500 on https://<wiki-base-url>/rest/create-dialog/1.0/spaces?promotedSpacesLimit=10&otherSpacesLimit=1000:
If records are returned from the above query and the space name value is empty, then we can manually populate the value:
- Stop Confluence.
Execute the following query against the Confluence database:
UPDATE SPACES SET SPACENAME ='<SPACE_NAME>' WHERE SPACEID = XXXXXX;
where
XXXXXX
is theSPACEID
from the results returned in the diagnostic query and the <SPACE_NAME>
is the appropriate space name.Start Confluence.
- Rebuild the search index.
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.
If records are returned with a blank space key, then it would be best to open a Support ticket to determine the best way forward.
For HTTP 500 on https://<wiki-base-url>/rest/create-dialog/1.0/space-blueprint/dialog/web-items:
While the first recommendation would be to upgrade to a fixed version of Confluence, the following steps can be used a workaround:
- Stop Confluence
Drop the following tables:
DROP TABLE AO_54C900_SPACE_BLUEPRINT_AO; DROP TABLE AO_54C900_C_TEMPLATE_REF; DROP TABLE AO_54C900_CONTENT_BLUEPRINT_AO;
If using PostgreSQL database, the table names need to be in between quotation marks
DROP TABLE "AO_54C900_SPACE_BLUEPRINT_AO"; DROP TABLE "AO_54C900_C_TEMPLATE_REF"; DROP TABLE "AO_54C900_CONTENT_BLUEPRINT_AO";
If using Oracle database, we also need to drop the sequences after dropping the tables:
drop sequence AO_54C900_SPACE_BLU760748750; drop sequence AO_54C900_C_TEMPLAT776456439; drop sequence AO_54C900_CONTENT_B2086059265;
Remove the following directories to clear the plugin cache
<confluence-home>/bundled-plugins <confluence-home>/plugins-cache <confluence-home>/plugins-osgi-cache <confluence-home>/plugins-temp <confluence-home>/bundled-plugins_language
- Start Confluence
- Make sure you have a backup from your database first.
- The changes below will delete space and page templates and blueprints so make sure to take a backup of them first.
NullPointerException in Logs
If records are returned from the above query and the space name value is empty, then we can manually populate the value:
- Stop Confluence.
Execute the following query against the Confluence database:
UPDATE SPACES SET SPACENAME ='SPACE_NAME' WHERE SPACEID = XXXXXX;
where
XXXXXX
is theSPACEID
from the results returned in the diagnostic query and theSPACE_NAME
is the desired space name.Start Confluence.
- Rebuild the search index.
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.
If records are returned with a blank space key, then it would be best to open a Support ticket to determine the best way forward.
XhtmlException
To address with this issue, rebuild the indexes from scratch using our Server instructions or Data Center instructions depending on what kind of Confluence instance is installed.
Incorrect Installation Date
For this issue, please see the solution outlined in Create Page/Space Loads Forever Due To WST Timezone Set In Server Installation Date.
Proxy Timeout Configuration
Work with the proxy admin to determine the setting in question and increase the duration.