diff --git a/CHANGELOG.md b/CHANGELOG.md index 48848b75f6..997a24de8f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -39,6 +39,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - Fixed Breadcrumb filters - apply to second category fetch - @grimasod (#3887) - Fixed `config.storeViews.commonCache` being ignored - @grimasod (#3895) - Fixed static pages, password notification, offline mode #3902 - @andrzejewsky (#3902) +- Fixed error page display with enabled multistore - @gibkigonzo (#3890) - Fixed edit shipping address in my account - @gibkigonzo (#3921) - Fetch cms_block content in serverPrefetch method - @gibkigonzo (#3910) diff --git a/core/client-entry.ts b/core/client-entry.ts index 333aa97c6b..c7135d0ad2 100755 --- a/core/client-entry.ts +++ b/core/client-entry.ts @@ -19,7 +19,7 @@ declare var window: any const invokeClientEntry = async () => { const dynamicRuntimeConfig = window.__INITIAL_STATE__.config ? Object.assign(globalConfig, window.__INITIAL_STATE__.config) : globalConfig // Get storeCode from server (received either from cache header or env variable) - let storeCode = window.__INITIAL_STATE__.user.current_storecode + let storeCode = window.__INITIAL_STATE__.storeView.storeCode const { app, router, store } = await createApp(null, dynamicRuntimeConfig, storeCode) if (window.__INITIAL_STATE__) { diff --git a/src/themes/default/router/index.js b/src/themes/default/router/index.js index ac9dce8c9d..8be4d6069f 100644 --- a/src/themes/default/router/index.js +++ b/src/themes/default/router/index.js @@ -33,7 +33,6 @@ let routes = [ { name: 'order-from-catalog', path: '/order-from-catalog', component: Static, props: {page: 'lorem', title: 'Order from catalog'} }, { name: 'contact', path: '/contact', component: Static, props: {page: 'contact', title: 'Contact'} }, { name: 'compare', path: '/compare', component: Compare, props: {title: 'Compare Products'} }, - { name: 'page-not-found', path: '*', component: PageNotFound }, { name: 'error', path: '/error', component: ErrorPage, meta: { layout: 'minimal' } }, { name: 'virtual-product', path: '/p/:parentSku/:slug', component: Product }, // :sku param can be marked as optional with ":sku?" (https://github.com/vuejs/vue-router/blob/dev/examples/route-matching/app.js#L16), but it requires a lot of work to adjust the rest of the site { name: 'bundle-product', path: '/p/:parentSku/:slug', component: Product }, // :sku param can be marked as optional with ":sku?" (https://github.com/vuejs/vue-router/blob/dev/examples/route-matching/app.js#L16), but it requires a lot of work to adjust the rest of the site @@ -43,7 +42,8 @@ let routes = [ { name: 'configurable-product', path: '/p/:parentSku/:slug/:childSku', component: Product }, // :sku param can be marked as optional with ":sku?" (https://github.com/vuejs/vue-router/blob/dev/examples/route-matching/app.js#L16), but it requires a lot of work to adjust the rest of the site { name: 'product', path: '/p/:parentSku/:slug/:childSku', component: Product }, // :sku param can be marked as optional with ":sku?" (https://github.com/vuejs/vue-router/blob/dev/examples/route-matching/app.js#L16), but it requires a lot of work to adjust the rest of the site { name: 'category', path: '/c/:slug', component: Category }, - { name: 'cms-page', path: '/i/:slug', component: CmsPage } + { name: 'cms-page', path: '/i/:slug', component: CmsPage }, + { name: 'page-not-found', path: '*', component: PageNotFound } ] export default routes