Skip to content

Commit ab59e0e

Browse files
author
Mohan Ahuja
committed
ACP2E-345: Unable to save product URL key with a hyphen "-" at end.
- Optimizing code for the semantic version failures
1 parent f21a00e commit ab59e0e

File tree

3 files changed

+19
-78
lines changed

3 files changed

+19
-78
lines changed

app/code/Magento/Catalog/Ui/DataProvider/Product/Form/Modifier/General.php

Lines changed: 19 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -389,14 +389,31 @@ protected function customizeNameListeners(array $meta)
389389
);
390390

391391
$namePath = $this->arrayManager->findPath(ProductAttributeInterface::CODE_NAME, $meta, null, 'children');
392-
393-
return $this->arrayManager->merge(
392+
$meta = $this->arrayManager->merge(
394393
$namePath . static::META_CONFIG_PATH,
395394
$meta,
396395
[
397396
'valueUpdate' => 'keyup'
398397
]
399398
);
399+
400+
$urlKeyConfig = [
401+
'tooltip' => [
402+
'link' => 'https://docs.magento.com/user-guide/catalog/catalog-urls.html',
403+
'description' => __(
404+
'The URL key should consist of lowercase characters with hyphens to separate words.'
405+
),
406+
],
407+
];
408+
409+
$urkKeyPath = $this->arrayManager->findPath(
410+
ProductAttributeInterface::CODE_SEO_FIELD_URL_KEY,
411+
$meta,
412+
null,
413+
'children'
414+
);
415+
416+
return $this->arrayManager->merge($urkKeyPath . static::META_CONFIG_PATH, $meta, $urlKeyConfig);
400417
}
401418

402419
/**

app/code/Magento/Catalog/Ui/DataProvider/Product/Form/Modifier/Seo.php

Lines changed: 0 additions & 72 deletions
This file was deleted.

app/code/Magento/Catalog/etc/adminhtml/di.xml

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -162,10 +162,6 @@
162162
<item name="class" xsi:type="string">Magento\Catalog\Ui\DataProvider\Product\Form\Modifier\LayoutUpdate</item>
163163
<item name="sortOrder" xsi:type="number">160</item>
164164
</item>
165-
<item name="seo_update" xsi:type="array">
166-
<item name="class" xsi:type="string">Magento\Catalog\Ui\DataProvider\Product\Form\Modifier\Seo</item>
167-
<item name="sortOrder" xsi:type="number">170</item>
168-
</item>
169165
</argument>
170166
</arguments>
171167
</virtualType>

0 commit comments

Comments
 (0)