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

14294 switching store breaks back functionality #15525

Conversation

Mobecls
Copy link
Contributor

@Mobecls Mobecls commented May 25, 2018

Description

Adds getStoreUrl() method to app/code/Magento/Store/Block/Switcher.php
Modifies switcher-option's links in Magento/Store/view/frontend/templates/switch/stores.phtml and Magento/Store/view/frontend/templates/switch/languages.phtml templates

Fixed Issues (if relevant)

  1. Since MagentoCE2.1.11, after swithing store view, ___store=xx is added to url. Breaks 'back' functionality. #14294: Since MagentoCE2.1.11, after swithing store view, ___store=xx is added to url. Breaks 'back' functionality.

Contribution checklist

  • Pull request has a meaningful description of its purpose
  • All commits are accompanied by meaningful commit messages
  • All new or changed code is covered with unit/integration tests (if applicable)
  • All automated tests passed successfully (all builds on Travis CI are green)

Adds getStoreUrl() method to app/code/Magento/Store/Block/Switcher.php
Modifies switcher-option's links in Magento/Store/view/frontend/templates/switch/stores.phtml and languages.phtml templates
Fixes 'Potentially XSS vulnerability. Please verify that output is escaped'.
* @param Store $store
* @return string
*/
public function getStoreUrl(Store $store)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

hi @Mobecls
Thank you for the pull requests.
Unfortunately this is prohibited code change that needs to be refactored https://devdocs.magento.com/guides/v2.3/contributor-guide/backward-compatible-development/index.html#prohibited-code-changes

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you for the answer! Have I broken the rule "Introduction of a method to a class or interface"? Should I create a new interface instead?

@Mobecls Mobecls closed this May 26, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants