Links to tags not working in final post unless autocompleted

If you add a # and select a relevant tag, the word is automatically converted to a link for the relevant tag in the Preview Pane, but this link is not appearing in the final ‘baked’ post in the forum

See here - code entered, preview pane shows bolded, working link - but not appearing in the actual topic posted (above)

(running 1.8.0 with Communiteq (formerly DiscourseHosting))

2 Likes

Can you repro this here or on try.discourse.org ? If it is a bug in 1.8 it won’t be fixed, because it is not security related.

This does appear to be a valid bug. To link to a tag you need ::tag at the end to avoid a namespace collision with categories. So linking to #pr-welcome is #pr-welcome::tag.

With that in mind, linking to #pr-welcome (#pr-welcome) works in preview but not once submitted.

I’ll note that using autocomplete when typing a tag adds ::tag automatically. This is only an issue when typing the tag “manually”.

3 Likes

Er… what?

#pr-welcome is fine as a tag. So is #pr-welcome

Adding #praise from autocomplete.

Oh, I see, this is a big regression. Someone should look at it!

3 Likes

Praise is a category, it doesn’t have a “suffix”. Only tags require ::tag to be appended.

Oh right my bad #faq-material entered from autocomplete, and #faq-material typed.

@tgxworld I really do not agree with this design. Like users and groups, tags and categories should share the same namespace… the #blah:tag pattern should only be required for disambiguation.

2 Likes

Thanks both - sorry, time differences make timely conversations awkward.

I was not aware of the requirement for the ::tag - is this new?

It does work for autocomplete, but I had written these manually as tags were bottom of the original automcomplete list and it was just as easy to type. Now I know the correct process, I can change to use autocomplete more, but as I say, I was not aware of this before

thanks for looking into it

3 Likes

No - it’s been required since tags became mentionable in early 2016.

2 Likes

Would love to see this change!

Fixed in

https://github.com/discourse/discourse/commit/3e53dbcade3c645e3cbd77610e4a5792a2c1a02e

7 Likes

This topic was automatically closed after 27 hours. New replies are no longer allowed.