-
Notifications
You must be signed in to change notification settings - Fork 9.3k
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
Issue when we create a new product with double quotes in the title #15631
Comments
Hello,
path and replace with below code.
I hope it will help you !!. |
Thank you @emiprotech , I'll try that solution and hopefully with the upcoming of Magento 2.2.5 the issue will be solved. |
It's not in 2.2.5. |
And also
|
In case anyone's interested, here's the patch we use to get it working on Magento 2.2.5. Apply it to the Magento_Catalog module: ENGCOM-1703-Catalog.diff.txt Fix is already in 2.2-develop branch as @DanielRuf noticed, by this PR: #15521 The patch isn't an exact implementation of the PR, since other very small commits prevented applying that PR cleanly on Magento 2.2.5, but the patch I've attached above does apply cleanly to Magento 2.2.5 |
We use 2.2.5 and it is not fixed. The article name is not escaped. We had to overwrite the ViewModel. |
|
I know, have you checked the patch or the PR? ;) |
@magento-engcom-team give me 2.2.5 instance |
Hi @DanielRuf. Thank you for your request. I'm working on Magento 2.2.5 instance for you |
Hi @DanielRuf, here is your Magento instance. |
@DanielRuf: it is not fixed in 2.2.5 like I said, you need that patch I've attached to make it work in 2.2.5, hope this is a bit more clear now :) |
Well, the eng team wrote it will be fixed in 2.2.5. Also it is not fixed in 2.2-develop, I see no escaping like it should be used. |
Yes, it's like those other fixes that were supposed to go in 2.2.5, the cut of point/date was incorrectly made and so a bunch of fixes that were supposed to go in 2.2.5 didn't make it. Like the other one you fixed for the area code, remember ;). It's the same thing for this fix, it didn't make it in 2.2.5, so it will probably be in 2.2.6 Additional info: fix #15347 was very incorrect, the wrapper |
@magento-engcom-team give me 2.2-develop instance |
Hi @DanielRuf. Thank you for your request. I'm working on Magento 2.2-develop instance for you |
Hi @DanielRuf, here is your Magento instance. |
Can you please show me the page of the 2.2-develop instance, your screenshot is from the 2.2.5 instance. The fix is definitely here though: https://github.com/magento/magento2/blob/2.2-develop/app/code/Magento/Catalog/view/frontend/templates/product/breadcrumbs.phtml |
Weird, the one from the dev branch does not load the page, wait a moment. |
Weird, maybe some other new bug, or some caching problem maybe, dunno. Anyways, I've tested the patch I've refered to above a couple of weeks ago on a 2.2.5 instance, and it solved the issue with the incorrectly escaped characters ( The patch is the sum of the last 4 commits in the history of that file: https://github.com/magento/magento2/commits/2.2-develop/app/code/Magento/Catalog/view/frontend/templates/product/breadcrumbs.phtml |
This works: https://i-15631-2-2-develop.engcom.dev.magento.com/test-2-product.html But imho it is not underatandable why the move was needed and why different methods are used and not these values internally escaped for all view and consumers. It feels "hacky". And it also feels bad to still read that it will be in a specific release and it will not be there (this is a critical issue for production shops). Imho there are too many changes happening here in this part. |
I agree, some PR's were accepted too fast without a decent review. But I like the end result, instead of having to escape every single value of that json structure one by one in the phtml (which was done incorrectly), they've chosen to "simplify" it with a single |
Which is bad for Magento and its reputation and expectations of fixes. |
Definitely. But shouldn' we do this then in much more modules? And can this not be done in the phtml too? What does the ViewModel provide here what the phtml can not (availability of helper methods).
Probably also possible in the phtml file(s) I guess? |
Welcome to Magento :) I can't really answer about ViewModel vs Block vs phtml, I don't know the right answer to that. |
Hi @DanielRuf I was reproduce this issue, with this error in console log |
The issue still exists in 2.2.5. This solution seems to help fix the issue. |
Hi @cstergianos. Thank you for working on this issue.
|
@magento-engcom-team it seems that this issue is not reproducible anymore.Please take a look at the following screenshot for more details: https://drive.google.com/file/d/1_aJQh2gFpdKy5WVlQdwgOkjhsubKHyu6/view |
For the ones that still use the old breadcrumbs way (because of custom megamenu that don't work with magento's breadcrumb js, that's what i put in my magento2/app/design/frontend/me/mytheme/Magento_Catalog/templates/product/breadcrumbs.phtml Using json_encode seems to me a simpler and cleaner way to pass init parameters.
|
Preconditions
Steps to reproduce
Expected result
Actual result
Kind regards!
The text was updated successfully, but these errors were encountered: