Okay
  Public Ticket #1638548
JS Error with Quotes in product name
Closed

Comments

  • Kipperlenny started the conversation
    <div class="breadcrumbs" data-mage-init="{
        "breadcrumbs": {
            "categoryUrlSuffix": ".html",
            "useCategoryPathInUrl": 1,
            "product": "Putzbox "Colour", gefüllt"
        }
    }">
    </div>

    The Product Putzbox "Colour", gefüllt crashes the javascript /frontend/Mgs/unero/de_DE/mage/apply/main.js on line 51 (getData function).

    The console.log() shows this:


    {
        "breadcrumbs": {
            "categoryUrlSuffix": ".html",
            "useCategoryPathInUrl": 1,
            "product": "Putzbox "Colour", gefüllt"
        }
    }

    As you can see, the quotes are not escaped anymore and "Uncaught SyntaxError: Unexpected token C in JSON at position 125"

  • [deleted] replied

    Dear Kipperlenny,

    Thanks for your ticket,

    Could you please let me know what is your problem? I mean, on the frontend

  • Kipperlenny replied

    Many Errors following this JS error - because the javascript stops to execute.

    F.E. .tax-details double, Image Loading Animation will not go away,  the "Add to Cart" Button will not open the add to cart overlay etc.

    Working product (because no quotes in name) -> https://www.pferd-in-pink.de/fuehrstrick-mit-panikhaken-2m.html

    Not Working product (because quotes in name) -> https://www.pferd-in-pink.de/fleece-bandage-american-style.html

  • [deleted] replied

    Dear Kipperlenny,

    Thanks for your response,

    Could you please provide your site info ( site url, admin account and ftp access detail ) I will check for you

  •   Kipperlenny replied privately
  • [deleted] replied

    Dear Kipperlenny,

    Thanks for your info,

    I will check and get back to you as soon as done

  • [deleted] replied

    Dear Kipperlenny,

    I have checked and I think that it related to a module you installed, please take a look, I get this error when trying to access product detail

    https://www.pferd-in-pink.de/fleece-bandage-american-style.html

    it comes from "

    Webmeridian_ConfigurableDefault

    " module

  • Kipperlenny replied

    We fixed this error, but it's not from this module, because we started to develop it after this error :)

  • Kipperlenny replied

    We fixed the error from your screenshot, but not the one from the ticket. It's a problem with quotes in article names.

  • [deleted] replied

    Dear Kipperlenny,

    Thanks for your response,

    I will check and get back to you as soon as done or any questions

  • [deleted] replied

    Dear Kipperlenny,

    Thanks for your patience,

    The problem is not related to js error in console

    1) Image Loading Animation will not go away

    This is only css issue, I have addes some css code to Custom Style in admin, go to MGS -> Theme Settings -> Custom Style, you will see it

    2) the "Add to Cart" Button will not open the add to cart overlay

    This product

    https://www.pferd-in-pink.de/putzbox-colour-gefuellt.html

    now it is out of stock because it's associate products have quantity is 0, so now you can't select option, so when you click "Add to Cart", it only loads again

    3) There is a problem with lightbox, I have also fixed it.

    app/design/frontend/Mgs/unero/Magento_Catalog/templates/product/view/gallery.phtml