chamilo-lms icon indicating copy to clipboard operation
chamilo-lms copied to clipboard

Server 500 error on uploading assignment document

Open jderriks opened this issue 10 years ago • 3 comments

The assignments tool seems to be broken. In the apache logs an error is recorded with an integrity constraint. How can that be solved? Version: 1.10.x branch dd 2016/9/9

PHP Fatal error: Uncaught exception 'PDOException' with message 'SQLSTATE[23000 ]: Integrity constraint violation: 1048 Column 'post_group_id' cannot be null' in xx/vendor/doctrine/dbal/lib/Doctrine/DBAL/Driver /PDOStatement.php:91\nStack trace:\n#0 xx/vendor/doctrine/dbal/lib/Doctrine/DBAL/Driver/PDOStatement.php(91): PDOStatement->execut e(Array)\n#1 xx/vendor/doctrine/dbal/lib/Doctrine/DBAL/Statement.php(165): Doctrine\\DBAL\\Driver\\PDOStatement->execute(Array)\n# 2 xx/main/inc/lib/database.lib.php(399): Doctrine\\DBAL\\Statement->execute(Array)\n#3 xx/main/wor k/work.lib.php(3757): Database::insert('c_student_publi...', Array)\n#4 xx/main/inc/ajax/work.ajax.php(55): processWorkForm(Array, Array, Array, 0, '216', 784, Array, true)\n#5 {main}\n\nNext exception 'Doctrine\\DBAL\\Driver\\PDOException' with message 'SQLSTATE[23000]: Integrity constraint violat in xx/vendor/doctrine/dbal/lib/Doctrine/DBAL/Driver/AbstractMySQLDriver.php on line 112, referer: https://xx/main/work/upload.php?cidReq=PROFSCHRIJVEN&id_session=0&gidReq=216&gradebook=0&origin=&id=67&origin=

jderriks avatar Sep 09 '16 12:09 jderriks

Should be fixed with this https://github.com/chamilo/chamilo-lms/commit/d27a7f7a9b56cdab93c2759905a6f03b70516b1d

jmontoyaa avatar Sep 09 '16 13:09 jmontoyaa

Still buggy.

Line 3690 should not be $groupIid = $groupInfo['iid']; but $groupIid = $groupInfo['id'];

jderriks avatar Sep 09 '16 18:09 jderriks

post_group_id is the iid of the group

jmontoyaa avatar Oct 05 '16 10:10 jmontoyaa