-
Notifications
You must be signed in to change notification settings - Fork 9.4k
Open
Labels
Area: CatalogComponent: CatalogIssue: ConfirmedGate 3 Passed. Manual verification of the issue completed. Issue is confirmedGate 3 Passed. Manual verification of the issue completed. Issue is confirmedPriority: P2A defect with this priority could have functionality issues which are not to expectations.A defect with this priority could have functionality issues which are not to expectations.Progress: ready for groomingReproduced on 2.4.xThe issue has been reproduced on latest 2.4-develop branchThe issue has been reproduced on latest 2.4-develop branch
Description
Preconditions and environment
- Magento 2.3.3 / Magento 2.4.2
Steps to reproduce
- Execute
bin/magento config:set catalog/fields_masks/meta_keyword '{{name}}, order {{name}}'or set manually - Login to Magento2 Backend
- Create a new product
- Set product name to "NEW PRODUCT"
- Check meta keywords
Expected result
The meta keywords should be set to NEW PRODUCT, order NEW PRODUCT
Actual result
The meta keywords are set to NEW PRODUCT, order {{name}} .
So the second occurrence is not replaced as expected.
Additional information
I think the substitution is done here?
magento2/app/code/Magento/Catalog/view/adminhtml/templates/catalog/product/edit.phtml
Line 198 in 1a7f152
| var value = self._masks[this].replace(self.varsRegexp, function(maskfieldName) { |
So the solution would be to use replaceAll instead of replace:
var value = self._masks[this].replaceAll(self.varsRegexp, function(maskfieldName) {
return $('#' + maskfieldName.slice(2, -2)).val();
});
Release note
No response
Triage and priority
- Severity: S0 - Affects critical data or functionality and leaves users without workaround.
- Severity: S1 - Affects critical data or functionality and forces users to employ a workaround.
- Severity: S2 - Affects non-critical data or functionality and forces users to employ a workaround.
- Severity: S3 - Affects non-critical data or functionality and does not force users to employ a workaround.
- Severity: S4 - Affects aesthetics, professional look and feel, “quality” or “usability”.
KrasnoshchokBohdan
Metadata
Metadata
Assignees
Labels
Area: CatalogComponent: CatalogIssue: ConfirmedGate 3 Passed. Manual verification of the issue completed. Issue is confirmedGate 3 Passed. Manual verification of the issue completed. Issue is confirmedPriority: P2A defect with this priority could have functionality issues which are not to expectations.A defect with this priority could have functionality issues which are not to expectations.Progress: ready for groomingReproduced on 2.4.xThe issue has been reproduced on latest 2.4-develop branchThe issue has been reproduced on latest 2.4-develop branch
Type
Projects
Status
Ready for Development