Links are broken on my site after Disqus import


I’ve searched here on Meta and found some topics on this. But they are closed when a fix was posted it. Like these ones:

Sometimes when I have a clean url pasted on a post, I click it and it generates something like this:

Which just opens a blank page where nothing happens :frowning:

Any ideas on how to fix this?

I have v1.6.0.beta10 +9 build. So the latest one I believe.

What is the original link? Can you post it in code blocks here and outside of them to see if the click-tracking here mangles it?

This goes to a private membership site. So it will probably redirect to ask for a login.

Maybe that is causing the issue? But it doesn’t even seem to try to load the page. It just opens that blank page.

BTW, what is also odd:

I’ve set the Open external links in a new tab by default. on. So if I just click, that error pop up.

But if hold Command down (Mac) to force to open in a new tab, then it’s all good.

And I just tested: even if I turn that option off, the same behavior still happens.

Additionally, my Discourse is on http — the link points to an https site. No idea if that could affect something, but just as some extra info


EDIT: here seems to be loading just fine

Unless you can repro it here it is not a bug but a configuration error with your site. Try updating to the latest version of Discourse.

I understand that. But I’m not familiar with coding. So no idea how to even start searching as yo why that is happening :frowning: The only difference between here and my site is that here it’s on https (as my link) and my community is not (pointing to an https link)

But even when pointing to a http link it does not work.

Another difference I noticed: on my site even when I turn off the option to open external links in a new tab, it still tries to open links on a new tab.

Any thoughts? Where should I start looking out for what’s causing this issue?

PS: I’m using the latest version

We’re still experiencing this problem. And the oddest thing is that sometimes links work, sometimes they do not.

But seems to be related with either HTTPS or with our DISQUS importing that we did from my site.

Does anyone has any ideas on where we should take a look at?


In case someone goes through this — we found the solution:

The thing is that when importing Discourse doesn’t “recognize” the links… So it doesn’t track them properly creating this problem.

We had to run a simple command on terminal to make it work. Something along the lines of:

Post.all.find_each{|e| TopicLink.extract_from e}



Could someone explain what exactly this command does?

1 Like

I have no idea since it was my dev who sorted this out for me. Sorry.

Maybe someone here can explain it properly.