-
AuthorPosts
-
March 2, 2020 at 9:47 am #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 advanceMarch 3, 2020 at 5:59 am #1189574Hey 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,
RikardMarch 3, 2020 at 10:04 am #1189642Hi 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, 8 months ago by czar.
March 3, 2020 at 1:44 pm #1189721Hi,
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,
RikardMarch 3, 2020 at 7:48 pm #1189819Rikard 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
March 4, 2020 at 8:36 am #1189937Hi,
Thanks for the update. Please let us know if you should need any further help on the topic.
Best regards,
RikardMarch 4, 2020 at 9:24 am #1189967Hi, 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
czarMarch 5, 2020 at 4:10 am #1190282 -
AuthorPosts
- You must be logged in to reply to this topic.