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

#9113 fix url_path attribute value is not populated #12012

Closed
wants to merge 4 commits into from
Closed
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions app/code/Magento/Catalog/Model/Product.php
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@
* @method \Magento\Catalog\Model\ResourceModel\Product\Collection getCollection()
* @method string getUrlKey()
* @method Product setUrlKey(string $urlKey)
* @method Product setUrlPath(string $urlKey)
* @method Product setRequestPath(string $requestPath)
* @method Product setWebsiteIds(array $ids)
*
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,5 +32,6 @@ public function execute(\Magento\Framework\Event\Observer $observer)
/** @var Product $product */
$product = $observer->getEvent()->getProduct();
$product->setUrlKey($this->productUrlPathGenerator->getUrlKey($product));
$product->setUrlPath($this->productUrlPathGenerator->getUrlPath($product));
Copy link

@TeknoFiend TeknoFiend Nov 14, 2017

Choose a reason for hiding this comment

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

The issue mentioned using [product-suffix-from-setting] to build the path. Should this not be getUrlPathWithSuffix?

Sorry for the drive-by comment, I'm in need of a populated path, that includes the suffix.

}
}