Viewing 7 posts - 1 through 7 (of 7 total)
  • Author
    Posts
  • #784721

    Hi folks! I’m noticing some trouble on my site with the WYSIWYG editor within the Avia framework on my site. I’m running Enfold 4.0.5.

    Here’s what I see:
    Screenshot of Text Block editor

    The standard tool bar for the normal WordPress default editor is usually what we see in that environment. But even when I use the Default Editor, I can’t access the “Visual” tab to compose a page. The new page/post defaults to the “Text” tab. And when I click on the “Visual” tab, nothing happens. Here’s what I see:
    Screenshot of Add New Page dialog showing Text editor

    I have disabled plugins, but the issue remains. I switched to the 2017 theme, and the issue disappeared.

    What has happened? Has an Enfold update changed the compose environment for the Text Block element? Has it also affected the default WordPress formatting tools in the Default Editor? Please advise. If you need access to my site, please let me know. Thanks!

    #785282

    Hey AJDesignCo,

    Could you please give us a link to your website, we need more context to be able to help you.

    Best regards,
    Victoria

    #785441

    Apologies for leaving out that critical detail! Here is my domain.

    I also added a login in the private content area.

    #785454

    Hi,

    Thanks for providing the login, I’ve checked the backend and I can see this js error:

    Uncaught TypeError: Cannot read property 'canvas' of undefined
        at Function.b.closeAllTags (quicktags.min.js?ver=4.7.4:1)
        at d (editor.min.js?ver=4.7.4:1)
        at HTMLDocument.<anonymous> (editor.min.js?ver=4.7.4:1)
        at e (tinymce.min.js?ver=4506-20170408:2)
        at HTMLDocument.m (tinymce.min.js?ver=4506-20170408:2)
        at Object.trigger (load-scripts.php?c=0&load[]=jquery-core,jquery-migrate,utils,plupload&ver=4.7.4:3)
        at Object.a.event.trigger (load-scripts.php?c=0&load[]=jquery-core,jquery-migrate,utils,plupload&ver=4.7.4:9)
        at HTMLButtonElement.<anonymous> (load-scripts.php?c=0&load[]=jquery-core,jquery-migrate,utils,plupload&ver=4.7.4:3)
        at Function.each (load-scripts.php?c=0&load[]=jquery-core,jquery-migrate,utils,plupload&ver=4.7.4:2)
        at a.fn.init.each (load-scripts.php?c=0&load[]=jquery-core,jquery-migrate,utils,plupload&ver=4.7.4:2)

    I have found out this code in your functions.php that’s causing the issue:

    function defer_parsing_of_js ( $url ) {
    if ( FALSE === strpos( $url, '.js' ) ) return $url;
    if ( strpos( $url, 'jquery.js' ) ) return $url;
    return "$url' defer ";
    }
    add_filter( 'clean_url', 'defer_parsing_of_js', 11, 1 );

    I have replaced it with this code which should fix the issue:

    if (!(is_admin() )) {
        function defer_parsing_of_js ( $url ) {
            if ( FALSE === strpos( $url, '.js' ) ) return $url;
            if ( strpos( $url, 'jquery.js' ) ) return $url;
            return "$url' defer onload='";
        }
        add_filter( 'clean_url', 'defer_parsing_of_js', 11, 1 );
    }

    Let us know if it’s all good :)

    Best regards,
    Nikko

    #785790

    That resolved the issue. Thank you!

    Do you have any idea what caused it? I had been running a minify plugin. I was also using W3 Total Cache, but I switched to WP Super Cache.

    #785805

    Hi,

    I’m not really sure why but for some reason deferring the javascript on your backend causes some issue and produces some js error, the only solution I made was to make sure not to defer javascript when in the wp dashboard but still allow it on the frontend. :)

    Best regards,
    Nikko

    #785996

    OK, thanks for your assistance and the explanation. I appreciate it!

Viewing 7 posts - 1 through 7 (of 7 total)

The topic ‘Some Issues with Visual compose environment of Text Block element’ is closed to new replies.