Confluence REST or Plugin Function Requests Returned 404 Not Found

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

Symptoms

  • There are few Confluence functions that are not working properly, such as Copy Page, Move Page

  • Dashboard isn't loaded properly. Popular tab will just stuck at Loading update stream...:

    (Auto-migrated image: description temporarily unavailable)
  • Each tab in the right hand side of the Dashboard shows the following error:

    (Auto-migrated image: description temporarily unavailable)

    Failed to retrieve updates

    Updates could not be retrieved at this time. Please try again later.

  • Checking in Chrome's developer tools or Firefox's firebug, will show a lot of 404 returned on REST or plugin requests:

    (Auto-migrated image: description temporarily unavailable)

    (Auto-migrated image: description temporarily unavailable)
    1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 AJS.Confluence: run binder components batch.js:6confluence-keyboard-shortcuts initialising batch.js:6 GET http://Confluence-URL/undefined/rest/prototype/1/i18n/com.atlassian.confluence.plugins.share-page 404 (Not Found) batch.js:4 Error loading I18n for com.atlassian.confluence.plugins.share-page:error batch.js:6 GET http://Confluence-URL/undefined/rest/popular/1/stream/content?days=7&pageSize=20 404 (Not Found) batch.js:4 POST http://Confluence-URL/undefined/rest/dashboardmacros/1.0/updates 404 (Not Found) batch.js:4 Failed to retrieve updates. Status: error, Error: Not Found batch.js:6 POST http://Confluence-URL/undefined/rest/dashboardmacros/1.0/updates 404 (Not Found) batch.js:4 Failed to retrieve updates. Status: error, Error: Not Found batch.js:6 POST http://Confluence-URL/undefined/rest/dashboardmacros/1.0/updates 404 (Not Found) batch.js:4 Failed to retrieve updates. Status: error, Error: Not Found batch.js:6 POST http://Confluence-URL/undefined/rest/dashboardmacros/1.0/updates 404 (Not Found) batch.js:4 Failed to retrieve updates. Status: error, Error: Not Found batch.js:6 GET http://Confluence-URL/display/ds/undefined/rest/prototype/1/i18n/com.atlassian.confluence.plugins.confluence-like 404 (Not Found) batch.js:4 Error loading I18n for com.atlassian.confluence.plugins.confluence-like:error batch.js:6 Uncaught Error: Error downloading translation files for likes plugin. batch.js:345 POST http://Confluence-URL/display/ds/undefined/plugins/editor-loader/editor.action 404 (Not Found) batch.js:4 EditorLoader: Error while loading the editor: Error loading the Editor template: 404 - Not Found batch.js:6 EditorLoader: all 'after load' callbacks have been called. batch.js:6 GET http://Confluence-URL/display/ds/undefined/plugins/macrobrowser/browse-macros.action 404 (Not Found) batch.js:4 Error requesting macro browser metadata: batch.js:6
  • As shown above, somehow, there is undefined appended in the resources (e.g. JavaScript, REST) URL being requested by Confluence, which explains the 404 returned.

  • There is nothing in the log.

  • Checking in System Information page which can be accessible through Confluence Admin > System Information, scroll down to 'Modification' table will show that header.vm is modified:

    (Auto-migrated image: description temporarily unavailable)
  • There is some other custom layout in place.

Cause

This is normally caused when <Confluence-install>/confluence/decorators/includes/header.vm is customised. Or there is an incompatible custom layout.

Resolution

Resolution 1

  1. Revert <Confluence-install>/confluence/decorators/includes/header.vm to its default. Or at least, make sure the following code is in place and not commented:

    header.vm of Confluence 4.3

    1 2 3 4 5 6 7 8 9 10 11 #putMetadata('context-path', $req.contextPath) #putMetadata('base-url', $globalSettings.baseUrl) #putMetadata('version-number', $generalUtil.versionNumber) #putMetadata('build-number', $generalUtil.buildNumber) #putMetadata('remote-user', $!action.remoteUser.name) #putMetadata('static-resource-url-prefix', $staticResourceUrlPrefix) #putMetadata('global-settings-attachment-max-size', $globalSettings.attachmentMaxSize) #putMetadata('user-locale', $action.locale) #putMetadata('enabled-dark-features', $darkFeatures.allEnabledFeaturesAsString) #putMetadata('atl-token', $xsrfTokenGenerator.generateToken($req)) #putMetadata('confluence-flavour', $confluenceFlavour)
  2. Restart Confluence, clear browser cache. If the problem still persists, please try backup any existing custom layout, then reset them and proceed to the next resolution.

Resolution 2

  1. Backup your Confluence database

  2. Run the following query in your Confluence database:

    1 SELECT * FROM DECORATOR;

    The result of this query displays all the custom layouts applied on your Confluence site. If this query returns one or more rows, please run this query to delete all of the custom layouts:

    1 DELETE FROM DECORATOR;
  3. Restart your Confluence and see if the issue persists

Updated on April 15, 2025

Still need help?

The Atlassian Community is here for you.