rriemann
(Robert)
December 28, 2015, 12:08am
1
I run into the following issue:
By accident, I entered two times the same category into the default user preference field for the default watched categories.
Result: Accounts could not be created anymore
PG::UniqueViolation (ERROR: duplicate key value violates unique constraint "idx_category_users_u1" DETAIL: Key (user_id, category_id, notification_level)=(16, 11, 3) already exists. )
Solution: I removed the enry from the watch list so that the list was unique.
However, I would expect that Discourse doesn’t allow to add two times the same category to the watch list.
Best,
Robert
What version are you on? We fixed this about a week or two ago via a unique table index.
sam
(Sam Saffron)
December 28, 2015, 12:17am
3
Yeah we should definitely guard against this buggy site setting a bit better.
The bug is that if you add “default watch” == “bug bug” we allow you to save it.
3 Likes
rriemann
(Robert)
December 28, 2015, 12:18am
4
I’m on version v1.5.0.beta7 +48
Ok @techapj can you add this to your list? A client-side check for duplicates.
1 Like
techAPJ
(Arpit Jalan)
December 28, 2015, 7:48am
6
I am not able to repro this issue.
Once I select a category from category list, I am not able to select the same category again (as expected).
Can you repro this here @rriemann ? or on try.discourse.org ?
rriemann
(Robert)
December 28, 2015, 8:53am
8
I had category names like “A Announcements” and “B Announcements”. With the
Discourse version I stated above, I cannot reproduce this either. It must have
been a left over from a previous version, I guess. Now, the error message can
be googled with a solution, it should be fine.