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…
No restricted categories for sure. As far as links to external sites, they behave as follows:
They are shown in the topic summary as I understand they should.
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.
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?
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).
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?)
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.
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.
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.
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 should have an internal link, but it doesn’t. I’ll move this topic to bug.
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.
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