Forum Replies Created

Viewing 3 replies - 1 through 3 (of 3 total)
  • Hi All,

    I encounter this problem when the administration bar is shown at the top of the page. I simply log out to rectify the problem.

    Obviously its not an issue for casual visitors since they wouldn’t be recognized as a WordPress user.

    Cheers,

    Sam

    Hi robpannell,

    I think I’ve been able to solve this problem and it seems to be a problem with the javascript located in menu.js

    I managed to trace the entire script to work out how it works and it is related to some code on lines around 181-8. I’m assuming what this code does is to work out when the document has been loaded by inserting a snippet into the head of the document and waiting for it to be rendered (setting the readyState of the element to ‘complete’).

    Eventually, after a few attempts the readystate is finally set to ‘complete’ and loadMenus() is called (lines 150-76). On line 163 the script attempts to get the menubar and load all the menus associated with it. The only problem I’ve encountered is that document.getElementById(‘menu’) returns null which leads me to believe that it hasn’t been rendered yet.

    To wait until the menu has been rendered I waited for the document’s readyState to be set as complete and then called loadMenus();

    Original Code (lines 182-88):

    document.write('<script id="__ie_onload_for_inove" defer src="javascript:void(0)"></script>');
    	var script = document.getElementById('__ie_onload_for_inove');
    	script.onreadystatechange = function() {
    		if (script.readyState == 'complete') {
    			loadMenus();
    		}
    	}

    New Code:

    //document.write('<script id="__ie_onload_for_inove" defer src="javascript:void(0)"></script>');
    	//var script = document.getElementById('__ie_onload_for_inove');
    	document.onreadystatechange = function() {
    		if (document.readyState == 'complete') {
    			loadMenus();
    		}
    	}

    Cheers,

    Sam

    Forum: Fixing WordPress
    In reply to: Permalinks Issue
    Thread Starter sampdelaney

    (@sampdelaney)

    Managed to this problem myself. Turns out that since migrating the site to a different directory, there existed php files with the same name as the wordpress page name.

Viewing 3 replies - 1 through 3 (of 3 total)