magento/magento2#35670: Meta tags auto generation: variables cannot be used multiple times#40412
Conversation
…ltiple times - fixed issue with multiple identical placeholders in catalog fields masks not being replaced correctly
|
Hi @MaximLogic. Thank you for your contribution!
Allowed build names are:
You can find more information about the builds here For more details, review the Code Contributions documentation. |
|
The security team has been informed about this pull request due to the presence of risky security keywords. For security vulnerability reports, please visit Adobe's vulnerability disclosure program on HackerOne or email psirt@adobe.com. |
|
@magento run all tests |
|
@magento run WebAPI Tests |
|
@magento run all tests |
|
@magento run all tests |
engcom-Hotel
left a comment
There was a problem hiding this comment.
Hello @MaximLogic,
Thank you for the contribution!
The changes looks good to us. But a small minor change requested below.
|
@magento run Database Compare, Functional Tests B2B, Functional Tests CE, Functional Tests EE, Integration Tests, Static Tests, Unit Tests, WebAPI Tests |
…ltiple times - reverted copyright change
|
@magento run all tests |
|
@magento run all tests |
|
Hi @MaximLogic, Thanks for the collaboration & contribution! ✔️ QA PassedPreconditions:
Steps to reproduce
Before: ✖️
After: ✔️
Builds are failed. Hence, moving this PR to Extended Testing. Thanks |
|
@magento run all tests |
|
@magento run Functional Tests B2B, Functional Tests CE, Functional Tests EE |
|
Few test failure from Functional B2B, and EE are not consistent in recent 2 builds. They neither part of PR nor failing because of the PR changes. Seems to be flaky. The consistent failures are known issues and have the open JIRAs for them. Hence moving the PR to Merge in Progres.. Functional B2B Run 1:
Known Issues: |
37a25f0
into
magento:2.4-develop








Description (*)
According to issue #35670, when a field mask contains the same placeholder multiple times (e.g.,
{{name}}, order {{name}}), only the first occurrence was being replaced. This happened becausestring.replace()only replaces the first match by default.Changed the replacement logic in
import-handler.jsto usesplit().join()pattern instead, which replaces all occurrences of the placeholder. This ensures that masks like{{name}}, order {{name}}correctly produce "Product Name, order Product Name" instead of "Product Name, order {{name}}".Related Pull Requests
Fixed Issues (if relevant)
Manual testing scenarios (*)
bin/magento config:set catalog/fields_masks/meta_keyword '{{name}}, order {{name}}'{{name}}are replaced correctlyQuestions or comments
Contribution checklist (*)