Server 500 error on uploading assignment document
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=
Should be fixed with this https://github.com/chamilo/chamilo-lms/commit/d27a7f7a9b56cdab93c2759905a6f03b70516b1d
Still buggy.
Line 3690 should not be $groupIid = $groupInfo['iid']; but $groupIid = $groupInfo['id'];
post_group_id is the iid of the group