Error reading from database

Error reading from database

by Argjend Bytyqi -
Number of replies: 2

Hello,

I'm trying to upgrade the version of Moodle from 3.8.2 to 3.9+ everything goes fine until I'm trying to apply a theme that I'm using on my old version the theme installation it's done by adding certain of files to those folders as blocks, local, report also theme/(theme-itself).

I'm using ubuntu server and executing this command
sudo cp -a /opt/bitnami/apps/moodle/htdocs.backup/theme/edumy /opt/bitnami/apps/moodle/htdocs/theme/
to copy the theme files and from this step I start to get this error as shown below!

Debug info: Unknown column 'sortorder' in 'order clause'
SELECT * FROM mdl_license ORDER BY sortorder ASC
[array (
)]
Error code: dmlreadexception
Stack trace:
  • line 486 of /lib/dml/moodle_database.php: dml_read_exception thrown
  • line 1273 of /lib/dml/mysqli_native_moodle_database.php: call to moodle_database->query_end()
  • line 1453 of /lib/dml/moodle_database.php: call to mysqli_native_moodle_database->get_records_sql()
  • line 232 of /lib/licenselib.php: call to moodle_database->get_records_select()
  • line 362 of /lib/licenselib.php: call to license_manager::get_licenses()
  • line 379 of /lib/licenselib.php: call to license_manager::get_active_licenses()
  • line 33 of /admin/settings/license.php: call to license_manager::get_active_licenses_as_array()
  • line 8670 of /lib/adminlib.php: call to require()
  • line 4351 of /lib/navigationlib.php: call to admin_get_root()
  • line 4214 of /lib/navigationlib.php: call to settings_navigation->load_administration_settings()
  • line 769 of /lib/pagelib.php: call to settings_navigation->initialise()
  • line 830 of /lib/pagelib.php: call to moodle_page->magic_get_settingsnav()
  • line 3504 of /lib/navigationlib.php: call to moodle_page->__get()
  • line 3548 of /lib/navigationlib.php: call to navbar->has_items()
  • line 4534 of /lib/outputrenderers.php: call to navbar->get_items()
  • line 229 of /theme/edumy/ccn/ccn_themehandler.php: call to core_renderer->region_main_settings_menu()
  • line 3 of /theme/edumy/layout/ccn_maintenance.php: call to include()
  • line 1374 of /lib/outputrenderers.php: call to include()
  • line 1304 of /lib/outputrenderers.php: call to core_renderer->render_page_layout()
  • line 497 of /lib/outputrenderers.php: call to core_renderer->header()
  • line 149 of /admin/renderer.php: call to plugin_renderer_base->__call()
  • line 358 of /admin/index.php: call to core_admin_renderer->upgrade_confirm_page()

Average of ratings: -
In reply to Argjend Bytyqi

Re: Error reading from database

by Leon Stringer -
Picture of Core developers Picture of Particularly helpful Moodlers

It looks like the theme is getting in the way of the upgrade. Either 1) switch to the default Boost theme before starting the upgrade (i.e. with the Moodle 3.8.2 source code in place), or 2) add the following line to config.php:

$CFG->theme = 'boost';

This should allow the upgrade to proceed. The theme is possibly not compatible with Moodle 3.9 so might need some development work before you can use the theme with the upgraded site.

Average of ratings: Useful (1)
In reply to Leon Stringer

Re: Error reading from database

by Argjend Bytyqi -
Thank you for the suggestions switching to the boost theme works!

Best!