# 导入Disqus后，我网站上的链接出现故障

**URL:** <https://meta.discourse.org/t/links-are-broken-on-my-site-after-disqus-import/46861>\
**Category:** Support\
**Created:** [2016年七月5日 18:19 UTC](https://meta.discourse.org/t/links-are-broken-on-my-site-after-disqus-import/46861 "2016-07-05T18:19:13Z")\
**Posts on this page:** 10\
**Page:** 1

<div class="post-metadata">

**Author:** ![brunoedigital](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/brunoedigital/32/119692_2.png) [@brunoedigital](https://meta.discourse.org/u/brunoedigital)\
**Post date:** [2016年七月5日 18:19 UTC](https://meta.discourse.org/t/links-are-broken-on-my-site-after-disqus-import/46861/1 "2016-07-05T18:19:13Z")

</div>

Hi,

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:

 ![](https://global.discourse-cdn.com/meta/original/3X/2/8/28ebfe6d3ccf4cfa81f82d38fbfeae80acf4174d.png)

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

`http://comunidade.nacaolifestyle.com/clicks/track?url=https%3A%2F%2Fmembros.feriassemfim.com%2Fintroducao%2Fcaixa-de-ferramentas&post_id=1213&topic_id=42`

Which just opens a blank page where nothing happens ☹

Any ideas on how to fix this?

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

---

<div class="post-metadata">

**Author:** ![cpradio](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/cpradio/32/4970_2.png) [@cpradio](https://meta.discourse.org/u/cpradio)\
**Post date:** [2016年七月5日 18:21 UTC](https://meta.discourse.org/t/links-are-broken-on-my-site-after-disqus-import/46861/2 "2016-07-05T18:21:58Z")

</div>

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?

---

<div class="post-metadata">

**Author:** ![brunoedigital](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/brunoedigital/32/119692_2.png) [@brunoedigital](https://meta.discourse.org/u/brunoedigital)\
**Post date:** [2016年七月5日 18:30 UTC](https://meta.discourse.org/t/links-are-broken-on-my-site-after-disqus-import/46861/3 "2016-07-05T18:30:28Z")

</div>

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

Thanks!

EDIT: here seems to be loading just fine

---

<div class="post-metadata">

**Author:** ![codinghorror](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/codinghorror/32/110067_2.png) [@codinghorror](https://meta.discourse.org/u/codinghorror)\
**Post date:** [2016年七月5日 19:41 UTC](https://meta.discourse.org/t/links-are-broken-on-my-site-after-disqus-import/46861/4 "2016-07-05T19:41:09Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![brunoedigital](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/brunoedigital/32/119692_2.png) [@brunoedigital](https://meta.discourse.org/u/brunoedigital)\
**Post date:** [2016年七月5日 20:49 UTC](https://meta.discourse.org/t/links-are-broken-on-my-site-after-disqus-import/46861/5 "2016-07-05T20:49:13Z")

</div>

I understand that. But I’m not familiar with coding. So no idea how to even start searching as yo why that is happening ☹ 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

---

<div class="post-metadata">

**Author:** ![brunoedigital](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/brunoedigital/32/119692_2.png) [@brunoedigital](https://meta.discourse.org/u/brunoedigital)\
**Post date:** [2016年七月8日 07:18 UTC](https://meta.discourse.org/t/links-are-broken-on-my-site-after-disqus-import/46861/6 "2016-07-08T07:18:24Z")

</div>

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?

Thanks!

---

<div class="post-metadata">

**Author:** ![brunoedigital](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/brunoedigital/32/119692_2.png) [@brunoedigital](https://meta.discourse.org/u/brunoedigital)\
**Post date:** [2016年八月2日 18:30 UTC](https://meta.discourse.org/t/links-are-broken-on-my-site-after-disqus-import/46861/7 "2016-08-02T18:30:32Z")

</div>

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}`

HTH!

---

<div class="post-metadata">

**Author:** ![tophee](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/tophee/32/73406_2.png) [@tophee](https://meta.discourse.org/u/tophee)\
**Post date:** [2018年六月22日 10:08 UTC](https://meta.discourse.org/t/links-are-broken-on-my-site-after-disqus-import/46861/8 "2018-06-22T10:08:47Z")

</div>

> [@brunoedigital](#):
>
> Post.all.find\_each{|e| TopicLink.extract\_from e}

Could someone explain what exactly this command does?

---

<div class="post-metadata">

**Author:** ![brunoedigital](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/brunoedigital/32/119692_2.png) [@brunoedigital](https://meta.discourse.org/u/brunoedigital)\
**Post date:** [2018年八月6日 08:08 UTC](https://meta.discourse.org/t/links-are-broken-on-my-site-after-disqus-import/46861/9 "2018-08-06T08:08:22Z")

</div>

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

Maybe someone here can explain it properly.

---

<div class="post-metadata">

**Author:** ![JammyDodger](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/jammydodger/32/254611_2.png) [@JammyDodger](https://meta.discourse.org/u/JammyDodger)\
**Post date:** [2024年六月8日 12:37 UTC](https://meta.discourse.org/t/links-are-broken-on-my-site-after-disqus-import/46861/10 "2024-06-08T12:37:15Z")

</div>

此主题已在 2894 天后自动关闭。不再允许回复。
