You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The storeView state is empty when you call it inside metaInfo() on a server-side request of a single-file-component – like in the product-details-page.
I didn't found a way yet to get the current store view using the state management in metaInfo(). I want to show the current currency-sign and default-language-code inside an meta-tag.
I read about common vue-meta caveats but couldn't get any reactivity for any store-view variable.
Expected behavior
It should be possible to get, for example, the currency code of the current store for meta-tags using the current storeView state.
Steps to reproduce the issue
Log the currentStoreView() in metaInfo() of src/themes/default/pages/Product.vue.
Visit a product and reload the page (server-side-request)
Which Release Cycle state this refers to? Info for developer.
Pick one option.
This is a bug report for test version on https://test.storefrontcloud.io - In this case Developer should create branch from develop branch and create Pull Request 2. Feature / Improvement back to develop.
This is a bug report for current Release Candidate version on https://next.storefrontcloud.io - In this case Developer should create branch from release branch and create Pull Request 3. Stabilisation fix back to release.
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 hotfix or master branch and create Pull Request 4. Hotfix back to hotfix.
Environment details
Browser: Chrome
OS: OSX
Node: 10 LTS
Code Version: develop
The text was updated successfully, but these errors were encountered:
@andrzejewsky Thanks for this fix! I only have one question: Why not hydrate the whole storeView object and just { storeCode: currentState.storeView.storeCode }?
@cewald It's because storeView could be really big object, that's why we filter that field from the initial state. The best solution would be keeping entire storeView in the SSR and cut it jus before sending to the client side, but it was hard to implement, so I simply whitelisted just storeCode, which was required to render metaInfo correctly.
Current behavior
The
storeView
state is empty when you call it insidemetaInfo()
on a server-side request of a single-file-component – like in the product-details-page.I didn't found a way yet to get the current store view using the state management in
metaInfo()
. I want to show the current currency-sign and default-language-code inside an meta-tag.I read about common
vue-meta
caveats but couldn't get any reactivity for any store-view variable.Expected behavior
It should be possible to get, for example, the currency code of the current store for meta-tags using the current
storeView
state.Steps to reproduce the issue
currentStoreView()
inmetaInfo()
ofsrc/themes/default/pages/Product.vue
.Repository
develop 99a493d
Can you handle fixing this bug by yourself?
Which Release Cycle state this refers to? Info for developer.
Pick one option.
develop
branch and create Pull Request2. Feature / Improvement
back todevelop
.release
branch and create Pull Request3. Stabilisation fix
back torelease
.hotfix
ormaster
branch and create Pull Request4. Hotfix
back tohotfix
.Environment details
The text was updated successfully, but these errors were encountered: