Any new user registration fails due to unique constraint

Any attempt to register a new user fails at my discourse instance, without any hints about problems on the server.

After entering registration data a red warning is showed, suggesting that the email is already taken:

This happens for any mail entered into the registration dialogue.

I would be grateful for any hints, how to investigate this further.

I was mistaken, there is an error in the logs:

ActiveRecord::RecordNotUnique (PG::UniqueViolation: ERROR: duplicate key value violates unique constraint “idx_category_users_user_id_category_id” DETAIL: Key (user_id, category_id)=(127, 34) alread

I found a way around the problem:

I disabled a category-watching default for every user with trust level 2.

Trust level 2 was the default level for any new user.

Next experiments will be to change the default trust level for users and re-enable the category watching default.

1 Like