Skip to content

#16273: Fix bug in method getUrlInStore() of product model #16308

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

Conversation

vasilii-b
Copy link

Description

This PR reference changes how/what is returned when product model method getUrlInStore() is called $product->getUrlInStore().
Problem is in how the current store is checked and what is returned based on it.

Fixed Issues

  1. Method $product->getUrlInStore() returning extremely long URLs, could be a bug #16273
  2. Having set Add store code to URLs in Admin Configuration to NO, store code is still shown in the product URL.

Manual testing scenarios

For issue 1 - please see the issue description.
For issue 2:

  1. Go to Admin -> Stores -> Configuration -> Catalog -> Web -> Url Options -> Add Store Code to Urls and set it to NO.
  2. In some .phtml file, list.phtml for example, call method getUrlInStore() for a product.

Expected Result

Store code is not added into product url

https://www.domain.com/my-product.html

Actual Result

Store code is added into product url

https://www.domain.com/my-product.html?___store=default

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)

victor-v-rad and others added 30 commits June 6, 2018 12:40
…15521

 - Merge Pull Request magento#15521 from diedburn/magento2:fix_breadcrumbs_encoding
 - Merged commits:
   1. 213e11d
   2. 603de52
   3. e95f3f7
…tag and doesn't show… magento#15532

 - Merge Pull Request magento#15532 from phoenix128/magento2:issue-15501-missing-meta-title-tag
 - Merged commits:
   1. 0a38b84
   2. 85ac3be
   3. 432cf00
   4. 1413d65
vrann and others added 28 commits June 26, 2018 15:57
[TSG] Backporting for 2.2 (pr32) (2.2.6)
…ento#16379

 - Merge Pull Request magento#16379 from hitesh-wagento/magento2:wrong-password-checkout
 - Merged commits:
   1. 4f976e7
   2. 55d1c15
Accepted Public Pull Requests:
 - magento#13509: Use constant time string comparison in FormKey validator (by @p0pr0ck5)
 - magento#16389: [Backport 2.2] Use correct error message for duplicate error key in product import (by @gelanivishal)
 - magento#16379: [Changed password placeholder text in checkout page] (by @hitesh-wagento)
 - magento#16093: When searching for the title if search for all the segments that has � (by @rsantellan)
 - magento#16279: MAGETWO-61209: Backport - Fixed issue magento#7379 with mage/calendar when setting `numberOfM� (by @vasilii-b)
 - magento#16333: Add metadata title in unit test (by @slackerzz)
 - magento#16217: Admin controller product set save refactor (by @AnshuMishra17)
 - magento#15339: Fixed set template syntax in block file (by @namratachangani)


Fixed GitHub Issues:
 - magento#16378: Wrong placeholder for password field in the checkout page (reported by @mohitka) has been fixed in magento#16379 by @hitesh-wagento in 2.2-develop branch
   Related commits:
     1. 4f976e7
     2. 55d1c15

 - magento#7379: Calendar widget (jQuery UI DatePicker) with numberOfMonths = 2 or more (reported by @atihomirov) has been fixed in magento#16279 by @vasilii-b in 2.2-develop branch
   Related commits:
     1. de533cc

 - magento#15345: Template syntax in block file (reported by @vgelani) has been fixed in magento#15339 by @namratachangani in 2.2-develop branch
   Related commits:
     1. efd58e3
     2. 86b9895
     3. c1ce795
     4. 5118361
Fixed issues:
 - MAGETWO-87589: [Magento Cloud] - Issue with polluted database when updating product attributes through API
…store-wrong-link_mage22' into magento#16273-product-geturlinstore-wrong-link_mage22
@magento-cicd2
Copy link
Contributor

CLA assistant check
Thank you for your submission, we really appreciate it. Like many open source projects, we ask that you all sign our Contributor License Agreement before we can accept your contribution.
2 out of 8 committers have signed the CLA.

✅ fmarangi
✅ magento-engcom-team
❌ victor-v-rad
❌ le0n4eg
❌ RuslanKostiv1
❌ svitja
❌ DianaRusin
❌ zakdma

@vasilii-b vasilii-b closed this Jun 30, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bugfix Component: Store Partner: Atwix Pull Request is created by partner Atwix partners-contribution Pull Request is created by Magento Partner Release Line: 2.2
Projects
None yet
Development

Successfully merging this pull request may close these issues.