craftcms / cms

Build bespoke content experiences with Craft.
https://craftcms.com
Other
3.28k stars 635 forks source link

[4.x]: Updating Volume user permissions throws an Integrity constraint violation #10972

Closed WHITE-developer closed 2 years ago

WHITE-developer commented 2 years ago

What happened?

Description

When trying to save the permissions for a user or user group it's throwing an Integrity constraint violation – yii\db\IntegrityException 1062 Duplicate entry '60-2' for key 'userpermissions_usergroups.idx_xrqdllsquntbibzhsbfctltcthrzoiyrznrm'.

The duplicate key is the savepeerassets permission (Save assets uploaded by other users) which is also showing 2 times in the control panel https://i.imgur.com/6dHDJrC.png

Steps to reproduce

  1. Check bot the Save assets uploaded by other users permissions options and save the user/group

Craft CMS version

4.0.0-beta.4

PHP version

8.0.8

Operating system and version

Linux 5.11.0-1028-aws

Database type and version

MySQL 8.0.27

Image driver and version

Imagick 3.5.1 (ImageMagick 6.9.10-23)

Installed plugins and versions

Plugin version
Amazon S3 2.0.0-beta.3
Craft Commerce 4.0.0-beta.2
Imager X 4.0.0-beta.3
Mollie for Craft Commerce 4.0.0-beta.1
Navigation 2.0.0-beta.2
Postmark 3.0.0-beta.1
Redactor 3.0.0-beta.2
Retour 4.0.0-beta.4
SEOmatic 4.0.0-beta.8
Super Table 3.0.0-beta.3
WHITE-developer commented 2 years ago

nevermind, just saw it is already fixed for next release