sebsoftnl / moodle-mod_gwpayments

Other
1 stars 2 forks source link

Fatal error after adding to the course #1

Closed mudrd8mz closed 2 years ago

mudrd8mz commented 3 years ago

Right after adding a new instance to the course on PostgreSQL, I am getting the error below.

Please refer to https://docs.moodle.org/dev/Plugin_contribution_checklist#Cross-DB_compatibility

Error writing to database

More information about this error Debug info: ERROR: null value in column "accountid" of relation "m_gwpayments" violates not-null constraint DETAIL: Failing row contains (1, 4, Pay !, , 1, null, 10.00, 21, EUR, 0, 1633714469, 1633714469). INSERT INTO m_gwpayments (name,cost,vat,currency,studentdisplayonpayments,course,intro,introformat,timecreated,timemodified) VALUES($1,$2,$3,$4,$5,$6,$7,$8,$9,$10) RETURNING id [array ( 'name' => 'Pay !', 'cost' => '10', 'vat' => '21', 'currency' => 'EUR', 'studentdisplayonpayments' => '0', 'course' => '4', 'intro' => '', 'introformat' => '1', 'timecreated' => 1633714469, 'timemodified' => 1633714469, )] Error code: dmlwriteexception Stack trace:

line 489 of /lib/dml/moodle_database.php: dml_write_exception thrown
line 329 of /lib/dml/pgsql_native_moodle_database.php: call to moodle_database->query_end()
line 1082 of /lib/dml/pgsql_native_moodle_database.php: call to pgsql_native_moodle_database->query_end()
line 1130 of /lib/dml/pgsql_native_moodle_database.php: call to pgsql_native_moodle_database->insert_record_raw()
line 127 of /mod/gwpayments/lib.php: call to pgsql_native_moodle_database->insert_record()
line 128 of /course/modlib.php: call to gwpayments_add_instance()
line 168 of /course/modedit.php: call to add_moduleinfo()
danmarsden commented 2 years ago

has this been fixed?

rogiervandongen commented 2 years ago

@danmarsden it's fixed in code (already was) but only now do I have some time to actually look into the activity module. I'm now depending on the multistep proces of out gitlab to be fixed because there seem to be multiple issues with CI (not my setup so I have to delegate this). New version will be released and re-tagged for approval soon (I don't want to rush and push code for approval that's not on github yet).