-
Notifications
You must be signed in to change notification settings - Fork 9.4k
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
Method $product->getUrlInStore() returning extremely long URLs, could be a bug #16273
Comments
This can be reproduced on Magento 2.3-develop as well. |
According to the file |
# Method $product->getUrlInStore() returning extremely long URLs, could be a bug
# Method $product->getUrlInStore() returning extremely long URLs, could be a bug (cherry picked from commit 7558ac0)
# Method $product->getUrlInStore() returning extremely long URLs, could be a bug
…store-wrong-link_mage22' into magento#16273-product-geturlinstore-wrong-link_mage22
https://github.com/vasilii-b/magento2 into magento#16273-product-geturlinstore-wrong-link_mage22
Hi @adampmoss. Thank you for your report.
The fix will be available with the upcoming 2.2.6 release. |
Hi @adampmoss. Thank you for your report.
The fix will be available with the upcoming 2.3.0 release. |
@magento-engcom-team , @sidolov hello!!! |
Hi @adampmoss. Thank you for your report.
The fix will be available with the upcoming 2.1.16 release. |
…ong-link_mage21' into 16273-product-geturlinstore-wrong-link_mage21 # Conflicts: # app/code/Magento/Store/Test/Unit/Url/Plugin/RouteParamsResolverTest.php
I feel like there may be a bug in the following file because the output of
$product->getUrlInStore()
is not what I'd expect. Query params related to the store are added to the URL in the following file:magento2/app/code/Magento/Store/Url/Plugin/RouteParamsResolver.php
Line 66 in 9c14af7
By setting an entire object (
$subject->getScope()
) as the$storeCode
rather than just a stringdefault
it is causing a very messy looking URL.Preconditions
Steps to reproduce
Use the following code where a product model is loaded and where you can see the result:
<?= $product->getUrlInStore() ?>
Expected result
The URL produced for the product would look like:
Actual result
The URL produced is actually very long winded:
The text was updated successfully, but these errors were encountered: