• Resolved David Bee

    (@davidbawiec)


    First off: what a marvelous plugin. Thanks for all your fantastic work!

    Have to report a bug. WLCMS throws the following JavaScript error when in the Gutenberg editor:
    Uncaught ReferenceError: blockLoadedInterval is not defined
    This errors blocks many save functions in the editor, particularly when attaching media.

    Steps to reproduce:
    1. Enable the Hide WordPress Logo and Links option and the Gutenberg Exit Button.
    2. Go to Gutenberg post edit screen. Error will be in the browser console.

    The Fix:
    Pretty sure this has to do with the fact that you modified the original reference code a tad (in wp-content/plugins/white-label-cms/includes/classes/Admin_Settings.php):

    wlcms_add_js(' var wlcms_change_back = setInterval(function() {if(jQuery(".edit-post-fullscreen-mode-close svg").length > 0 ){ jQuery(".edit-post-fullscreen-mode-close").html("'. $image .'"); clearInterval(blockLoadedInterval);}}, 100);');
    

    As such, blockLoadedInterval truly isn’t defined anywhere. I think that last bit of code should read clearInterval(wlcms_change_back);

    • This topic was modified 4 years, 9 months ago by David Bee.
Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)

The topic ‘Uncaught ReferenceError: blockLoadedInterval is not defined’ is closed to new replies.