Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SSR localized routes problem with Multistore #3262

Closed
2 of 5 tasks
grimasod opened this issue Jul 22, 2019 · 8 comments
Closed
2 of 5 tasks

SSR localized routes problem with Multistore #3262

grimasod opened this issue Jul 22, 2019 · 8 comments
Assignees
Labels
bug Bug reports P2: Important Priority mark - still high ;) QA approved after merge Testers will add this label after positive check on merged changes
Milestone

Comments

@grimasod
Copy link
Contributor

Current behavior

In a multistore setup, all stores get the same localized routes in SSR, depending on which store was requested first.

Expected behavior

Each store should have correct localized routes in SSR

Steps to reproduce the issue

  1. Using a default installation of VS, enable multistore in local.json "storeViews": "multistore": true, ...
  2. Build with multistore enabled yarn build and start the server yarn start
  3. In a browser, view the default store home page source view-source:http://localhost:3000
  4. Search for <a href. The first result is the logo link <a href="/" title="Home Page" ...
  5. Do the same for DE store view-source:http://localhost:3000/de
  6. The logo link is still non-localized <a href="/" title="Home Page" ... it should be /de/
  7. Now restart the server yarn start
  8. Refresh view-source:http://localhost:3000/de
  9. The route is correct for this store <a href="/de/" title="Home Page" ...
  10. But, refresh the default store view-source:http://localhost:3000
  11. And now it incorrectly has the DE routes <a href="/de/" title="Home Page" ...

The same problem can be see on demo.storefrontcloud.io and next.storefrontcloud.io. See view-source:https://next.storefrontcloud.io/de - the routes are not localized.

Repository

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 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 75
  • OS: MacOS Mojave
  • Node: v10.15.3
  • Code Version: v1.10

Additional information

@grimasod grimasod added the bug Bug reports label Jul 22, 2019
@pkarw
Copy link
Collaborator

pkarw commented Jul 22, 2019

thanks, @grimasod; what struck me is that the only route that causes this problem is / - all the product and category links look just fine (can you please confirm?)

@pkarw pkarw added the P2: Important Priority mark - still high ;) label Jul 22, 2019
@pkarw pkarw added this to the 1.10.0 milestone Jul 22, 2019
@grimasod
Copy link
Contributor Author

@pkarw I think it's more complicated than that, unfortunately. I get a mixture of fine (Products) and not fine (Home, Categories, Footer links).

After the steps above, here's a selection of links:

  • <a href="/de/" title="Home Page"
  • <a href="/de/c/women-20"
  • <a href="/de/c/men-11"
  • <a href="/de/c/gear-3"
  • <a href="/women/tops-women/tees-women/tees-25/radiant-tee-1561.html?childSku=WS12"
  • <a href="/women/tops-women/tees-women/tees-25/desiree-fitness-tee-1593.html?childSku=WS05"
  • ...
  • <a href="/de/my-account"
  • <a href="/de/delivery"
  • ...

Do you get a different outcome?

@pkarw
Copy link
Collaborator

pkarw commented Jul 22, 2019

It seems like there is some issue with localizedRoute helpers - maybe after last changes to multistore.ts applied some time ago (to 1.9 I belive) @lukeromanowicz please check it

@pkarw
Copy link
Collaborator

pkarw commented Jul 25, 2019

@lukeromanowicz any progress on that?

@lukeromanowicz
Copy link
Contributor

Issue reproduced but I haven't been able to investigate it yet.

@patzick patzick added the QA - Ready for tests This is notification for testers, that improvement is ready to be tested and verified. label Jul 30, 2019
@patzick patzick closed this as completed Jul 30, 2019
@lukeromanowicz lukeromanowicz reopened this Aug 5, 2019
@pkarw
Copy link
Collaborator

pkarw commented Aug 6, 2019

@lukeromanowicz can we close it just after #3331 ?

@lukeromanowicz
Copy link
Contributor

Yes :)

@ArturDivante
Copy link
Collaborator

Problem fixed on next :) Well done :)

@ArturDivante ArturDivante added QA approved after merge Testers will add this label after positive check on merged changes and removed QA - Ready for tests This is notification for testers, that improvement is ready to be tested and verified. labels Aug 7, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Bug reports P2: Important Priority mark - still high ;) QA approved after merge Testers will add this label after positive check on merged changes
Projects
None yet
Development

No branches or pull requests

5 participants