Closed justenpeters closed 7 years ago
@justenpeters thank you for your report. I have created internal ticket for it: MAGETWO-63116
Backport ticket for 2.1-develop: MAGETWO-69708
@justenpeters thank you for your report. The fix for this issue is already available in release 2.2.0
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
magento/vendor/magento/module-catalog/view/frontend/templates/product/breadcrumbs.phtml
<?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 \Magento\Catalog\ViewModel\Product\Breadcrumbs
View Model and use the internal json serializer I think
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 In my use case, I sell plants. Double and single quotes have a definite meaning in naming conventions: species, hybrids, cultivars etc. Not being able to use double quotes makes things problematic for me.
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: https://github.com/magento/magento2/issues/15037 & https://github.com/magento/magento2/issues/15268 & https://github.com/magento/magento2/issues/15491 & https://github.com/magento/magento2/issues/15631 & https://github.com/magento/magento2/issues/17967
The real fix is in here: https://github.com/magento/magento2/pull/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 https://github.com/magento/magento2/issues/15631#issuecomment-419523038
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. It won't help with commenting on a 5 year old issue, it's most likely a different problem.
Preconditions
Steps to reproduce
Expected result
Actual result