-
Notifications
You must be signed in to change notification settings - Fork 9.4k
Quotes in product name causes JSON error on product page MAP What's This Popup #8059
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
@justenpeters thank you for your report. |
…roduct page MAP What's This Popup #8059 - Escape strings inside JavaScript context. - Added functional test variation to cover the bug.
…roduct page MAP What's This Popup #8059 - Modified the ticket ID for the newly created variation.
…roduct page MAP What's This Popup #8059 - remove annotation
…ON_ERROR MAGETWO-63116: [GitHub] Quotes in product name causes JSON error on product page MAP What's This Popup #8059
Backport ticket for 2.1-develop: MAGETWO-69708 |
@justenpeters thank you for your report. |
This issue seems to have resurfaced for me in Magento 2.2.4. Was not an issue in 2.2.3. Have fixed by formatting html characters in product name for breadcrumbs.phtml within Catalog module. |
Same issue appeared in 2.2.4. @harrigo - Could you please provide the fix you applied to breadcrumbs.phtml file? |
as a workaround you can change the template in your custom theme
<?php
/** @var \Magento\Theme\Block\Html\Breadcrumbs $block */
/** @var \Magento\Catalog\ViewModel\Product\Breadcrumbs $viewModel */
$viewModel = $block->getData('viewModel');
$breadCrumbConfig = [
'breadcrumbs' => [
'categoryUrlSuffix' => $block->escapeHtml($viewModel->getCategoryUrlSuffix()),
'useCategoryPathInUrl' => (int)$viewModel->isCategoryUsedInProductUrl(),
'product' => $viewModel->getProductName()
]
]
?>
<div class="breadcrumbs" data-mage-init='<?= $block->escapeHtml(json_encode($breadCrumbConfig)) ?>'></div> however the correct way to to do it would be creating the json config in the |
Issue is there in Magento 2.2.5 !!!! |
This issue also breaks Widget conditions in the admin panel if categories have an & in the name |
Seeing this issue in 2.2.5 |
I am also seeing this in 2.2.5 |
@inkobject I have the same problem as you, we sell products that are measured in feet and inches. I was able to work around this by using the Prime and Double Prime Symbols in my product names. https://en.wikipedia.org/wiki/Prime_(symbol) Kind of ridiculous that I had to do this, but on the other hand using the Prime symbols is typographically more correct. |
For the people reporting the issue in Magento 2.2.4 and 2.2.5, it's not the exact same issue as the original issue. Maybe better to watch these issues: #15037 & The real fix is in here: #15521, but that one can't be applied cleanly to Magento 2.2.5. You can find a patch which you can apply cleanly to 2.2.5 in #15631 (comment) Or you can wait for Magento 2.2.6, it should normally also contain the fix. Release date is supposed to be somewhere next week, or maybe the week after (but don't take my word for it). |
I have the same problem In Magento 2.4.6 :/ |
@nike1994: if you can reproduce it on a clean installation, please open a new issue with steps of how to reproduce it. |
Preconditions
Steps to reproduce
Expected result
Actual result
The text was updated successfully, but these errors were encountered: