vue-storefront-1
vue-storefront-1 copied to clipboard
Excessive storeView initialization
Current behavior
As mentioned in vuestorefront/vue-storefront#3270, in multistore mode the default storeview is unnecessarily being initialized and later changed to target storeview.
The full scenario is as follows:
- Server initializes full default storeview including translations, sync task storage etc in https://github.com/DivanteLtd/vue-storefront/blob/c53ccb0073c0810b735df0f944bd20d6fba608d4/core/app.ts#L75
- Server adds to the router every single page for every single storeview defined in the config
- Server's router matches a page with the corresponding storecode https://github.com/DivanteLtd/vue-storefront/blob/c53ccb0073c0810b735df0f944bd20d6fba608d4/core/server-entry.ts#L73-L83
- Server initializes full target storeview by storecode from the previous step <-- extend mechanism is here
In addition, appendStoreCode attribute is used in 2nd step, while it's being inherited in the 4th step so it cannot be extended.
Expected behavior
App initialization in multistore mode is rewritten to a way that there is no need to initialize any other storeview than the target one. All storeview attributes should be inherited through the "extend" mechanism, including appendStoreCode and url.
After fixing inheritance of attributes mentioned above, please adjust the docs.
Can you handle fixing this bug by yourself?
- [x] YES but not anytime soon.
- [ ] NO
Which Release Cycle state this refers to? Info for developer.
Pick one option.
- [x] This is a bug report for test version on https://test.storefrontcloud.io - In this case Developer should create branch from
developbranch and create Pull Request2. Feature / Improvementback todevelop. - [ ] This is a bug report for current Release Candidate version on https://next.storefrontcloud.io - In this case Developer should create branch from
releasebranch and create Pull Request3. Stabilisation fixback torelease. - [ ] This is a bug report for current Stable version on https://demo.storefrontcloud.io and should be placed in next stable version hotfix - In this case Developer should create branch from
hotfixormasterbranch and create Pull Request4. Hotfixback tohotfix.
I guess it's been already done within 1.11 @lukeromanowicz