ERROR : insert into 'userGroups'('groupId','userId') #5365
Replies: 5 comments 1 reply
-
To provide some additional information: I did not select "LDAP/Active Directory", the same error still occured. |
Beta Was this translation helpful? Give feedback.
-
Found the issue (I guess...) The Front-end selects by default a group with id = 0 (which does not exist). As a workaround, I manually ran the graphql-call to update the authentication strategies (f12), but removed the not existing group-id (prop autoEnrollGroups). After this call, all seems to be going fine! |
Beta Was this translation helpful? Give feedback.
-
My workaround was to delete an entry on the authentication table, that reference a group that doesn't exists anymore. |
Beta Was this translation helpful? Give feedback.
-
insert into "userGroups" ("groupId", "userId") values ($1, $2), ($3, $4) returning "userId" - insert or update on table "userGroups" violates foreign key constraint "usergroups_groupid_foreign" Is there a way to get this working? |
Beta Was this translation helpful? Give feedback.
-
we solved the problem as follows: We exposed the database port externally (in Docker Compose) with:
After that, we connected to the PostgreSQL database using pgAdmin (software available online). Under Schemas -> Tables -> authentication, we right-clicked on the authentication table and ran a query through Scripts -> Select. In the column "autoEnrollGroups", we set the value to Afterward, I restarted the containers with |
Beta Was this translation helpful? Give feedback.
-
The error occurs when using the "self-registration of user" functionality.
Actions done in settings:
1 - Access the Administration environment
2 - Access the "Authentication" module
3 - In the Active Strategies options select "LDAP/Active Directory"
4 - Apply strategy settings
5 - In the Registration options:
5.1 - Enable the "self-registration" option
5.2 - In the option "Assign to group", inform the group to which the user who registers himself wants to be linked
What is happening:
The user who self-registers, after informing the login data, an error message is displayed.
"insert into 'userGroups'('groupId','userId') values ($1,$2),($3,$4),($5,$6) returning 'groupId' - insert or update on table 'userGroups' violates foreign key constraint 'usergroups_groupid_foreign' "
Questions:
1 - Is there any solution to be delivered for future versions?
2 - Any contour suggestions?
Beta Was this translation helpful? Give feedback.
All reactions