From 5da8e44d05694b0397745e91f0f4a32212387e70 Mon Sep 17 00:00:00 2001 From: tkostuch Date: Tue, 17 Dec 2019 14:16:49 +0100 Subject: [PATCH 1/2] fix error page translation --- core/client-entry.ts | 2 +- src/themes/default/router/index.js | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) 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 From f0af4a7be40f566d7ca4f53a507f833034d1777c Mon Sep 17 00:00:00 2001 From: tkostuch Date: Tue, 17 Dec 2019 14:18:10 +0100 Subject: [PATCH 2/2] update changelog --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 22cc643892..e52d4d7930 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -38,6 +38,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - Set `null` as default value for custom option in product page - @gibkigonzo (#3885) - 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) ### Changed / Improved - Changed pre commit hook to use NODE_ENV production to check for debugger statements - @resubaka (#3686)