Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
55 commits
Select commit Hold shift + click to select a range
521ff1b
added catch for fetching single product in cart synchronization
Sep 27, 2019
f0d539c
update changelog
Sep 27, 2019
b09c9c7
change Promise to async
Sep 29, 2019
3f0f088
check if product exist
Sep 30, 2019
9edaf96
Update CHANGELOG.md
patzick Sep 30, 2019
a6cca90
Merge branch 'hotfix/v1.10.4' into bugfix/catch-fetching-single-product
patzick Sep 30, 2019
d83b109
Merge pull request #3641 from gibkigonzo/bugfix/catch-fetching-single…
patzick Sep 30, 2019
d7d1141
backport bugfixes
andrzejewsky Oct 4, 2019
68ae8e9
fix types
andrzejewsky Oct 4, 2019
71d142a
bugfixes
andrzejewsky Oct 4, 2019
217704e
bugfixes
andrzejewsky Oct 4, 2019
4563368
bugfixes
andrzejewsky Oct 4, 2019
c604f7a
fix tests
andrzejewsky Oct 4, 2019
eb6a701
backport pr 3552
Oct 7, 2019
ddeeb87
backport pr 3551
Oct 7, 2019
8b851f8
backport pr 3289
Oct 7, 2019
9d0adab
backport pr 3223
Oct 7, 2019
0e08441
backport pr 3548, 3516
Oct 7, 2019
de7f2a2
keep 'fullPath' in beforeEach
Oct 7, 2019
39259fa
backport 3180
andrzejewsky Oct 7, 2019
3681d5f
[Docs] Updated cookbook/theme R1 - sidetalk added
kkdg Sep 23, 2019
2e445d3
[Docs] Updated cookbook/theme R1
kkdg Sep 24, 2019
670b06a
[Docs] Updated cookbook/theme R3 - intro
kkdg Sep 26, 2019
584f2b5
[Docs] Updated cookbook/theme R3 - intro
kkdg Sep 26, 2019
1a2d3f0
[Docs] Updated cookbook/theme R3 prep
kkdg Oct 1, 2019
9a93947
[Docs] Updated cookbook/theme commit hash
kkdg Oct 1, 2019
ed3d1ff
[Docs] Updated cookbook/theme R3 - git hash
kkdg Oct 1, 2019
9ce28b2
Improve docs
mkoszut Oct 1, 2019
542b6cb
[Docs] Updated cookbook/theme R3 - intro
kkdg Oct 1, 2019
8686c00
[Docs] Updated cookbook/theme R3 - Recipe
kkdg Oct 1, 2019
037c2a1
[Docs] Added img for cookbook/theme R3
kkdg Oct 1, 2019
ba51270
[Docs] Updated cookbook/theme R2 - change position recipe
kkdg Oct 1, 2019
8c3e0ae
[Docs] Updated cookbook/theme R2 - refining phrases
kkdg Oct 1, 2019
35d8acf
[Docs] Updated cookbook/theme R3 - done with Home.vue
kkdg Oct 1, 2019
81de617
[Docs] Updated cookbook/theme - style for borderline
kkdg Oct 2, 2019
0df31c4
[Docs] Updated cookbook/theme R2 - 1.prep update
kkdg Oct 2, 2019
ace8d2b
[Docs] Updated cookbook/theme - refine
kkdg Oct 2, 2019
43d8490
[Docs] Updated cookbook/theme R2 - 2. recipe done for examples
kkdg Oct 2, 2019
f0bc3dd
[Docs] Updated cookbook/theme R2 - 4.chef idea
kkdg Oct 2, 2019
2efcdaa
[Docs] Updated cookbook/theme R2 - image files added
kkdg Oct 2, 2019
7e73378
[Docs] Updated cookbook/theme R2 - git compare link added
kkdg Oct 2, 2019
9a3ca01
[Docs] Updated cookbook/theme R2 - added link to migration recipe
kkdg Oct 2, 2019
2860165
Update Readme
VicSob Oct 2, 2019
b453de6
Evaluate the prop detailsLink
benjick Oct 6, 2019
002d41b
resolve conflicts
andrzejewsky Oct 13, 2019
0ebb6da
update changelog
andrzejewsky Oct 13, 2019
f2c1a45
Merge pull request #3687 from andrzejewsky/backportBugfixesFor1-10
andrzejewsky Oct 13, 2019
6e85013
Merge branch 'hotfix/v1.10.4' into patch-2
andrzejewsky Oct 13, 2019
5c48f3e
Merge pull request #3689 from benjick/patch-2
andrzejewsky Oct 13, 2019
de69fc2
Adds some additional german translations.
schwerdt-ke Oct 10, 2019
a7416d5
update changelog
andrzejewsky Oct 16, 2019
e4a770f
Merge pull request #3703 from schwerdt-ke/bugfix/3076-german-translat…
andrzejewsky Oct 16, 2019
d660c9b
update version
andrzejewsky Oct 18, 2019
117264a
Merge pull request #3726 from andrzejewsky/release-1.10.4
patzick Oct 18, 2019
cf0e8a5
Merge branch 'master' into hotfix/v1.10.4
patzick Oct 18, 2019
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
27 changes: 27 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,33 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/)
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## [1.10.4] - 18.10.2019

