diff --git a/.circleci/config.yml b/.circleci/config.yml index 0316a9e902..b0d11f17dc 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -108,7 +108,7 @@ jobs: - run: curl -o- https://raw.githubusercontent.com/creationix/nvm/v0.34.0/install.sh | bash - run: chmod +x ~/.nvm/nvm.sh - run: - no_output_timeout: 20m + no_output_timeout: 30m command: | export NVM_DIR="$HOME/.nvm" [ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh" diff --git a/Resources/Private/Fusion/Backend/Root.fusion b/Resources/Private/Fusion/Backend/Root.fusion index 31aa049d0c..bf64bf3f08 100644 --- a/Resources/Private/Fusion/Backend/Root.fusion +++ b/Resources/Private/Fusion/Backend/Root.fusion @@ -232,6 +232,12 @@ backend = Neos.Fusion:Template { module = 'media/browser' } } + defaultModule = Neos.Fusion:UriBuilder { + package = 'Neos.Neos' + controller = 'Backend\\Backend' + action = 'index' + absolute = true + } } login = Neos.Fusion:UriBuilder { controller = 'Login' diff --git a/packages/neos-ui-backend-connector/src/Endpoints/index.ts b/packages/neos-ui-backend-connector/src/Endpoints/index.ts index 508d72075d..09aa39388a 100644 --- a/packages/neos-ui-backend-connector/src/Endpoints/index.ts +++ b/packages/neos-ui-backend-connector/src/Endpoints/index.ts @@ -43,6 +43,7 @@ export interface Routes { workspaces: string; userSettings: string; mediaBrowser: string; + defaultModule: string; }; login: string; logout: string; diff --git a/packages/neos-ui-sagas/src/UI/Impersonate/index.js b/packages/neos-ui-sagas/src/UI/Impersonate/index.js index fd4e5af537..52fe8a2bd4 100644 --- a/packages/neos-ui-sagas/src/UI/Impersonate/index.js +++ b/packages/neos-ui-sagas/src/UI/Impersonate/index.js @@ -4,7 +4,7 @@ import {actionTypes, actions} from '@neos-project/neos-ui-redux-store'; import backend from '@neos-project/neos-ui-backend-connector'; import {$get} from 'plow-js'; -export function * impersonateRestore({globalRegistry}) { +export function * impersonateRestore({globalRegistry, routes}) { const {impersonateRestore} = backend.get().endpoints; const i18nRegistry = globalRegistry.get('i18n'); const errorMessage = i18nRegistry.translate( @@ -38,7 +38,8 @@ export function * impersonateRestore({globalRegistry}) { } else { yield put(actions.UI.FlashMessages.add('restoreUserImpersonateUser', errorMessage, 'error')); } - window.location.pathname = '/neos'; + + window.location.href = $get('core.modules.defaultModule', routes); } catch (error) { yield put(actions.UI.FlashMessages.add('restoreUserImpersonateUser', errorMessage, 'error')); } diff --git a/packages/neos-ui/src/index.js b/packages/neos-ui/src/index.js index 3e4491b15e..2a90c8556f 100644 --- a/packages/neos-ui/src/index.js +++ b/packages/neos-ui/src/index.js @@ -81,7 +81,7 @@ function * application() { // // Bootstrap the saga middleware with initial sagas // - globalRegistry.get('sagas').getAllAsList().forEach(element => sagaMiddleWare.run(element.saga, {store, globalRegistry, configuration})); + globalRegistry.get('sagas').getAllAsList().forEach(element => sagaMiddleWare.run(element.saga, {store, globalRegistry, configuration, routes})); // // Tell everybody, that we're booting now diff --git a/packages/neos-ui/src/manifest.js b/packages/neos-ui/src/manifest.js index c456e89bb0..b4dce7d2d2 100644 --- a/packages/neos-ui/src/manifest.js +++ b/packages/neos-ui/src/manifest.js @@ -22,7 +22,7 @@ import initializeContentDomNode from '@neos-project/neos-ui-guest-frame/src/init import style from '@neos-project/neos-ui-guest-frame/src/style.css'; import backend from '@neos-project/neos-ui-backend-connector'; -manifest('main', {}, globalRegistry => { +manifest('main', {}, (globalRegistry, {routes}) => { // // Create edit preview mode registry // @@ -291,7 +291,7 @@ manifest('main', {}, globalRegistry => { // This is an extreme case when even the top node does not exist in the given dimension // TODO: still find a nicer way to break out of this situation if (redirectContextPath === false) { - window.location = '/neos'; + window.location.href = $get('core.modules.defaultModule', routes); break; } redirectUri = $get(['cr', 'nodes', 'byContextPath', redirectContextPath, 'uri'], state); @@ -360,7 +360,7 @@ manifest('main', {}, globalRegistry => { // This is an extreme case when even the top node does not exist in the given dimension // TODO: still find a nicer way to break out of this situation if (!redirectContextPath) { - window.location = '/neos'; + window.location.href = $get('core.modules.defaultModule', routes); break; } redirectUri = $get(['cr', 'nodes', 'byContextPath', redirectContextPath, 'uri'], state);