• Resolved DanielPtr

    (@danielptr)


    I’m trying to setting up a Dutch WordPress site. Today I’ve moved it to it’s definite domain (that was hard to do), but since I get an error when I’m going to https://houtskoolportret.nl/wp-login.php. The error refers to JavaScript, so seems. There’s nothing wrong as a result of the error, but it’s annoying and not as it should be.

    In Google Chrome the error is: TypeError: Cannot read property style of null
    In Firefox: TypeError: obj.firstChild.firstChild is null
    In Internet Explorer: Cannot retrieve the value style: the object is null or not defined

    On the Internet there’s much to find about this error, but I hadn’t written the JavaScript by myself, but it’s all WordPress JavaScript…

    Old backups don’t solve the problem.

    Could anyone help me? Thanks in advance!

Viewing 2 replies - 1 through 2 (of 2 total)
  • I think that the error is coming from your custom logo plugin. When I look at the source code I see this:

    <script type="text/javascript">
        //<![CDATA[
        window.onload = function() {
    	try {
    		var obj = document.getElementById('login'); if (obj) { obj.firstChild.firstChild.style.background = 'url(https://www.houtskoolportret.nl/wp-content/plugins/custom-logo/houtskoollogo_beheer.png) no-repeat center'; }
    	}
    	catch (e) {
    		var message = (e.description) ? e.description : e;
    		alert(message);
    	}
        };
        </script>

    I think that’s the code that creating the error.

    Thread Starter DanielPtr

    (@danielptr)

    You are brilliant! That was indeed the cause of the error. I’ve installed another plugin for the logo, and no problems so far. Thanks!

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘JavaScript error while logging in (wp-login.php)’ is closed to new replies.