Yoast / Yoast-SEO-for-Magento2

Yoast SEO for Magento 2
Other
70 stars 28 forks source link

YoastSEO injects HTML into JSON AJAX requests #105

Open StephanStanisic opened 5 years ago

StephanStanisic commented 5 years ago

Magento 2.2.2 Php 7.1.22 YoastSEO 2.0.3

YoastSEO works fine after intall, but when I tried to swich attribute set inside a product I get the genertic "Technical error" message. I found out that Yoast is adding it's HTML inside the AJAX request for the switch of attribute set.

Ajax reqest send to change attributeset:

<div class="yoastScore-wrapper" data-bind="scope: 'yoastScore'">
    <div class="yoastScore-header">
        <span><strong>SEO Score</strong></span>
    </div>
    <div class="yoastScore admin__field">
        <span class="admin__field-label" data-bind="i18n: 'Keyword'"></span>
        <span data-bind="attr: {'class': keyword_class}"></span>
        <span data-bind="text: keyword_label"></span>
    </div>
    <div class="yoastScore admin__field">
        <span class="admin__field-label" data-bind="i18n: 'Readability'"></span>
        <span data-bind="attr: {'class': content_class}"></span>
        <span data-bind="text: content_label"></span>
    </div>
</div>
<script type="text/x-magento-init">
    {
        ".yoastScore": {
            "Magento_Ui/js/core/app": {
                "components": {
                    "yoastScore": {
                        "component": "MaxServ_YoastSeo/js/view/yoast-score"
                    }
                }
            }
        }
    }
</script>
{"types":{"dataSource":{"component":"Magento_Ui\/js\/form\/provider"},"html_content":{"extends":"product_form","component":"Magento_Ui\/js\/.....

Steps to reproduce:

jamieparkes commented 5 years ago

I too have noticed this. Really hope development starts again soon. I have so much trust and faith in Yoast based on past success using the WordPress version, I really don't want to use another extension/provider for Magento 2.

yanncharlou commented 5 years ago

Same problem here with magento 2.2.8.