Yoast-SEO-for-Magento2 icon indicating copy to clipboard operation
Yoast-SEO-for-Magento2 copied to clipboard

Add new product and change attributeset will give backend error

Open govereem opened this issue 6 years ago • 1 comments

In the ajax call this code is injected as json response Seems to be /vendor/maxserv/magento-module-yoastseo/view/adminhtml/templates/score.phtml

<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>

Wich causing the error message A technical problem with the server created an error. Try again to continue what you were doing. If the problem persists, try again later. Also attributes will not get loaded.

Url called: /admin/catalog/product/reload/type/simple/store/0/popup/1/componentJson/1/prev_set_id/33/key/...../?set=69&isAjax=true

Version 2.0.1

govereem avatar Aug 06 '18 11:08 govereem

Solved it for now by changing the /vendor/maxserv/magento-module-yoastseo/view/adminhtml/layout/yoastbox.xml

FROM line 6

        <referenceContainer name="content">
            <block class="MaxServ\YoastSeo\Block\Adminhtml\Score" name="yoast.score" template="MaxServ_YoastSeo::score.phtml" before="-" />
        </referenceContainer>

TO

        <referenceContainer name="page.content">
            <block class="MaxServ\YoastSeo\Block\Adminhtml\Score" name="yoast.score" template="MaxServ_YoastSeo::score.phtml" after="page.main.actions" />
        </referenceContainer>

govereem avatar Aug 06 '18 12:08 govereem