### Fixed
- Added try/catch for fetching single product in cart synchronization - @gibkigonzo (#3632)
- Removed infinite loop when changing checkbox in shipping details - @gibkigonzo (#3656)
- Remove modifying config by reference in multistore - @gibkigonzo (#3617)
- Fix displaying same country twice in the in the country switcher - @andrzejewsky (#3587)
- Remove race condition while loading locale messages - @gibkigonzo (#3602)
- Fixed special price that can break when you change pages (browser navigation for/back) or just go from category to product page - @resubaka (#3638)
- Change sku to string when checking products equality - @gibkigonzo (#3606)
- Fixed problem with losing browser history - @andrzejewsky (#3642)
- Fixed resolving store code on SSR - @andrzejewsky (#3576)
- Fixed styles for original price on Wishlist sidebar - @przspa (#3392)
- Added debounce for updating quantity method in the cart - @andrzejewsky (#3191)
- Improved scrolling in Safari on iOS devices (sidebars) - @phoenixdev-kl (#3551)
- Improved cookie and offline badges (z-index, overflow) - @phoenixdev-kl (#3552)
- Added config to set Cache-Control header for static assets based on mime type - @phoenix-bjoern (#3268)
- Added catching of errors when ES is down - @qiqqq
- `localizedRoute()` doesn't return urlDispatcher routes anymore. Use localizedDispatcherRoute instead - @lukeromanowicz (#3548)
- Fixed hash in dynamically resolved urls causing resolving issues - @lukeromanowicz (#3515)
- `localizedRoute()` now supports path (and prefers over fullPath) in LocalizedRoute objects - @lukeromanowicz (#3515)
- Decreased the `localStorage` quota usage + error handling by introducing new config variables: `config.products.disablePersistentProductsCache` to not store products by SKU (by default it's on). Products are cached in ServiceWorker cache anyway so the `product/list` will populate the in-memory cache (`cache.setItem(..., memoryOnly = true)`); `config.seo.disableUrlRoutesPersistentCache` - to not store the url mappings; they're stored in in-memory cache anyway so no additional requests will be made to the backend for url mapping; however it might cause some issues with url routing in the offline mode (when the offline mode PWA installed on homescreen got reloaded, the in-memory cache will be cleared so there won't potentially be the url mappings; however the same like with `product/list` the ServiceWorker cache SHOULD populate url mappings anyway); `config.syncTasks.disablePersistentTaskQueue` to not store the network requests queue in service worker. Currently only the stock-check and user-data changes were using this queue. The only downside it introuces can be related to the offline mode and these tasks will not be re-executed after connectivity established, but just in a case when the page got reloaded while offline (yeah it might happen using ServiceWorker; `syncTasks` can't be re-populated in cache from SW) - @pkarw (#2985)
- Fixed evaluate detailsLink in the cookie notification - @benjick (#3689)

## Added
- Added german translations - @schwerdt-ke (3076)

## [1.10.3] - 2019.09.18

### Fixed
Expand Down
15 changes: 12 additions & 3 deletions config/default.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,8 @@
}
},
"seo": {
"useUrlDispatcher": true
"useUrlDispatcher": true,
"disableUrlRoutesPersistentCache": true
},
"console": {
"showErrorOnProduction" : false,
Expand All @@ -46,7 +47,7 @@
"csrTimeout": 5000,
"ssrTimeout": 1000,
"queryMethod": "GET",
"disableLocalStorageQueriesCache": true,
"disablePersistentQueriesCache": true,
"searchScoring": {
"attributes": {
"attribute_code": {
Expand Down Expand Up @@ -262,6 +263,7 @@
"applycoupon_endpoint": "/api/cart/apply-coupon?token={{token}}&cartId={{cartId}}&coupon={{coupon}}"
},
"products": {
"disablePersistentProductsCache": true,
"useMagentoUrlKeys": true,
"setFirstVarianAsDefaultInURL": false,
"configurableChildrenStockPrefetchStatic": false,
Expand Down Expand Up @@ -340,7 +342,6 @@
"wishlist": "LOCALSTORAGE",
"categories": "LOCALSTORAGE",
"attributes": "LOCALSTORAGE",
"products": "INDEXEDDB",
"elasticCache": "LOCALSTORAGE",
"claims": "LOCALSTORAGE",
"syncTasks": "LOCALSTORAGE",
Expand Down Expand Up @@ -396,6 +397,9 @@
}
]
},
"syncTasks": {
"disablePersistentTaskQueue": true
},
"i18n": {
"defaultCountry": "US",
"defaultLanguage": "EN",
Expand All @@ -409,6 +413,11 @@
"fullLanguageName": "English",
"bundleAllStoreviewLanguages": true
},
"expireHeaders": {
"default": "30d",
"application/json": "24h",
"image/png": "7d"
},
"newsletter": {
"endpoint": "/api/ext/mailchimp-subscribe/subscribe"
},
Expand Down
2 changes: 1 addition & 1 deletion core/app.ts
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ const createApp = async (ssrContext, config, storeCode = null): Promise<{app: Vu
store.state.__DEMO_MODE__ = (config.demomode === true)
if (ssrContext) Vue.prototype.$ssrRequestContext = ssrContext
if (!store.state.config) store.state.config = globalConfig // @deprecated - we should avoid the `config`
const storeView = prepareStoreView(storeCode) // prepare the default storeView
const storeView = await prepareStoreView(storeCode) // prepare the default storeView
store.state.storeView = storeView

// to depreciate in near future
Expand Down
3 changes: 2 additions & 1 deletion core/client-entry.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,8 @@ import { createApp } from '@vue-storefront/core/app'
import rootStore from '@vue-storefront/core/store'
import { registerSyncTaskProcessor } from '@vue-storefront/core/lib/sync/task'
import i18n from '@vue-storefront/i18n'
import { prepareStoreView, storeCodeFromRoute, currentStoreView, localizedRoute } from '@vue-storefront/core/lib/multistore'
import storeCodeFromRoute from '@vue-storefront/core/lib/storeCodeFromRoute'
import { prepareStoreView, currentStoreView, localizedRoute } from '@vue-storefront/core/lib/multistore'
import { onNetworkStatusChange } from '@vue-storefront/core/modules/offline-order/helpers/onNetworkStatusChange'
import '@vue-storefront/core/service-worker/registration' // register the service worker
import { AsyncDataLoader } from './lib/async-data-loader'
Expand Down
3 changes: 3 additions & 0 deletions core/compatibility/components/blocks/Microcart/Product.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import { MicrocartProduct } from '@vue-storefront/core/modules/cart/components/Product.ts'
import i18n from '@vue-storefront/i18n'
import debounce from 'lodash-es/debounce'
import config from 'config'

export default {
Expand All @@ -12,11 +13,13 @@ export default {
// deprecated, will be moved to theme or removed in the near future #1742
this.$bus.$on('cart-after-itemchanged', this.onProductChanged)
this.$bus.$on('notification-after-itemremoved', this.onProductRemoved)
this.updateQuantity = debounce(this.updateQuantity, 5000)
},
beforeDestroy () {
// deprecated, will be moved to theme or removed in the near future #1742
this.$bus.$off('cart-after-itemchanged', this.onProductChanged)
this.$bus.$off('notification-after-itemremoved', this.onProductRemoved)
this.updateQuantity.cancel()
},
methods: {
removeItem () {
Expand Down
5 changes: 5 additions & 0 deletions core/helpers/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -165,8 +165,13 @@ export const onlineHelper = Vue.observable({
isOnline: isServer || navigator.onLine
})

export const routerHelper = Vue.observable({
popStateDetected: false
})

!isServer && window.addEventListener('online', () => { onlineHelper.isOnline = true })
!isServer && window.addEventListener('offline', () => { onlineHelper.isOnline = false })
!isServer && window.addEventListener('popstate', () => { routerHelper.popStateDetected = true })

export const processURLAddress = (url: string = '') => {
if (url.startsWith('/')) return `${config.api.url}${url}`
Expand Down
2 changes: 1 addition & 1 deletion core/i18n/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@vue-storefront/i18n",
"version": "1.10.3",
"version": "1.10.4",
"description": "Vue Storefront i18n",
"license": "MIT",
"main": "index.ts",
Expand Down
4 changes: 4 additions & 0 deletions core/i18n/resource/i18n/de-DE.csv
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,15 @@
"Out of stock!","Nicht auf Lager!"
" is out of the stock!"," ist nicht auf Lager!"
"Some of the ordered products are not available!","Einige der bestellten Produkte sind nicht auf Lager!"
"Please wait ...","Bitte warten ..."
"Stock check in progress, please wait while available stock quantities are checked","Bestandskontrolle läuft. Bitte warte einen Moment bis die verfügbare Bestandsmenge geprüft worden ist"
"There is no Internet connection. You can still place your order. We will notify you if any of ordered products is not available because we cannot check it right now.","Es besteht aktuell keine Verbindung zum Internet. Du kannst deine Bestellung dennoch aufgeben. Falls eines der bestellten Produkte bei Wiederaufbau der Verbindung nicht mehr verfügbar sein sollte, werden wir dich umgehend benachrichtigen."
"No such configuration for the product. Please do choose another combination of attributes.","Diese Konfiguration ist für dieses Produkt nicht möglich. Bitte wähle eine andere Kombination von Eigenschaften."
"The system is not sure about the stock quantity (volatile). Product has been added to the cart for pre-reservation.","Das System konnte den genauen Lagerbestand nicht ermitteln, da dieser sehr volatil ist. Das Produkt wurde zur Vorreservierung in den Warenkorb gelegt."
"This feature is not implemented yet! Please take a look at https://github.com/DivanteLtd/vue-storefront/issues for our Roadmap!","Diese Funktion wurde noch nicht implementiert. Für weitere Details schau dir bitte auf https://github.com/DivanteLtd/vue-storefront/issues unsere Roadmap an!"
"The product is out of stock and cannot be added to the cart!","Das Produkt ist nicht auf Lager und kann daher nicht zum Warenkorb hinzugefügt werden!"
"Product has been added to the cart!","Produkt wurde zum Warenkorb hinzugefügt!"
"Product quantity has been updated!","Die Anzahl wurde upgedated!"
"Internal validation error. Please check if all required fields are filled in. Please contact us on {email}","Interner Validierungsfehler. Bitte überprüfe, ob alle erforderlichen Felder ausgefüllt sind. Bei Problemen kontaktiere uns bitte über {email}"
"Address provided in checkout contains invalid data. Please check if all required fields are filled in and also contact us on {email} to resolve this issue for future. Your order has been canceled.","Die angegebene Adresse ist nicht gültig. Bitte überprüfe, ob alle notwenigen Felder ausgefüllt sind und kontaktiere uns per {email} um den Fehler für die Zukunft zu beheben. Deine Bestellung wurde abgebrochen."
"Product {productName} has been added to the compare!","Das Produkt {productName} wurde zur Vergleichsliste hinzugefügt!"
Expand Down Expand Up @@ -71,3 +73,5 @@
"You need to be logged in to see this page","Sie müssen angemeldet sein, um diese Seite anzuzeigen"
"Quantity must be above 0","Die Menge muss größer als 0 sein"
"Error: Error while adding products","Error: Fehler beim hinzufügen der Produkte"
"Unexpected authorization error. Check your Network conection.","Unerwarteter Fehler bei der Authentifizierung. Bitte überprüfen Sie Ihre Internetverbindung."
"Columns","Spalten"
1 change: 0 additions & 1 deletion core/i18n/resource/i18n/jp-JP.csv
Original file line number Diff line number Diff line change
Expand Up @@ -154,7 +154,6 @@
"We will send you the invoice to given e-mail address","頂いたメールアドレスに請求書を送ります"
"Wishlist","お気に入りリスト"
"You are offline","オフラインです"
"You are offline, some of the functionalities are limited","現在オフラインですので、使えない機能があります"
"You can also use","またこれらを使うことができます"
"You can log to your account using e-mail and password defined earlier. On your account you can <b>edit your profile data,</b> check <b>history of transactions,</b> edit <b>subscription to newsletter.</b>","登録されたメールアドレスとパスワードを使ってログインできます。アカウント内では<b>プロフィール</b>の編集<b>注文の履歴</b>の確認<b>ニュースレター</b>への購読が行えます。"
"You have been successfully subscribed to our newsletter!","ニュースレターへの購読が完了しました!"
Expand Down
122 changes: 30 additions & 92 deletions core/lib/multistore.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,54 +6,19 @@ import queryString from 'query-string'
import { RouterManager } from '@vue-storefront/core/lib/router-manager'
import VueRouter, { RouteConfig, RawLocation } from 'vue-router'
import config from 'config'

export interface LocalizedRoute {
path?: string,
name?: string,
hash?: string,
params?: object,
fullPath?: string,
host?: string
}

export interface StoreView {
storeCode: string,
disabled?: boolean,
storeId: any,
name?: string,
url?: string,
elasticsearch: {
host: string,
index: string
},
tax: {
sourcePriceIncludesTax: boolean,
defaultCountry: string,
defaultRegion: null | string,
calculateServerSide: boolean
},
i18n: {
fullCountryName: string,
fullLanguageName: string,
defaultLanguage: string,
defaultCountry: string,
defaultLocale: string,
currencyCode: string,
currencySign: string,
dateFormat: string
}
}
import { LocalizedRoute, StoreView } from './types'
import storeCodeFromRoute from './storeCodeFromRoute'

export function currentStoreView (): StoreView {
// TODO: Change to getter all along our code
return rootStore.state.storeView
}

export function prepareStoreView (storeCode: string): StoreView {
export async function prepareStoreView (storeCode: string): Promise<StoreView> {
let storeView = { // current, default store
tax: config.tax,
i18n: config.i18n,
elasticsearch: config.elasticsearch,
tax: Object.assign({}, config.tax),
i18n: Object.assign({}, config.i18n),
elasticsearch: Object.assign({}, config.elasticsearch),
storeCode: '',
storeId: config.defaultStoreCode && config.defaultStoreCode !== '' ? config.storeViews[config.defaultStoreCode].storeId : 1
}
Expand All @@ -69,7 +34,7 @@ export function prepareStoreView (storeCode: string): StoreView {
}
if (storeViewHasChanged) {
rootStore.state.storeView = storeView
loadLanguageAsync(storeView.i18n.defaultLocale)
await loadLanguageAsync(storeView.i18n.defaultLocale)
}
if (storeViewHasChanged || Vue.prototype.$db.currentStoreCode !== storeCode) {
if (typeof Vue.prototype.$db === 'undefined') {
Expand All @@ -81,46 +46,6 @@ export function prepareStoreView (storeCode: string): StoreView {
return storeView
}

export function storeCodeFromRoute (matchedRouteOrUrl: LocalizedRoute | RawLocation | string): string {
if (matchedRouteOrUrl) {
for (let storeCode of config.storeViews.mapStoreUrlsFor) {
const store = config.storeViews[storeCode]

// handle resolving by path
const matchingPath = typeof matchedRouteOrUrl === 'object' ? matchedRouteOrUrl.path : matchedRouteOrUrl
let normalizedPath = matchingPath // assume that matching string is a path
if (matchingPath.length > 0 && matchingPath[0] !== '/') {
normalizedPath = '/' + matchingPath
}

if (normalizedPath.startsWith(`${store.url}/`) || normalizedPath === store.url) {
return storeCode
}

// handle resolving by domain+path
let url = ''

if (typeof matchedRouteOrUrl === 'object') {
if (matchedRouteOrUrl['host']) {
url = matchedRouteOrUrl['host'] + normalizedPath
} else {
return '' // this route does not have url so there is nothing to do here
}
} else {
url = matchedRouteOrUrl as string
}

if (url.startsWith(`${store.url}/`) || url === store.url) {
return storeCode
}
}

return ''
} else {
return ''
}
}

export function removeStoreCodeFromRoute (matchedRouteOrUrl: LocalizedRoute | string): LocalizedRoute | string {
const storeCodeInRoute = storeCodeFromRoute(matchedRouteOrUrl)
if (storeCodeInRoute !== '') {
Expand All @@ -141,22 +66,29 @@ export function adjustMultistoreApiUrl (url: string): string {
}

export function localizedDispatcherRoute (routeObj: LocalizedRoute | string, storeCode: string): LocalizedRoute | string {
if (!storeCode) {
storeCode = currentStoreView().storeCode
const { storeCode: currentStoreCode, appendStoreCode } = currentStoreView()
if (!storeCode || !config.storeViews[storeCode]) {
storeCode = currentStoreCode
}
const appendStoreCodePrefix = config.storeViews[storeCode] ? config.storeViews[storeCode].appendStoreCode : false
const appendStoreCodePrefix = storeCode && appendStoreCode

if (typeof routeObj === 'string') {
if (routeObj[0] !== '/') routeObj = `/${routeObj}`
return appendStoreCodePrefix ? `/${storeCode}${routeObj}` : routeObj
}

if (routeObj && routeObj.fullPath) { // case of using dispatcher
const routeCodePrefix = config.defaultStoreCode !== storeCode && appendStoreCodePrefix ? `/${storeCode}` : ''
const qrStr = queryString.stringify(routeObj.params)
if (routeObj) {
if ((routeObj as LocalizedRoute).fullPath && !(routeObj as LocalizedRoute).path) { // support both path and fullPath
routeObj['path'] = (routeObj as LocalizedRoute).fullPath
}

if (routeObj.path) { // case of using dispatcher
const routeCodePrefix = appendStoreCodePrefix ? `/${storeCode}` : ''
const qrStr = queryString.stringify(routeObj.params);

const normalizedPath = routeObj.fullPath[0] !== '/' ? `/${routeObj.fullPath}` : routeObj.fullPath
return `${routeCodePrefix}${normalizedPath}${qrStr ? `?${qrStr}` : ''}`
const normalizedPath = routeObj.path[0] !== '/' ? `/${routeObj.path}` : routeObj.path
return `${routeCodePrefix}${normalizedPath}${qrStr ? `?${qrStr}` : ''}`
}
}

return routeObj
Expand All @@ -166,8 +98,14 @@ export function localizedRoute (routeObj: LocalizedRoute | string | RouteConfig
if (!storeCode) {
storeCode = currentStoreView().storeCode
}
if (routeObj && (routeObj as LocalizedRoute).fullPath && config.seo.useUrlDispatcher) {
return localizedDispatcherRoute(Object.assign({}, routeObj, { params: null }) as LocalizedRoute, storeCode)
if (!routeObj) {
return routeObj
}

if ((typeof routeObj === 'object') && (routeObj as LocalizedRoute)) {
if ((routeObj as LocalizedRoute).fullPath && !(routeObj as LocalizedRoute).path) { // support both path and fullPath
routeObj['path'] = (routeObj as LocalizedRoute).fullPath
}
}

if (storeCode && routeObj && config.defaultStoreCode !== storeCode && config.storeViews[storeCode].appendStoreCode) {
Expand Down
4 changes: 2 additions & 2 deletions core/lib/router-manager.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,8 @@ const RouterManager = {
findByName: function (name: string): RouteConfig {
return this._registeredRoutes.find(r => r.name === name)
},
findByPath: function (fullPath: string): RouteConfig {
return this._registeredRoutes.find(r => r.fullPath === fullPath)
findByPath: function (path: string): RouteConfig {
return this._registeredRoutes.find(r => r.path === path)
},
lockRoute: function () {
let resolver
Expand Down
2 changes: 1 addition & 1 deletion core/lib/search.ts
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ export const quickSearchByQuery = async ({ query, start = 0, size = 50, entityTy
const res = searchAdapter.entities[Request.type].resultPorcessor(resp, start, size)

if (res) { // otherwise it can be just a offline mode
cache.setItem(cacheKey, res, null, config.elasticsearch.disableLocalStorageQueriesCache).catch((err) => { console.error('Cannot store cache for ' + cacheKey + ', ' + err) })
cache.setItem(cacheKey, res, null, config.elasticsearch.disablePersistentQueriesCache).catch((err) => { console.error('Cannot store cache for ' + cacheKey + ', ' + err) })
if (!servedFromCache) { // if navigator onLine == false means ES is unreachable and probably this will return false; sometimes returned false faster than indexedDb cache returns result ...
Logger.debug('Result from ES for ' + cacheKey + ' (' + entityType + '), ms=' + (new Date().getTime() - benchmarkTime.getTime()))()
res.cache = false
Expand Down
Loading