Fixed error page display with enabled multistore #3920
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Related issues
closes #3890
Short description and why it's useful
We need to keep /page-not-found as last one in router/index.js because it has wild card and routes are processed in order, so it can match
/error. Second problem is that we set storeCode here https://github.com/DivanteLtd/vue-storefront/blob/develop/core/lib/multistore.ts#L59 then we register user module where state is overridden by default one https://github.com/DivanteLtd/vue-storefront/blob/develop/core/modules/user/index.ts#L10 . I was thinking about doing something like this incore/modules/user/index.tsBut if storeView is not cleared in some moment then I think we can just use
storeView.storeCodeinstead ofuser.current_storecode. https://github.com/DivanteLtd/vue-storefront/pull/3920/files#diff-009121668441dc0628ed96b5d5c41d64R22Screenshots of visual changes before/after (if there are any)
Which environment this relates to
Check your case. In case of any doubts please read about Release Cycle
developbranch and want to merge it back todevelopreleasebranch and want to merge it back toreleasehotfixormasterbranch and want to merge it back tohotfixUpgrade Notes and Changelog
IMPORTANT NOTICE - Remember to update
CHANGELOG.mdwith description of your changeContribution and currently important rules acceptance