dmlreadexception table "mdl_activity" does not exist

dmlreadexception table "mdl_activity" does not exist

by Stephen Overall -
Number of replies: 1

Hello:

I'm getting the error listed below when running the XMLDB editor "Check foreign keys" routine on my Moodle 2.3.4+ (build 20130208) production installation (CentOS VPS) which otherwise is and has been running well. I've been updating the Moodle 2.3.x code base weekly more or less on this particular installation since August 2012 without incident.

As a check I set up on my desktop WAMP server a test site using a freshly downloaded Moodle 2.3.4+ (build 20130208) zip file. The test site runs the XMLDB editor "Check foreign keys" routine without error and also reports "no violated foreign keys found" (good news).

I notice that the error message below lists a query involving a table installed by the contributed module Exabis portfolio block. I have not installed the Exabis block on my local test site. I searched the Exabis db/install file but no mention of an "activity" table.

I've searched moodle.org but not found a Moodle 2 database table named "activity" and my fresh 2.3.4+ zip file did not install an "activity" table.

So (1) is this something I should worry about or not? (2) Any thoughts on what may be causing this error? (3) Where might this reference to a table named "activity" be coming from?

Thanks.

----

Debug info: Table 'mymoodledbname.mdl_activity' doesn't exist
SELECT count(1) FROM mdl_block_exacompdescractiv_mm t1 LEFT JOIN mdl_activity t2 ON t1.activityid = t2.id WHERE t1.activityid <> ? AND t2.id IS NULL
[array (
0 => NULL,
)]
Error code: dmlreadexception
Stack trace:

    line 407 of /lib/dml/moodle_database.php: dml_read_exception thrown
    line 966 of /lib/dml/mysqli_native_moodle_database.php: call to moodle_database->query_end()
    line 1360 of /lib/dml/moodle_database.php: call to mysqli_native_moodle_database->get_records_sql()
    line 1433 of /lib/dml/moodle_database.php: call to moodle_database->get_record_sql()
    line 1604 of /lib/dml/moodle_database.php: call to moodle_database->get_field_sql()
    line 105 of /admin/tool/xmldb/actions/check_foreign_keys/check_foreign_keys.class.php: call to moodle_database->count_records_sql()
    line 159 of /admin/tool/xmldb/actions/XMLDBCheckAction.class.php: call to check_foreign_keys->check_table()
    line 69 of /admin/tool/xmldb/index.php: call to XMLDBCheckAction->invoke()

<<end>>

 

Average of ratings: -
In reply to Stephen Overall

Re: dmlreadexception table "mdl_activity" does not exist

by Tim Hunt -
Picture of Core developers Picture of Documentation writers Picture of Particularly helpful Moodlers Picture of Peer reviewers Picture of Plugin developers

If you look at the details in the error message, you can see the name of the other table in the link: mdl_block_exacompdescractiv_mm

I think you can get the plugin name from there.

However, you don't really need to worry about this.