Hi, I noticed an odd interaction with DiscoTOC and Slack integration. Basically the header links don’t properly post.
See details here
Users report an issue with Slack integration where relative heading links (e.g., #overview) fail to resolve correctly because they lack the full topic path. debryc first noted the problem with DiscoTOC, and simon explained that the Chat Integration plugin incorrectly prepends only the forum root URL, not the full topic URL. OlliePartly confirmed the issue occurs even without DiscoTOC, showing Slack posts display heading text linked to the homepage instead of the correct topic anchor. awesomerobot clarified that automatic heading links are native to Discourse and not exclusive to DiscoTOC, prompting a title update. Cédric_Brunet asked for an update, and sam confirmed the issue remains in pr-welcome and that the staff experience team is aware. A potential fix involves modifying TOC links to include the full topic path (e.g., /t/topic-slug/1234#overview).
Hi, I noticed an odd interaction with DiscoTOC and Slack integration. Basically the header links don’t properly post.
See details here
That is because the heading links do not include the path to the topic. For example <a name="overview" href="#overview">. The Chat Integration plugin is attempting to convert relative links into absolute links by prepending the forum’s root URL to any links in the post, but that is not going to work for the header links because the path to the topic is missing.
A possible solution would be for us to add the path to the topic to the TOC href element. For example, instead of setting <a name="overview" href="#overview">, the href element would be set to something like /t/your-topic-slug/1234#overview".
I find I get this when any post with headings are posted in Slack - the heading text is preceded by a link to the site homepage anchored with the headling name.
For example a post like this:
Comes through like this on Slack:
Yes it appears this is an issue with our automatic heading links, which exist even without the DiscoTOC theme component. I’ll update the title to reflect this.
Hi, do you have any update on this bug ? Thanks
I think it remains in pr-welcome. I notified the staff experience team who are aware of the issue.