moodleou / moodle-mod_ouwiki

Alternative wiki module for Moodle 2 (designed for use in teaching and learning)
36 stars 32 forks source link

OU Wiki in Moodle 3 #72

Open allenrSelby opened 7 years ago

allenrSelby commented 7 years ago

In Moodle 3 with SQL server 2012 backend I am getting the following error we upgraded from Moodle 2.8 to 3.1 in the summer and i am now getting this error any ideas what could be causing this or how to solve it?

When we create a single user OU Wiki and a student adds their own content. Then you access the Wiki as a students we get following error. Does anyone have any ideas on potential solutions?

error/Database problem: exception 'dml_write_exception' with message 'Error writing to database' in [dirroot]\lib\dml\moodle_database.php:482 Stack trace: #0 [dirroot]\lib\dml\sqlsrv_native_moodle_database.php(297): moodle_database->query_end(false) #1 [dirroot]\lib\dml\sqlsrv_native_moodle_database.php(404): sqlsrv_native_moodle_database->query_end(false) #2 [dirroot]\lib\dml\sqlsrv_native_moodle_database.php(999): sqlsrv_native_moodle_database->do_query('INSERT INTO {ou...', Array, 2) #3 [dirroot]\lib\dml\sqlsrv_native_moodle_database.php(1084): sqlsrv_native_moodle_database->insert_record_raw('ouwiki_subwikis', Array, true, false) #4 [dirroot]\mod\ouwiki\locallib.php(268): sqlsrv_native_moodle_database->insert_record('ouwiki_subwikis', Object(stdClass)) #5 [dirroot]\mod\ouwiki\locallib.php(245): ouwiki_create_subwiki(Object(stdClass), Object(cm_info), Object(stdClass), '143') #6 [dirroot]\mod\ouwiki\basicpage.php(77): ouwiki_get_subwiki(Object(stdClass), Object(stdClass), Object(cm_info), Object(context_module), 0, 0, true) #7 [dirroot]\mod\ouwiki\view.php(29): require('D:\moodle\mod\o...') #8 {main} (code OUWIKI-[dirroot]\mod\ouwiki\locallib.php/270)

jason-platts commented 7 years ago

Are you using the latest code version from GitHub?

I also seem to remember that others had this issue and changing the unique index on that database table solved the issue (There may be a closed issue on this?).