While trying to improve the performance of our WeBWork server (ww- and pg-version 2.15 on Ubunutu 20.04.2) and its (opaque as well as wwlink) communication with our Moodle server, it seems I have updated(?) a perl module or a linux file I shouldn't have.
While the webwork2-frontpage looks normal, trying to access the admin-course shows the following error message:
Warning messages
It looks like the database is missing a column. You may need to upgrade your course tables. If this is the admin course then you will need to upgrade the admin tables using the upgrade_admin_db.pl script. at /opt/webwork/webwork2/lib/WeBWorK/DB/Schema/NewSQL/Std.pm line 834.
Error messages
DBD::mysql::st execute failed:
Unknown column 'ARRAY(0x5629027da4c0)' in 'field list' at
/opt/webwork/webwork2/lib/WeBWorK/DB/Schema/NewSQL/Std.pm line 837.
Call stack
The information below can help locate the source of the problem.
in WeBWorK::DB::Schema::NewSQL::Std::handle_error called at line 418 of /opt/webwork/webwork2/lib/WeBWorK/DB/Schema/NewSQL/Std.pm
in WeBWorK::DB::Schema::NewSQL::Std::_get_fields_where_prepex called at line 386 of /opt/webwork/webwork2/lib/WeBWorK/DB/Schema/NewSQL/Std.pm
in WeBWorK::DB::Schema::NewSQL::Std::get_fields_where called at line 484 of /opt/webwork/webwork2/lib/WeBWorK/DB.pm
in WeBWorK::DB::listUsers called at line 279 of /opt/webwork/webwork2/lib/WeBWorK/ContentGenerator/Login.pm
in WeBWorK::ContentGenerator::Login::body called at line 155 of /opt/webwork/webwork2/lib/WeBWorK/Template.pm
in WeBWorK::Template::template called at line 610 of /opt/webwork/webwork2/lib/WeBWorK/ContentGenerator.pm
in WeBWorK::ContentGenerator::content called at line 233 of /opt/webwork/webwork2/lib/WeBWorK/ContentGenerator.pm
in WeBWorK::ContentGenerator::go called at line 386 of /opt/webwork/webwork2/lib/WeBWorK.pm
Request information
Method | GET |
URI | /webwork2/admin/ |
Running the upgrade_admin_db.pl
script does not resolve the issue and, in fact, states:
Harmless: admin_set has extra column 'published' for older course.
Harmless: admin_set_user has extra column 'published' for older course.
Admin Course Up to Date
Trying to access any other course leads to the same warning and almost the same error message (except the hex code inside ARRAY, which is changing anyway, and in the first case 'field list' replaced by 'where clause'), and either of two call stacks depending on the course:
in WeBWorK::DB::Schema::NewSQL::Std::handle_error called at line 364 of /opt/webwork/webwork2/lib/WeBWorK/DB/Schema/NewSQL/Std.pm
in WeBWorK::DB::Schema::NewSQL::Std::count_where called at line 374 of /opt/webwork/webwork2/lib/WeBWorK/DB/Schema/NewSQL/Std.pm
in WeBWorK::DB::Schema::NewSQL::Std::exists_where called at line 850 of /opt/webwork/webwork2/lib/WeBWorK/DB.pm
in WeBWorK::DB::settingExists called at line 1230 of /opt/webwork/webwork2/lib/WeBWorK/ContentGenerator.pm
in WeBWorK::ContentGenerator::title called at line 64 of /opt/webwork/webwork2/lib/WeBWorK/ContentGenerator/Login.pm
in WeBWorK::ContentGenerator::Login::title called at line 155 of /opt/webwork/webwork2/lib/WeBWorK/Template.pm
in WeBWorK::Template::template called at line 610 of /opt/webwork/webwork2/lib/WeBWorK/ContentGenerator.pm
in WeBWorK::ContentGenerator::content called at line 233 of /opt/webwork/webwork2/lib/WeBWorK/ContentGenerator.pm
in WeBWorK::ContentGenerator::go called at line 386 of /opt/webwork/webwork2/lib/WeBWorK.pm
or
in WeBWorK::DB::Schema::NewSQL::Std::handle_error called at line 418 of /opt/webwork/webwork2/lib/WeBWorK/DB/Schema/NewSQL/Std.pm
in WeBWorK::DB::Schema::NewSQL::Std::_get_fields_where_prepex called at line 386 of /opt/webwork/webwork2/lib/WeBWorK/DB/Schema/NewSQL/Std.pm
in WeBWorK::DB::Schema::NewSQL::Std::get_fields_where called at line 446 of /opt/webwork/webwork2/lib/WeBWorK/DB/Schema/NewSQL/Std.pm
in WeBWorK::DB::Schema::NewSQL::Std::get_records_where called at line 746 of /opt/webwork/webwork2/lib/WeBWorK/DB/Schema/NewSQL/Std.pm
in WeBWorK::DB::Schema::NewSQL::Std::gets called at line 502 of /opt/webwork/webwork2/lib/WeBWorK/DB.pm
in WeBWorK::DB::getUsers called at line 497 of /opt/webwork/webwork2/lib/WeBWorK/DB.pm
in WeBWorK::DB::getUser called at line 466 of /opt/webwork/webwork2/lib/WeBWorK/Authen.pm
in WeBWorK::Authen::check_user called at line 302 of /opt/webwork/webwork2/lib/WeBWorK/Authen.pm
in WeBWorK::Authen::do_verify called at line 216 of /opt/webwork/webwork2/lib/WeBWorK/Authen.pm
in WeBWorK::Authen::verify called at line 321 of /opt/webwork/webwork2/lib/WeBWorK.pm
So, it seems that for some reason perl now uses the reference to the arrays and variables instead of the dereferenced versions. E.g., having debugged /opt/webwork/webwork2/lib/WeBWorK/DB/Schema/NewSQL/Std.pm,the variable $stmt in line 415 now reads "SELECT `ARRAY(0x5629027da4c0)` FROM `admin_user` " which then triggers the above error message.
Unfortunately, with my very limited knowledge of perl, that's all I found out so far.
Has anyone experienced anything like this before? Or any suggestions what to do to fix it? I am grateful for any hint -- thanks.