Viewing 8 posts - 1 through 8 (of 8 total)
  • Author
    Posts
  • #1189373

    Hi, it is impossible to edit the page, it is completely white. What can be a problem?
    Access token in private data
    thanks in advance

    #1189574

    Hey czar,

    I’m seeing a lot of error messages on the backend, what happens if you disable all plugins to see if there is a conflict coming from any of them?

    Best regards,
    Rikard

    #1189642

    Hi Rikard, thanks for your answer. Now all plugins are disabled but problem remains. Also I have a blank page even if I create a new one.
    I also reloaded enfold with ftp but nothing to do …

    • This reply was modified 4 years, 9 months ago by czar.
    #1189721

    Hi,

    Thanks for the update. I commented out this code in your functions.php file and the edit page works after that:

    <?php 
    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’m not sure what exactly the code is supposed to do, but it seems like it’s causing problems on your site.

    Best regards,
    Rikard

    #1189819

    Rikard thanks for your interest, I didn’t remember that code, from this post (kinsta.com/blog/defer-parsing-of-javascript/), it had never caused problems. I will use other method. Thanks again

    #1189937

    Hi,

    Thanks for the update. Please let us know if you should need any further help on the topic.

    Best regards,
    Rikard

    #1189967

    Hi, for those interested in implementing this functionality, this is correct code in function.php

    // Defer Parsing of JavaScript in WordPress via functions.php file
    // Learn more at https://technumero.com/defer-parsing-of-javascript/ 
    
    function defer_parsing_js($url) {
    //Add the files to exclude from defer. Add jquery.js by default
        $exclude_files = array('jquery.js');
    //Bypass JS defer for logged in users
        if (!is_user_logged_in()) {
            if (false === strpos($url, '.js')) {
                return $url;
            }
    
            foreach ($exclude_files as $file) {
                if (strpos($url, $file)) {
                    return $url;
                }
            }
        } else {
            return $url;
        }
        return "$url' defer='defer";
    
    }
    add_filter('clean_url', 'defer_parsing_js', 11, 1);

    Best regards
    czar

    #1190282

    Hi,

    Thanks a lot for sharing! It’s much appreciated :-)

    Best regards,
    Rikard

Viewing 8 posts - 1 through 8 (of 8 total)
  • You must be logged in to reply to this topic.