bartv
(Bart )
February 21, 2020, 9:52am
1
Since this week. we no longer see an error message when you more than max tags per topic
on a topic. Instead, the topic just saves, but the additional tags are discarded silently.
2 Likes
j.jaffeux
(Joffrey Jaffeux)
February 21, 2020, 10:53am
3
Hi,
it should be fixed by
https://github.com/discourse/discourse/pull/9018
I added few tests, hopefully we don’t regress on this anymore.
Thanks.
8 Likes
RGJ
(Richard - Communiteq)
February 13, 2024, 1:47pm
6
I found this topic when I wanted to report that max_tags_per_topic
fails silently on current tests-passed when it is set to 0.
Repro:
set max_tags_per_topic
to 0
add a tag to a topic
see that it’s not added
When max tags per topic is set to 1 and you attempt to add a second tag, it gives a “you can select only 1 item” error message.
I suspect the bug is here , if maximum
is 0 then the if
expression is false.
3 Likes
nat
(Natalie T)
March 19, 2024, 4:50am
8
Thanks! We’ve fixed it here:
discourse:main
← discourse:prevent-search-limit-max
opened 04:10AM - 19 Mar 24 UTC
Currently when `max_tags_per_topic` is zero, it fails silently.
This change … highlights the limit below the tag picker, and also prevents search when max is 0. It continues to allow users to remove existing tags if the max is changed to 0.
I considered removing the tag picker when the value is 0 and there are no existing tags, but it becomes non-obvious to the user why the tag picker is gone. So showing the red 'error' provides a better clue. Language-wise it sounds a bit funny, but after thinking a bit, I think it works alright.
Related: https://meta.discourse.org/t/max-tags-per-topic-failing-silently/142241
Some screenshots
### Existing tag, but max changed to 0
<img width="459" alt="Screenshot 2024-03-19 at 12 04 42 PM" src="https://github.com/discourse/discourse/assets/1555215/1174a518-6f8e-47d9-8f16-52480629087e">
### Composer
<img width="767" alt="Screenshot 2024-03-19 at 12 05 16 PM" src="https://github.com/discourse/discourse/assets/1555215/54f1bbc2-0e4b-46c1-b345-af9a367859b7">
### Topic tag picker when 0 tags doesn't search
<img width="764" alt="Screenshot 2024-03-19 at 12 10 46 PM" src="https://github.com/discourse/discourse/assets/1555215/f9a2ea1d-3351-4d31-840b-3abe09cd8a24">
1 Like
nat
(Natalie T)
Closed
March 20, 2024, 12:00am
9
This topic was automatically closed after 19 hours. New replies are no longer allowed.