Link on site correct in build & locally, but incorrect for live site

I have a site at Paul Hollywood's Handshake Collection from The Great British Bake Off and in the “How?” section, there is a link to my LinkedIn profile.
In the repository for my code, when run locally and also in the local build, this URL is correct, but on the live site, it is to the homepage.

Can anyone help me figure out what is going on here?

Thank you

The source HTML of your webpage still seems to have the correct URL.

Maybe it’s the JavaScript or something that’s changing the URL once the content loads.

1 Like

Why would this be happening only on the live, deployed site though? If it were to do with JavaScript, wouldn’t that also happen when run locally?

Yes it should happen everywhere, and probably none of us would have an explanation as to why that’s happening. If you share your source code though, debugging this might get easier.

Here is a link to the source code:GitHub - sebzapata/HollywoodHandshakes: The definitive collection of Paul Hollywood's infamous handshakes.

Sadly, even after multiple attempts, the Node Modules for this project don’t install successfully for me and from the search results, the problem seems to be that I’m using Windows. I’ll try to debug this further, but doesn’t seem likely that it’ll happen soon.

I see.
I’ll have a go at seeing if I can remove any of the dependencies in case one of those is causing an issue.
Thank you for helping me with this :slight_smile:

Not sure if this is helpful, but I found the commit which no longer had the functioning link. SEO updates · sebzapata/HollywoodHandshakes@af1f6cb · GitHub
It’s the addition of a robots.txt and sitemap.xml file.

Could these be the cause of the issue?

No, robots.txt and sitemap.xml have no control over your webpage, so it’s unlikely. Maybe something else also changed?

I’m seeing that the About.tsx file was also changed. Try reverting to see if it gets you exactly back to the correct state.

Yup, that’s working now.
That’s really strange though! Any thoughts on why it could be doing that?

I initially got rid of my email as I didn’t think it was a good idea having my email freely available online like that.
Is that something I should be cautious about, or am I being a little overly paranoid?

Hi @sebzapata,

Welcome to the Netlify Community! As a big fan of the Great British Bake Off, I was excited to see your site :handshake:

It looks like you and @hrishikesh have worked out what was happening here! I did just want to chime in on your last question regarding having your email freely available online. It is a best practice to be cautious and limit where your email is publicly shared, as this will reduce the spam you receive as well as protect you against unwanted outreach.

Again, welcome to the Netlify Community! We are glad you are here. :netliconfetti:

Thank you :slight_smile:

I’m still not 100% sure why it’s happening though.
I’ve removed my email, and reverted it back to how it was previously, and the issue has come back.
If I disable JavaScript though, the problem goes away.

Do you have any thoughts on how JS could be causing this?

Thanks again

Oh that’s an interesting result. Disabling JS fixes it so we can probably confirm it’s the JS that’s doing something wrong.

I had seen your compiled JS and it seemed to append all these elements which your HTML already has. So it seemed suspicious to me but the HTML that it was appending seemed to be correct, so I’m quite puzzled myself too.

Maybe you can check how your JS files are being generated and what’s going into them.

Later today I’ll give another shot at installing Node Modules for this project so I can actually check it myself.

Also, I read this just now. What happens if you only change the e-mail line to the LinkedIn link? Since everything is working fine in that build, I suppose just changing one line won’t create a problem.

And by the way, do you have any idea what index_bundle.js file is doing? That seems to be the cause of the error.

Not entirely sure what you mean by changing the email line to the LinkedIn link, but I’ve changed what was the email <li> to duplicate the LinkedIn one. The deployment of that is here. Both links work as they should.

In all honesty, I started putting together this site over a year ago, whilst I was still learning what I was doing, so I’m not 100% sure, but it’s used in the webpack.config file as can be seen below.

I hope that’s of some use for you.


After looking into the code, seems like that file is required for rendering the home page’s accordion. Or else I’d said, disable the file.

At this stage, I’m really out of ideas as to why this is happening, especially because it’s working as 2 <li> elements and your HTML source has the correct link.

I think you should try asking some programming forum. They might be able to help.

No worries.
Thank you for your time!