Closed ctangney-tulip closed 1 year ago
@sebastian-lenz
Thanks a lot!
The release 2.1.5 containing the fix has been published.
Hello Support Team we are getting this issue blow mention detail
Craft CMS version: 4 PHP version: 8.1.29 I have attached a screenshot to getting this error. Could you please assist in resolving this issue? ![Uploading Screenshot from 2024-09-18 11-14-32.png…]()
Showing this issue why
Integrity constraint violation – yii\db\IntegrityException
SQLSTATE[23000]: Integrity constraint violation: 1452 Cannot add or update a child row: a foreign key constraint fails (adjoin_stage
.changedfields
, CONSTRAINT changedfields_ibfk_2
FOREIGN KEY (elementId
) REFERENCES elements
(id
) ON DELETE CASCADE ON UPDATE CASCADE)
The SQL being executed was: INSERT INTO changedfields
(elementId
, siteId
, fieldId
, dateUpdated
, propagated
, userId
) VALUES (45935, 1, 195, '2024-09-18 09:22:47', 0, 30571) ON DUPLICATE KEY UPDATE elementId
=45935, siteId
=1, fieldId
=195, dateUpdated
='2024-09-18 09:22:47', propagated
=0, userId
=30571
Error Info: Array
(
[0] => 23000
[1] => 1452
[2] => Cannot add or update a child row: a foreign key constraint fails (adjoin_stage
.changedfields
, CONSTRAINT changedfields_ibfk_2
FOREIGN KEY (elementId
) REFERENCES elements
(id
) ON DELETE CASCADE ON UPDATE CASCADE)
)
↵
Caused by: PDOException
SQLSTATE[23000]: Integrity constraint violation: 1452 Cannot add or update a child row: a foreign key constraint fails (adjoin_stage
.changedfields
, CONSTRAINT changedfields_ibfk_2
FOREIGN KEY (elementId
) REFERENCES elements
(id
) ON DELETE CASCADE ON UPDATE CASCADE)
in /home/forge/adjoin.org/vendor/yiisoft/yii2/db/Command.php at line 1302
Related unit(s) of work: #228