Exclude wp-login & Admin area
-
The issue happens on wp-login.php
Uncaught SyntaxError: missing ) after argument list @ wp-login.php?redirect_to=..... Uncaught ReferenceError: wp is not defined @ wp-login.php?redirect_to=.....navigates to this line of code :
<script type='text/javascript'>( 'fetch' in window ) || document.write( '<script src="http://website.com/wp-includes/js/dist/vendor/wp-polyfill-fetch.min.js?ver=3.0.0' defer "></scr' + 'ipt>' ); ...</script>as described here:
WordPress v5.0.3 Gutenberg & JS error “Uncaught SyntaxError: missing ) after argument list”The problem was in the PHP hook added defer to script
The solve: Delete/disable the adding ‘defer’ PHP-hook or add some conditions to not touch Gutenberg scripts.
which is not possible yet to configure from the Plugin settings.
any help?
# UPDATE
i temporarily fixed this from the plugin
async-javascript/async-javascript.phpby also checking if current page is wp-login then require asyncjsBackendClass.php// Check if current page is wp-login.php function is_wplogin(){ $ABSPATH_MY = str_replace(array('\\','/'), DIRECTORY_SEPARATOR, ABSPATH); return ((in_array($ABSPATH_MY.'wp-login.php', get_included_files()) || in_array($ABSPATH_MY.'wp-register.php', get_included_files()) ) || (isset($_GLOBALS['pagenow']) && $GLOBALS['pagenow'] === 'wp-login.php') || $_SERVER['PHP_SELF']== '/wp-login.php'); } if (is_admin() || is_wplogin()) { require_once('asyncjsBackendClass.php'); // etc.. } // else..but once the plugin updates. it will revert to yours. so? i suggest adding a checkbox to give an option to exclude wp-login from the plugin settings.
The topic ‘Exclude wp-login & Admin area’ is closed to new replies.