Hi Everyone,
I recently upgraded from moodle 2.5.3 to 2.6.1. I have a few third party plugins installed and after downloading their newest versions the upgrade ran correctly except for the Flashcard module (https://moodle.org/plugins/view.php?plugin=mod_flashcard).
Apparently, there was a break in the development path and the current version cannot be upgraded from the previous version (documented on the plugin site). Since there weren't too many of these activities, I went ahead and uninstalled the old version, reinstalled the new version (after upgrading to moodle 2.6.1) and manually re-created the deleted flashcard activities.
This worked fine on three sites. On the last site I upgraded however, I got the following message when I tried to add a new flashcard activity:
Can not find data record in database table context.
Upon turning on debugging, I received the following:
[array (
0 => '2493',
)]
Error code: invalidrecord
- line 1390 of /lib/dml/moodle_database.php: dml_missing_record_exception thrown
- line 1366 of /lib/dml/moodle_database.php: call to moodle_database->get_record_select()
- line 5349 of /lib/accesslib.php: call to moodle_database->get_record()
- line 1380 of /lib/questionlib.php: call to context::instance_by_id()
- line 66 of /mod/flashcard/mod_form.php: call to question_has_capability_on()
- line ? of unknownfile: call to drop_questions()
- line 69 of /mod/flashcard/mod_form.php: call to array_filter()
- line 191 of /lib/formslib.php: call to mod_flashcard_mod_form->definition()
- line 86 of /course/moodleform_mod.php: call to moodleform->moodleform()
- line 256 of /course/modedit.php: call to moodleform_mod->moodleform_mod()
I get the exact same error regardless of the course I try to add it to.
I followed the "more information about this error link" that shows up the error as well as reading the "Can not find data record in database table context" post in this forum regarding a similar issue. Taking the advice from those sources, I tried running cron several (hundred, it seemed) times to clean the context table. I uninstalled and reinstalled the plugin. I cleared the cache. I tried every browser and different computers, and the error won't go away leaving me unable to create a flashcard activity on this site.
I don't think this is an issue related to the module since it works fine in the three other sites I upgraded. I think it is just an issue of the mdl_context table missing the proper reference.
Does anyone know how I can go about fixing this? I've been strugging for hours now and I'd prefer not to revert to backup.
Thanks in advance,
Paul