Navigation always loads same page

I am experiencing a weird thing: a site that has been running for very long suddenly reacts strangely in Safari 11 (on High Sierra only!). The navigation seems to work, but it doesn’t: when I hover over a menu element I get the correct address shown in the status bar at the bottom of the page. When I click, it remains on the home page. When I right-click and chose “open in new tab” it correctly opens the right link (different page) in a new tab.
All other browsers work. I tested Safari 11 (Sierra) and various other lower versions on browserstack and all seem to work. How can I narrow down the issue? If you want to take a look, here’s the site: www.spider-murphy-gang.de

Your pages are sending everything within the div pageHeader to your index.html page so you may have Tidy Website links turned on.
You have some user defined javascript on your pages, probably within your settings, code, head tab:

<script type="text/javascript">
    window.onload=function() {
        document.getElementById("pageHeader").style.cursor = "hand";
        document.getElementById("pageHeader").style.cursor = "pointer";
        document.getElementById("pageHeader").onclick = function() {
            window.location.href="http://www.spider-murphy-gang.de";
        };
    } 

If you remove the last line the navigation works properly:

document.getElementById("pageHeader").onclick = function() {
    window.location.href="http://www.spider-murphy-gang.de";
};

Every time someone clicks within your pageHeader<div id="pageHeader">, which includes your navigation bar, they end up going to http://www.spider-murphy-gang.de which ends up, because of tidy website links, being index.html

1 Like

Dan, thanks for that observation. That did the trick. Strange thing is, that code has always been there and I didn’t change a thing. The site always worked. Until the latest version of Safari on High Sierra which couldn’t get it. Nontheless, the mistake was in the code, of course. I modified it to target the title only and now it works as expected. THANK YOU!

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.