# Links aren't showing in the sidebar or topic summaries on subfolder installs

**URL:** https://meta.discourse.org/t/links-arent-showing-in-the-sidebar-or-topic-summaries-on-subfolder-installs/41787
**Category:** Bug
**Created:** [March 30, 2016, 7:18pm UTC](https://meta.discourse.org/t/links-arent-showing-in-the-sidebar-or-topic-summaries-on-subfolder-installs/41787 "2016-03-30T19:18:05Z")
**Posts on this page:** 20
**Page:** 1

<div class="post-metadata">

### Author: ![iva](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/iva/32/120762_2.png) [@iva](https://meta.discourse.org/u/iva)
#### Post date: [March 30, 2016, 7:18pm UTC](https://meta.discourse.org/t/links-arent-showing-in-the-sidebar-or-topic-summaries-on-subfolder-installs/41787/1 "2016-03-30T19:18:05Z")

</div>

For some reason, when I link to another topic in my Discourse installation, the links do not always show up in the sidebar or in the topic summary, as they seem to here on meta.

What is the intended behavior in this respect? Are all the links supposed to show up in the sidebar? Or only if it’s a quote of another post (that particular scenario seems to work in my case)? Here on meta all the links seem to be in the sidebar…

---

<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: [March 30, 2016, 7:21pm UTC](https://meta.discourse.org/t/links-arent-showing-in-the-sidebar-or-topic-summaries-on-subfolder-installs/41787/2 "2016-03-30T19:21:38Z")

</div>

Are you linking to a restricted category? Or an external site? As I think both of those might not, I need to do more testing for the former scenario.

---

<div class="post-metadata">

### Author: ![iva](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/iva/32/120762_2.png) [@iva](https://meta.discourse.org/u/iva)
#### Post date: [March 30, 2016, 7:33pm UTC](https://meta.discourse.org/t/links-arent-showing-in-the-sidebar-or-topic-summaries-on-subfolder-installs/41787/3 "2016-03-30T19:33:45Z")

</div>

No restricted categories for sure. As far as links to external sites, they behave as follows:

1. They are shown in the topic summary as I understand they should.
2. They are _not_ shown in the sidebar. **Should they?**

Most of the internal links in my installation are not shown either in the sidebar or the topic summary. The ones that are shown seem to be the quotes of other posts or when a link to a topic is posted on a line by itself so it fetches a preview. I can’t quite figure out how it is supposed to be.

I don’t know if it has any relevance, but I’m running Discourse in a subfolder.

---

<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: [March 30, 2016, 9:16pm UTC](https://meta.discourse.org/t/links-arent-showing-in-the-sidebar-or-topic-summaries-on-subfolder-installs/41787/4 "2016-03-30T21:16:28Z")

</div>

> [@iva](#):
>
> The ones that are shown seem to be the quotes of other posts or when a link to a topic is posted on a line by itself so it fetches a preview. I can’t quite figure out how it is supposed to be.

That is exactly what the gutter/sidebar links should be, and nothing else.

---

<div class="post-metadata">

### Author: ![iva](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/iva/32/120762_2.png) [@iva](https://meta.discourse.org/u/iva)
#### Post date: [March 31, 2016, 2:37pm UTC](https://meta.discourse.org/t/links-arent-showing-in-the-sidebar-or-topic-summaries-on-subfolder-installs/41787/5 "2016-03-31T14:37:19Z")

</div>

Here on meta I see that [inline links](https://meta.discourse.org/t/take-down-site-during-maintenance/41773/9) to other topics are also ocassionally shown on the sidebar, like here:

 ![](https://global.discourse-cdn.com/meta/original/3X/d/c/dc36bfc2711a806f688332c065d74fa0b986d8d8.png)

~~However, my “inline links” link above isn’t showing either and it puzzles me. How do I link to another topic such that the link would be shown in the sidebar?~~

The “inline links” link appeared in the sidebar after I edited the post.

So, I’m still confused. Are _any and every_ links to other topics supposed to appear in the sidebar? This is not working consistently in my installation. Where do I look?

---

<div class="post-metadata">

### Author: ![fefrei](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/fefrei/32/119538_2.png) [@fefrei](https://meta.discourse.org/u/fefrei)
#### Post date: [March 31, 2016, 2:49pm UTC](https://meta.discourse.org/t/links-arent-showing-in-the-sidebar-or-topic-summaries-on-subfolder-installs/41787/6 "2016-03-31T14:49:34Z")

</div>

> [@iva](#):
>
> Are any and every links to other topics supposed to appear in the sidebar?

Yes, they are. The same holds for _incoming_ links (follow [your link above](https://meta.discourse.org/t/take-down-site-during-maintenance/41773/9) and look at my post – it now also links back to your post).

Note that these links are detected server-side, and are not shown to you after you submitted the post, only if the post is viewed later. (This may be a bug?)

---

<div class="post-metadata">

### Author: ![iva](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/iva/32/120762_2.png) [@iva](https://meta.discourse.org/u/iva)
#### Post date: [March 31, 2016, 2:52pm UTC](https://meta.discourse.org/t/links-arent-showing-in-the-sidebar-or-topic-summaries-on-subfolder-installs/41787/7 "2016-03-31T14:52:31Z")

</div>

> [@fefrei](#):
>
> Yes, they are. The same holds for incoming links (follow your link above and look at my post – it now also links back to your post).

Yeah, that’s cool and that’s what I’m seeing here on meta. Unfortunately, it isn’t quite working in my installation. Some links do show up in the sidebar, while some others do not. Mostly they don’t. I’m wondering what might be causing this and where to look to figure this out.

---

<div class="post-metadata">

### Author: ![fefrei](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/fefrei/32/119538_2.png) [@fefrei](https://meta.discourse.org/u/fefrei)
#### Post date: [March 31, 2016, 3:05pm UTC](https://meta.discourse.org/t/links-arent-showing-in-the-sidebar-or-topic-summaries-on-subfolder-installs/41787/8 "2016-03-31T15:05:06Z")

</div>

Is there anything different with the links that don’t work?

Is your site public and can you link to a non-working example?

---

<div class="post-metadata">

### Author: ![iva](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/iva/32/120762_2.png) [@iva](https://meta.discourse.org/u/iva)
#### Post date: [March 31, 2016, 3:33pm UTC](https://meta.discourse.org/t/links-arent-showing-in-the-sidebar-or-topic-summaries-on-subfolder-installs/41787/9 "2016-03-31T15:33:07Z")

</div>

> [@fefrei](#):
>
> Is there anything different with the links that don’t work?

I can’t quite figure this out. Will appreciate any help.

[Here is a non-working example](https://bestbabyclub.ru/forum/t/uvlechenie-kompyuternymi-igrami-u-rebenka-chto-delat/601). There is a link to another topic in the first post and in the 8ths. Neither is shown in the sidebar.

~~It turns out I’m not immediately finding a working example. I’ll add it here if I find it.~~

[Here is a working example](https://bestbabyclub.ru/forum/t/bonusnye-karty-v-detskom-klube/615/5). A link to a topic is dropped on a line by itself.

---

<div class="post-metadata">

### Author: ![fefrei](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/fefrei/32/119538_2.png) [@fefrei](https://meta.discourse.org/u/fefrei)
#### Post date: [March 31, 2016, 3:51pm UTC](https://meta.discourse.org/t/links-arent-showing-in-the-sidebar-or-topic-summaries-on-subfolder-installs/41787/10 "2016-03-31T15:51:30Z")

</div>

Okay, that definitely looks like a qualifying link.

Is Sidekiq happy? (You can check at `/sidekiq`, _Enqueued_ should be (almost) 0.)

Can you try posting an internal link in a separate post, using only “normal” English characters? Maybe the parser that is picking up these links is confused by the character set. Remember to refresh the page before checking whether the link shows up.

---

<div class="post-metadata">

### Author: ![iva](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/iva/32/120762_2.png) [@iva](https://meta.discourse.org/u/iva)
#### Post date: [March 31, 2016, 5:57pm UTC](https://meta.discourse.org/t/links-arent-showing-in-the-sidebar-or-topic-summaries-on-subfolder-installs/41787/11 "2016-03-31T17:57:55Z")

</div>

Sidekiq seems to be fine. No enqueued jobs; there are a couple of failed ones but they all seem to be related to email processing.

I just tried this in my development installation on localhost, and there the links work fine, so it’s not an issue of the character set.

My only guess is that this is somehow related to the fact that I’m running my production discourse from a subfolder. Will try to look into the code to figure this out.

Thanks for your help, Felix.

---

<div class="post-metadata">

### Author: ![fefrei](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/fefrei/32/119538_2.png) [@fefrei](https://meta.discourse.org/u/fefrei)
#### Post date: [March 31, 2016, 6:01pm UTC](https://meta.discourse.org/t/links-arent-showing-in-the-sidebar-or-topic-summaries-on-subfolder-installs/41787/12 "2016-03-31T18:01:55Z")

</div>

> [@iva](#):
>
> My only guess is that this is somehow related to the fact that I’m running my production discourse from a subfolder.

Yes, that would be my last guess: That the code that finds internal links does not expect the `/subfolder` in the URL and classifies this as a “normal” link.

And it looks like that’s the case: [This post on SitePoint](https://www.sitepoint.com/community/t/how-to-facebook-page-verified/218826/15) should have an internal link, but it doesn’t. I’ll move this topic to #Contribute > Bug.

---

<div class="post-metadata">

### Author: ![fefrei](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/fefrei/32/119538_2.png) [@fefrei](https://meta.discourse.org/u/fefrei)
#### Post date: [March 31, 2016, 6:12pm UTC](https://meta.discourse.org/t/links-arent-showing-in-the-sidebar-or-topic-summaries-on-subfolder-installs/41787/13 "2016-03-31T18:12:35Z")

</div>

> [@iva](#):
>
> Here is a working example. A link to a topic is dropped on a line by itself.

Good – that _does_ match the pattern: The parser for _pure links_ is broken. Oneboxes register correctly, however. Good find!

---

<div class="post-metadata">

### Author: ![iva](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/iva/32/120762_2.png) [@iva](https://meta.discourse.org/u/iva)
#### Post date: [March 31, 2016, 6:23pm UTC](https://meta.discourse.org/t/links-arent-showing-in-the-sidebar-or-topic-summaries-on-subfolder-installs/41787/14 "2016-03-31T18:23:01Z")

</div>

Another data point: I just fired up the Postgres console, and I’m seeing that for those links that are _not_ processed properly, there are no entries in the `topic_links` table, while the correctly processed links are all in `topic_links`.

---

<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: [March 31, 2016, 6:25pm UTC](https://meta.discourse.org/t/links-arent-showing-in-the-sidebar-or-topic-summaries-on-subfolder-installs/41787/15 "2016-03-31T18:25:39Z")

</div>

> [@fefrei](#):
>
> Good – that _does_ match the pattern: The parser for _pure links_ is broken. Oneboxes register correctly, however. Good find!

Slight correct, that seems to be a quote, not necessarily a onebox. I can confirm on Sitepoint that quotes do get the link in gutter treatment, but oneboxes do not

Onebox:(not working)  
[https://www.sitepoint.com/community/t/just-for-fun-if-it-is-possible/218925/9?u=cpradio](https://www.sitepoint.com/community/t/just-for-fun-if-it-is-possible/218925/9?u=cpradio)

Quote: (working)

> **[Firefox issues with JSFiddle and CodePen](https://www.sitepoint.com/community/t/firefox-issues-with-jsfiddle-and-codepen/219639)**
>
> Works for me in Firefox latest. Do you have scripts or anything else blocked? (you’re not missing much with my demo, though).

---

<div class="post-metadata">

### Author: ![fefrei](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/fefrei/32/119538_2.png) [@fefrei](https://meta.discourse.org/u/fefrei)
#### Post date: [March 31, 2016, 6:28pm UTC](https://meta.discourse.org/t/links-arent-showing-in-the-sidebar-or-topic-summaries-on-subfolder-installs/41787/16 "2016-03-31T18:28:46Z")

</div>

Oops, they look quite similar 😊

I should have checked the raw post. Thanks for the correction 🙂

---

<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: [March 31, 2016, 9:07pm UTC](https://meta.discourse.org/t/links-arent-showing-in-the-sidebar-or-topic-summaries-on-subfolder-installs/41787/17 "2016-03-31T21:07:25Z")

</div>

Can we follow up on this tomorrow @neil?

---

<div class="post-metadata">

### Author: ![neil](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/neil/32/102150_2.png) [@neil](https://meta.discourse.org/u/neil)
#### Post date: [March 31, 2016, 9:46pm UTC](https://meta.discourse.org/t/links-arent-showing-in-the-sidebar-or-topic-summaries-on-subfolder-installs/41787/18 "2016-03-31T21:46:41Z")

</div>

Is this specific to subfolder installs?

---

<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: [March 31, 2016, 9:48pm UTC](https://meta.discourse.org/t/links-arent-showing-in-the-sidebar-or-topic-summaries-on-subfolder-installs/41787/19 "2016-03-31T21:48:25Z")

</div>

It seems so, as they still work here on Meta and my sandbox which is not a sub-folder install.

---

<div class="post-metadata">

### Author: ![iva](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/iva/32/120762_2.png) [@iva](https://meta.discourse.org/u/iva)
#### Post date: [April 3, 2016, 10:48pm UTC](https://meta.discourse.org/t/links-arent-showing-in-the-sidebar-or-topic-summaries-on-subfolder-installs/41787/20 "2016-04-03T22:48:41Z")

</div>

This change resolves the problem for me:

[https://github.com/discourse/discourse/pull/4138](https://github.com/discourse/discourse/pull/4138)

[Next page](https://meta.discourse.org/t/links-arent-showing-in-the-sidebar-or-topic-summaries-on-subfolder-installs/41787.md?page=2)
