You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
For example, products can have a URL like: /occasions-and-events/anniversary/golden-anniversary/decorative-metallic-champagne-gold-placemat-chrtwpm06.html in addition to their canonical URLS (e.g. /decorative-metallic-champagne-gold-placemat-chrtwpm06.html in this case).
It seems like due to the way that the request_path product field is populated in the Product collection, it will always use the URL rewrite with the newest ID that matches the following criteria:
The relevant part of the code in \Magento\Catalog\Model\ResourceModel\Product\Collection::_addUrlRewrite:
The for loop starts from the lowest ID to the highest ID so occasions-and-events/anniversary/golden-anniversary/decorative-metallic-champagne-gold-placemat-chrtwpm06.html would be the final value set as the request_path.
Requirements:
We need to be using the canonical URL for re-caching instead of relying on the request_path field of each product due to the way it is being generated.
I'm thinking we probably don't want to use request_path at all and rather rely on the product's URL key.
The text was updated successfully, but these errors were encountered:
For example, products can have a URL like:
/occasions-and-events/anniversary/golden-anniversary/decorative-metallic-champagne-gold-placemat-chrtwpm06.html
in addition to their canonical URLS (e.g./decorative-metallic-champagne-gold-placemat-chrtwpm06.html
in this case).It seems like due to the way that the
request_path
product field is populated in the Product collection, it will always use the URL rewrite with the newest ID that matches the following criteria:The relevant part of the code in
\Magento\Catalog\Model\ResourceModel\Product\Collection::_addUrlRewrite
:The for loop starts from the lowest ID to the highest ID so
occasions-and-events/anniversary/golden-anniversary/decorative-metallic-champagne-gold-placemat-chrtwpm06.html
would be the final value set as therequest_path
.Requirements:
request_path
field of each product due to the way it is being generated.I'm thinking we probably don't want to use
request_path
at all and rather rely on the product's URL key.The text was updated successfully, but these errors were encountered: