WeBWorK Main Forum

Searching by textbook fails

Searching by textbook fails

by Lars Jensen -
Number of replies: 2
Hi Everyone,

We just installed the github version of webwork with the OpenProblemLibrary. Everything seems to be OK, except searching by textbook in the library browser. When I select a specific textbook, I get this error:

Error messages

DBD::mysql::db selectall_arrayref failed: Incorrect table name '' at /opt/webwork/webwork2/lib/WeBWorK/Utils/ListingDB.pm line 381.

Call stack

The information below can help locate the source of the problem.

  • in WeBWorK::Utils::ListingDB::getDBListings called at line 399 of /opt/webwork/webwork2/lib/WeBWorK/Utils/ListingDB.pm
  • in WeBWorK::Utils::ListingDB::countDBListings called at line 614 of /opt/webwork/webwork2/lib/WeBWorK/ContentGenerator/Instructor/SetMaker.pm
  • in WeBWorK::ContentGenerator::Instructor::SetMaker::browse_library_panel2adv called at line 431 of /opt/webwork/webwork2/lib/WeBWorK/ContentGenerator/Instructor/SetMaker.pm
  • in WeBWorK::ContentGenerator::Instructor::SetMaker::browse_library_panel called at line 799 of /opt/webwork/webwork2/lib/WeBWorK/ContentGenerator/Instructor/SetMaker.pm
  • in WeBWorK::ContentGenerator::Instructor::SetMaker::make_top_row called at line 1374 of /opt/webwork/webwork2/lib/WeBWorK/ContentGenerator/Instructor/SetMaker.pm
  • in WeBWorK::ContentGenerator::Instructor::SetMaker::body called at line 152 of /opt/webwork/webwork2/lib/WeBWorK/Template.pm
  • in WeBWorK::Template::template called at line 496 of /opt/webwork/webwork2/lib/WeBWorK/ContentGenerator.pm
  • in WeBWorK::ContentGenerator::content called at line 200 of /opt/webwork/webwork2/lib/WeBWorK/ContentGenerator.pm
  • in WeBWorK::ContentGenerator::go called at line 371 of /opt/webwork/webwork2/lib/WeBWorK.pm

Every other way of searching for problems works fine, and the NPL-Directory button works fine. The Textbooks file is present in /webwork-open-problem-library/OpenProblemLibrary. When I run OPL-update, I get the following output:

Use of uninitialized value $WeBWorK::Constants::WEBWORK_DIRECTORY in concatenation (.) or string at /opt/webwork/webwork2/lib/WeBWorK/Constants.pm line 38.
Library version is 2.5; using OPLtables!
Mysql database reinitialized.
Reading in textbook data from Textbooks in the library /opt/webwork/libraries/webwork-open-problem-library/OpenProblemLibrary.
Converting data from tagged pgfiles into mysql.
The script completes successfully after updating about 30000 problems.

Any help appreciated.
Lars.



In reply to Lars Jensen

Re: Searching by textbook fails

by Paul Pearson -
Hi Lars,

About 1 month ago Hal Sadofsky found and fixed this bug on his machine (and the bugfix should be in the latest devel version ww2.5.1.1). Here's what Hal did to fix it:

--------------------

I think I found the error. Line 366 of ListingDB.pm begins

$tables{DBsection}.

I changed that to

$tables{dbsection}

on my server, then restarted apache, and now I can search by textbook.

------------------------

Best Regards,

Paul Pearson