• Resolved mclaurent

    (@mclaurent)


    Heya

    I am using Visual Composer and the free Yoast SEO on TwentySixteen but I am getting the following error whenever I load up the detail of a Grid Element. This error prevents me from creating or updating any posts of type ‘vc_grid_item’. The error I am getting in my console is:

    ReferenceError: wpseoPostScraperL10n is not defined – wp-seo-post-scraper-350.min.js:1:20951

    Any ideas what might cause this?

    Thanks

Viewing 14 replies - 1 through 14 (of 14 total)
  • Thread Starter mclaurent

    (@mclaurent)

    I am using VisualComposer 4.12.1 and Yoast 3.6.

    Thanks

    Thread Starter mclaurent

    (@mclaurent)

    I have now reverted down to version 3.1 which is the latest version without this problem ??

    Anybody have any ideas what could be at the root of this?

    Thanks
    Laurent

    I just discovered the same error when trying to use the Grid Builder. I had to disable the plugin when doing changes in VC Grid Builder.

    Yoast SEO version 3.5 and 3.6.1 tested.

    I could disable the plugin while making changes to the VC Grid Builder and later enable Yoast SEO Plugin again to temporarily resolve the issue.

    wp-seo-post-scraper-350.min.js?ver=3.5:1 Uncaught ReferenceError: wpseoPostScraperL10n is not defined(anonymous function) @ wp-seo-post-scraper-350.min.js?ver=3.5:1i @ jquery.js?ver=1.12.4:2fireWith @ jquery.js?ver=1.12.4:2ready @ jquery.js?ver=1.12.4:2K @ jquery.js?ver=1.12.4:2
    editor.js?ver=4.6.1:41 Uncaught TypeError: Cannot read property ‘get’ of undefinedswitchEditor @ editor.js?ver=4.6.1:41setContent @ backend.min.js?ver=4.12.1:6save @ backend.min.js?ver=4.12.1:6update @ backend.min.js?ver=4.12.1:6sync @ backend.min.js?ver=4.12.1:6save @ backbone.min.js?ver=1.2.3:1create @ backbone.min.js?ver=1.2.3:1vc.AddElementUIPanelBackendEditor.createElement @ grid-builder.min.js?ver=4.12.1:1dispatch @ jquery.js?ver=1.12.4:3r.handle @ jquery.js?ver=1.12.4:3

    THANK YOU. Was going nuts trying to figure out why my changes in Grid Builder would not save. Found this, deactivated Yoast while making changes, and – it worked.

    Hi @mclaurent, @fjalestad, @slomeli79

    I think that I just found root of this issue. Can you help me?

    https://github.com/Yoast/wordpress-seo/issues/6219
    I think that Visual Composer is source. Can you find file wp-content/plugins/js_composer/include/classes/vendors/plugins/class-vc-vendor-yoast_seo.php and try to replace function enqueueJs with:

    public function enqueueJs() {
            if ( wp_script_is( 'yoast-seo-post-scraper' ) ) {
                    wp_enqueue_script( 'vc_vendor_yoast_js', vc_asset_url( 'js/vendors/yoast.js' ), array( 'yoast-seo-post-scraper' ), WPB_VC_VERSION, true );
            }
    }
    Thread Starter mclaurent

    (@mclaurent)

    Heya

    Thanks for investigating.

    I can confirm that overwriting the enqueueJs function does get rid of the JavaScript error. I don’t have a support level with Visual Composer so I unfortunately cannot raise this with their team directly.

    Thanks
    Laurent

    Hello –

    Was anything ever figured out with this? Apparently this is causing a conflict with the Templatera plugin as well where you cannot edit templates. I tried applying the code above but that just breaks the site and having to deactivate Yoast every time I need to make an update is kind of cumbersome.

    Thanks.

    Same problem here. Yoast 4.7.1., Visual Composer 5.1.1. and Templatera 1.1.9.
    Have noticed this with older versions also, so I guess this will be incompatible for years to come. A shame as Yoast + VC is a very common combination.

    Thread Starter mclaurent

    (@mclaurent)

    @puregraphx if you use Yoast 3.1 you shouldn’t be encountering the problem anymore

    @mclaurent, as you can see, we are on 4.7.1 and the issue is still visible.

    Thread Starter mclaurent

    (@mclaurent)

    Yes that’s correct. You’d need to roll back to 3.1 as that version does not have this issue until the conflict is resolved.

    Oh sorry, i thought you meant it has been fixed since 3.1. But it has been broken since 3.1? That is more than a year and 35 updates!!

    They weren’t able to fix this issues in the 35 updates after 3.1.??

    @stodorovic

    thx this hot fix works for me ??

    I have the same issue.

    Yoast could define the variable before using it.

    wpseoPostScraperL10n is not defined

    so define it

    var wpseoPostScraperL10n = null;
    or
    var wpseoPostScraperL10n = {};
    or
    var wpseoPostScraperL10n;

    They could resolve this very easily.

    Thanks

    Andi

Viewing 14 replies - 1 through 14 (of 14 total)
  • The topic ‘Yoast SEO + Visual Composer Grid Elements: wpseoPostScraperL10n is not defined’ is closed to new replies.