Skip to content

Commit 1325946

Browse files
committed
ACP2E-3009: async.operations.all executed and created an error.
1 parent e721c90 commit 1325946

File tree

3 files changed

+9
-2
lines changed

3 files changed

+9
-2
lines changed

app/code/Magento/Catalog/Model/ProductLink/Repository.php

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -134,7 +134,10 @@ public function __construct(
134134
public function save(\Magento\Catalog\Api\Data\ProductLinkInterface $entity)
135135
{
136136
if (!$entity->getSku()) {
137-
throw new NoSuchEntityException(__('ProductSku should be specified'));
137+
throw new NoSuchEntityException(__(
138+
'The parent product SKU is required for linking child products. '
139+
. 'Please ensure the parent product SKU is provided and try again.'
140+
));
138141
}
139142
if (!$entity->getLinkedProductSku()) {
140143
throw new NoSuchEntityException(__('The linked product SKU is invalid. Verify the data and try again.'));

app/code/Magento/Catalog/Test/Unit/Model/ProductLink/RepositoryTest.php

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -193,7 +193,10 @@ public function testSaveWithoutLinkedProductSku()
193193
public function testSaveWithoutProductSku()
194194
{
195195
$this->expectException('Magento\Framework\Exception\NoSuchEntityException');
196-
$this->expectExceptionMessage('ProductSku should be specified');
196+
$this->expectExceptionMessage(
197+
'The parent product SKU is required for linking child products. '
198+
. 'Please ensure the parent product SKU is provided and try again.'
199+
);
197200
$entityMock = $this->createMock(\Magento\Catalog\Model\ProductLink\Link::class);
198201
$entityMock->expects($this->any())->method('getSku')->willReturn('');
199202
$entityMock->expects($this->any())->method('getLinkedProductSku')->willReturn('linkedProductSku');

app/code/Magento/Catalog/i18n/en_US.csv

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -823,3 +823,4 @@ Details,Details
823823
"The url has invalid characters. Please correct and try again.","The url has invalid characters. Please correct and try again."
824824
"Restricted admin is allowed to perform actions with images or videos, only when the admin has rights to all websites which the product is assigned to.","Restricted admin is allowed to perform actions with images or videos, only when the admin has rights to all websites which the product is assigned to."
825825
"Synchronize website specific attributes values","Synchronize website specific attributes values"
826+
"The parent product SKU is required for linking child products. Please ensure the parent product SKU is provided and try again.","The parent product SKU is required for linking child products. Please ensure the parent product SKU is provided and try again."

0 commit comments

Comments
 (0)