Routing not working properly with cmsData component
See original GitHub issueRouting is not working properly with cmsData component.
I’ve configured the Snowdog CMS API module in Magento and got CMS pages as response successfully at Vue Storefront.
But, When I clicked on the CMS page link from another CMS page, It will not fetch CMS page content.
For example, When I clicked a first time on About Us link it will get whole page content from Magento and render it and then I clicked on another page from here. it will not be working.
I’ve set the router and its link as below:
Path: router/index.js
{ name: 'about-us', path: '/about-us', component: CmsData, props: {identifier: 'about-us', type: 'Page', sync: true} },
{ name: 'terms-conditions', path: '/terms-conditions', component: CmsData, props: {identifier: 'terms-conditions', type: 'Page', sync: true} },
{ name: 'privacy-policy', path: '/privacy-policy', component: CmsData, props: {identifier: 'privacy-policy', type: 'Page', sync: true} },
{ name: 'delivery-and-return-policy', path: '/delivery-and-return-policy', component: CmsData, props: {identifier: 'delivery-and-return-policy', type: 'Page', sync: true} }
Path: src/themes/default/components/core/blocks/Footer/Footer.vue
<router-link :to="localizedRoute('/about-us')" exact>
{{ $t('About Us') }}
</router-link>
<router-link :to="localizedRoute('/terms-conditions')" exact>
{{ $t('Terms & Conditions') }}
</router-link>
<router-link :to="localizedRoute('/privacy-policy')" exact>
{{ $t('Privacy Policy') }}
</router-link>
<router-link :to="localizedRoute('/delivery-and-return-policy')" exact>
{{ $t('Delivery and Return Policy') }}
</router-link>
Current behavior
When I click first time on a link it will fetch content properly from Magento and render it but when click on another link from here, it will not work.
Expected behavior
It should be fetched page content for each link from Magento even clicked on another link from anywhere.
Can you handle fixing this bug by yourself?
- YES
- NO
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 Request2. Feature / Improvement
back todevelop
. - 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 Request3. Stabilisation fix
back 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
hotfix
ormaster
branch and create Pull Request4. Hotfix
back tohotfix
.
Environment details
- Browser: Chrome
- OS: Ubuntu 16.04
- Node: v10.15.3
- Code Version:
Issue Analytics
- State:
- Created 4 years ago
- Comments:5 (2 by maintainers)
Top GitHub Comments
@pkarw , Thank you. 👍 It works now 😃
More on the CMS before and after VS 1.6: https://docs.vuestorefront.io/guide/data/static-data.html