Skip to content

Commit c359e96

Browse files
author
Mohan Ahuja
committed
ACP2E-345: Unable to save product URL key with a hyphen "-" at end.
- Fixed static and semantic failures
1 parent 793b8c8 commit c359e96

File tree

2 files changed

+14
-9
lines changed

2 files changed

+14
-9
lines changed

app/code/Magento/Catalog/Setup/Patch/Data/UpdateProductUrlKey.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
* Copyright © Magento, Inc. All rights reserved.
44
* See COPYING.txt for license details.
55
*/
6+
declare(strict_types=1);
67

78
namespace Magento\Catalog\Setup\Patch\Data;
89

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

Lines changed: 13 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -405,21 +405,25 @@ protected function customizeNameListeners(array $meta)
405405
*
406406
* @param array $meta
407407
* @return array
408-
* @since 101.0.0
408+
* @since 101.0.1
409409
*/
410410
protected function customizeUrlKeyField(array $meta): array
411411
{
412-
$tooltip = [
413-
'link' => 'https://docs.magento.com/user-guide/catalog/catalog-urls.html',
414-
'description' => __(
415-
'The URL key should consist of lowercase characters with hyphens to separate words.'
416-
),
417-
];
418412
$switcherConfig = [
419-
'tooltip' => $tooltip,
413+
'tooltip' => [
414+
'link' => 'https://docs.magento.com/user-guide/catalog/catalog-urls.html',
415+
'description' => __(
416+
'The URL key should consist of lowercase characters with hyphens to separate words.'
417+
),
418+
],
420419
];
421420

422-
$path = $this->arrayManager->findPath(ProductAttributeInterface::CODE_SEO_FIELD_URL_KEY, $meta, null, 'children');
421+
$path = $this->arrayManager->findPath(
422+
ProductAttributeInterface::CODE_SEO_FIELD_URL_KEY,
423+
$meta,
424+
null,
425+
'children'
426+
);
423427
$meta = $this->arrayManager->merge($path . static::META_CONFIG_PATH, $meta, $switcherConfig);
424428

425429
return $meta;

0 commit comments

Comments
 (0)