"Optional TAG information" - How does it work?

Dear All,

I just added an AV resource with a link to a youtube video of a Sutta Class by Ajahn Brahm on MN128. I thought that I should also add “mn128” and “brahm” in the box with ‘choose optional tags for this topic’. However, when I type in that string and press enter, then the box is cleared again and I just get the default text in a light grey font: ‘choose optional tags for this topic’

Many thanks for any help,
Robert

P.S.: This issue may already have been raised by @LXNDR before in one of his posts under “Meta/Dev/Discuss&Discover”, but I am not fully sure, if he was referring to the same issue.

The tags dialogue seems flaky, it has just been released by Discourse and hopefully will improve. For me, when I type things they sometimes don’t seem to work properly, but when I publish the post they end up fine.

So try just writing:

mn128,brahm

In the tag field and publish the topic.

And, BTW, it’s an excellent image of Ajahn Brahm on that video!

I’ve just discovered another problem with the tags, they remove “.” which means our references won’t work for AN, SN, etc. @blake, can you look at this?

Dear Bhante,

I cannot add this tag information. When I start typing, a search is started and I am shown a selection of tags. I can choose from the predefined tags, and these would stay, but I cannot define new tags. So when I type in the tag info, that you suggest, it does not come through - because the tags “mn128” and “brahm” are not yet defined:

  1. This is how the “tag-field” looks on the outset:
    image

  2. Here, I start typing. A search is startet “searching…” and then an existing tag “mn139” is proposed
    image

  3. However, the tag “mn128” is not found and also is not created
    image

  4. Nevertheless, I could have selected the tag “mn139” and saved it together with the ‘topic’
    image

Hence, I guess, this is also an issue with who does have permissions to create new tags and who does not…

With much mettā,
Robert

P.S.: I also do not fully understand why such a somewhat unlucky image was chosen to feature this video… (probably just a random frame taken by the software). I will add more videos by Ajahn Brahm later anyways so that this image gets somewhat diluted…

I’ve adjusted the setting for creating tags, so now any user should be able to create them. We’ll keep an eye on how they are being used, hoping that it doesn’t get messy. As a rule, create tags for Sutta IDs and author names only, all lower case, no spaces, and don’t use any titles or honorifics on names.

1 Like

Yep! It seems to work now:
image

With much mettā,
Robert

1 Like

Great, thanks for contributing! I’m hoping that eventually we have a rich set of resources here for people wanting to learn the suttas.

1 Like

According to the official thread, periods in tags are problematic. Just imagine what would happen if someone made a tag ‘foo.png’, it would wreak all kinds of exciting havoc with the routing.
https://meta.discourse.org/t/the-official-discourse-tags-plugin-discourse-tagging/26482/16

Often in this kind of case when the thing with the period needs to be used in a url, it gets rewritten with another character so sn56.11 becomes sn56_11, with other permissible subs being : and '.

Unfortunately the number of valid URL path characters (i.e. not needing to be percent-encoded) is quite small, it is basically alphanumeric and .-_ which is pretty limited. You can kind of get away with characters like ~, : and ' too but not quite so officially. The underscore is the conventional placeholder character so makes a good substitution.

The lowtech solution is thus to just use an underscore (or perhaps colon) in tags where you would use an invalid character. The hightech solution is to rewrite the plugin to permit periods in tags, but to have the URL have an underscore where the period would be. Rewriting the plugin is completely within my abilities, in fact I just rewrote part of the plugin to test if the concept works and it does. I’ve made a post on meta.discourse to see if there is developer interest in implementing this in the official plugin, if there is not I’ll fork the plugin and implement it myself.

3 Likes

Okay I did one better, after talking to the Discourse devs I went ahead and implemented tags with periods properly including fixed routing, so /tags/sn56.11 will work, and I made a pull request, so it should now end up in the official plugin.
I haven’t updated it here yet - since I figure tomorrow it might be in the official plugin.

2 Likes

Fantastic! Sometimes its a pain that Discourse is evolving so fast, but it is pretty sweet that we can contact the devs so easily and they actually listen and respond.

1 Like

I’ve actually gone ahead and enabled my fork here, so tags with periods are now live.

2 Likes

And now (after some improvements based on feedback from the devs) my tags-with-periods code is included in the official discourse-tagging plugin.

2 Likes

and thus we witness the awesomeness that is open source!

1 Like

Dear Blake,

thanks so much! I gave it a shot and it works just fine:
image

:smile:

With much mettā,
Robert