Double entry in default watch list @ user preferences -> registration impossible

(Robert) #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.


(Jeff Atwood) #2

What version are you on? We fixed this about a week or two ago via a unique table index.

(Sam Saffron) #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.

(Robert) #4

I’m on version v1.5.0.beta7 +48

(Jeff Atwood) #5

Ok @techapj can you add this to your list? A client-side check for duplicates.

(Arpit Jalan) #6

I am not able to repro this issue. :confused:

Once I select a category from category list, I am not able to select the same category again (as expected).

(Jeff Atwood) #7

Can you repro this here @rriemann? or on

(Robert) #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. :slight_smile:

(Jeff Atwood) #9