• Resolved hdsteve

    (@hdsteve)


    On a page the contains the Elementor YouTube widget, if the user has not accepted Marketing cookies, the console shows the following error:

    Uncaught TypeError: Cannot read property ‘runReadyTrigger’ of undefined

    This refers to the following code block added by Complianz:

    jQuery(document).ready(function ($) {
    				$(document).on("cmplzRunAfterAllScripts", cmplz_elementor_fire_initOnReadyComponents);
    				function cmplz_elementor_fire_initOnReadyComponents() {
    					$('[data-cmplz-elementor-settings]').each(function (i, obj) {
    						if ( $(this).hasClass('cmplz-activated') ) return;
    						$(this).addClass('cmplz-activated' );
    						$(this).data('settings', $(this).data('cmplz-elementor-settings'));
    
    						var blockedContentContainer = $(this);
    						blockedContentContainer.animate({"background-image": "url('')"}, 400, function () {
    							//remove the added classes
    							var cssIndex = blockedContentContainer.data('placeholderClassIndex');
    							blockedContentContainer.removeClass('cmplz-blocked-content-container');
    							blockedContentContainer.removeClass('cmplz-placeholder-' + cssIndex);
    						});
    						elementorFrontend.elementsHandler.runReadyTrigger( $(this) );
    					});
    				}
    			})

    specifically, the error is thrown on this line

    elementorFrontend.elementsHandler.runReadyTrigger( $(this) );

    I guess that Youtube failing to load is expected behaviour if cookies are not accepted? But the error message suggests an unanticipated error condition so I thought I should report it in case it indicates incorrect behaviour by the plugin.

Viewing 8 replies - 1 through 8 (of 8 total)
  • I would like to add that with Elementor YT widget, even when Cookies are accepted (Complianz is configured as YT are embedded + use placeholder), the loading of the YT movies is a hit and miss.
    Some videos load, some remain as placeholder without the play button (so unable to play).

    Plugin Contributor Aert Hulsebos

    (@aahulsebos)

    Hi @puregraphx, @hdsteve,

    Are you both running the latest Elementor and Complianz?

    Besides that, are you using any other Elementor Add-ons?

    Our current implementation seems to work without errors; https://demo.complianz.io/placeholders/youtube/

    Let me know! regards Aert

    Elementor and Elementor Pro, both on v3.2.1
    Complianz 5.0.0
    Happy Elementor Addons 2.24.0

    Plugin Contributor Aert Hulsebos

    (@aahulsebos)

    Hi @puregraphx,

    Can you update Complianz to the latest version?

    Try again,

    If that doesn’t work, disable Happy Elementor Add-ons (for 10 sec)

    And try again,

    One of these should do the trick, we will continue afterwards,

    regards Aert

    5.0.0. is the latest version available, update to what?
    Disabled Happy Add-ons, does not help.
    runReadyTrigger error still showing.

    Plugin Contributor Aert Hulsebos

    (@aahulsebos)

    Hi @puregraphx,

    Could you post the URL where this is happening, I can’t reproduce the issue at our end, Aert

    Thread Starter hdsteve

    (@hdsteve)

    Hi @aahulsebos – it seems to me that your patch update from 5.0.0 to 5.0.1 may have fixed this problem. I am not seeing it since updating.

    Edit: I needed to install the Complianz update then clear all cookies, localstorage and sessionstorage, but since then the error has not recurred.

    • This reply was modified 3 years, 7 months ago by hdsteve.
    Plugin Contributor jarnovos

    (@jarnovos)

    Hello @hdsteve,

    We have a fix ready for the YouTube video’s in Elementor, which is available for download here: https://we.tl/t-Xlg14b72Na

    To install: WordPress Dashboard > Plugins, click Add New and upload the file you just downloaded. Select “Replace” when you are prompted to.

    Kind regards,
    Jarno

Viewing 8 replies - 1 through 8 (of 8 total)
  • The topic ‘Elementor Youtube Widget causes Complianz to Throw Javascript Error’ is closed to new replies.