Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Integrity constraint violation: 1062 Duplicate entry '...' for key 'forum_id' #1111

Open
cebe opened this issue Apr 3, 2023 · 0 comments
Open

Comments

@cebe
Copy link
Member

cebe commented Apr 3, 2023

What steps will reproduce the problem?

unsure how to reproduce, but this happens regularily in prod.

#371 yii\db\IntegrityException: SQLSTATE[23000]: Integrity constraint violation: 1062 Duplicate entry '...' for key 'forum_id' The SQL being executed was: UPDATE `user` SET `forum_id`=... WHERE `id`=...

relevant part from the stack trace:

+
at
yii\db\ActiveRecord::updateAll(/var/www/yiiframework/vendor/yiisoft/yii2/db/BaseActiveRecord.php:775)
+
at
yii\db\BaseActiveRecord::updateAttributes(/var/www/yiiframework/components/forum/DiscourseAdapter.php:118)
+
at
app\components\forum\DiscourseAdapter::getForumUserId(/var/www/yiiframework/models/User.php:481)
+
at
app\models\User::getForumUrl(/var/www/yiiframework/views/user/view.php:15)

Example URL: https://www.yiiframework.com/user/48952

Rollbar Item: https://app.rollbar.com/a/yiisoft/fix/item/yiiframework.com/371

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant