-
Notifications
You must be signed in to change notification settings - Fork 9.4k
Meta tags auto generation: variables cannot be used multiple times #35670
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
Hi @schnere. Thank you for your report.
Make sure that the issue is reproducible on the vanilla Magento instance following Steps to reproduce. To deploy vanilla Magento instance on our environment, Add a comment to the issue:
For more details, review the Magento Contributor Assistant documentation. Add a comment to assign the issue: To learn more about issue processing workflow, refer to the Code Contributions.
🕙 You can find the schedule on the Magento Community Calendar page. 📞 The triage of issues happens in the queue order. If you want to speed up the delivery of your contribution, join the Community Contributions Triage session to discuss the appropriate ticket. ✏️ Feel free to post questions/proposals/feedback related to the Community Contributions Triage process to the corresponding Slack Channel |
Hi @engcom-November. Thank you for working on this issue.
|
Hi @schnere , |
Hi @engcom-November , thanks for your reply. Why would someone use a variable twice not expecting it to get replaced twice? In my opinion there are use cases to use a variable in meta tags more than once, for example as meta description: Furthermore I think that, if this might not be a use case for anyone, it would not be a problem to replace the variable more than once. So the fix is simple and will not cause problems for anyone, but would be a solution for some? |
Hi @schnere , |
Hi @schnere, Thanks for your reporting and collaboration. We have tried to reproduce the issue in Latest 2.4-develop instance and the issue is reproducible.Kindly refer the sceenshots. ![]() The meta keywords are set to NEW PRODUCT, order {{name}}. Hence Confirming the issue. Thanks. |
✅ Jira issue https://jira.corp.adobe.com/browse/AC-14626 is successfully created for this GitHub issue. |
✅ Confirmed by @engcom-Bravo. Thank you for verifying the issue. |
Preconditions and environment
Steps to reproduce
bin/magento config:set catalog/fields_masks/meta_keyword '{{name}}, order {{name}}'
or set manuallyExpected 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
So the solution would be to use
replaceAll
instead ofreplace
:Release note
No response
Triage and priority
The text was updated successfully, but these errors were encountered: