Could someone please shed light on this problem?
Trying to upgrade from 3.1 to 3.4.1
PHP: 7.1.2
DB: 10.0.34-MariaDB - MariaDB Server
Steps taken:
- Produced clone environment with moodle_data present there
- Copied old database to temp_version
- Set temp_version to utf8mb4_general_ci
- Copied moodle-3.4.1.zip to clone environment and unzipped
- Adapted config.php to refer to clone environment: wwwroot, dataroot and db
- Copied config.php to clone root
Started from browser.
Result see TRACE below.
What baffles me is "moodle/site:maintenanceaccess was not found! " : this capablity is not in mdl_capabilities, so of course it is not found in the db before upgrading...
Any ideas?
- line 416 of /lib/accesslib.php: call to debugging()
- line 56 of /index.php: call to has_capability()
Error reading from database
Debug info: Unknown column 'bi.requiredbytheme' in 'field list'
SELECT
bi.id,
COALESCE(bp.id, bs.id) AS blockpositionid,
bi.blockname,
bi.parentcontextid,
bi.showinsubcontexts,
bi.pagetypepattern,
bi.requiredbytheme,
bi.subpagepattern,
bi.defaultregion,
bi.defaultweight,
COALESCE(bp.visible, bs.visible, 1) AS visible,
COALESCE(bp.region, bs.region, bi.defaultregion) AS region,
COALESCE(bp.weight, bs.weight, bi.defaultweight) AS weight,
bi.configdata
, ctx.id AS ctxid, ctx.path AS ctxpath, ctx.depth AS ctxdepth, ctx.contextlevel AS ctxlevel, ctx.instanceid AS ctxinstance
FROM mdl_block_instances bi
JOIN mdl_block b ON bi.blockname = b.name
LEFT JOIN mdl_block_positions bp ON bp.blockinstanceid = bi.id
AND bp.contextid = ?
AND bp.pagetype = ?
AND bp.subpage = ?
LEFT JOIN mdl_block_positions bs ON bs.blockinstanceid = bi.id
AND bs.contextid = ?
AND bs.pagetype = ?
AND bs.subpage = ?
LEFT JOIN mdl_context ctx ON (ctx.instanceid = bi.id AND ctx.contextlevel = ?)
WHERE
(bi.parentcontextid IN (?, ?) OR (bi.showinsubcontexts = 1 AND bi.parentcontextid = ?))
AND bi.pagetypepattern IN (?,?,?,?)
AND (bi.subpagepattern IS NULL OR bi.subpagepattern = ?)
AND (bp.visible = 1 OR bp.visible IS NULL) AND (bs.visible = 1 OR bs.visible IS NULL)
AND b.visible = 1
AND ((bi.blockname IN (?,?) AND bi.requiredbytheme = 1) OR (bi.blockname NOT IN (?,?) AND bi.requiredbytheme = 0))
ORDER BY
COALESCE(bp.region, bs.region, bi.defaultregion),
COALESCE(bp.weight, bs.weight, bi.defaultweight),
bi.id
[array (
0 => 2,
1 => 'site-index',
2 => '',
3 => 1,
4 => 'site-index',
5 => '',
6 => 80,
7 => 2,
8 => 1,
9 => '1',
10 => 'site-index',
11 => 'site-index-*',
12 => 'site-*',
13 => '*',
14 => '',
15 => 'navigation',
16 => 'settings',
17 => 'navigation',
18 => 'settings',
)]
Error code: dmlreadexception
Stack trace:
- line 486 of /lib/dml/moodle_database.php: dml_read_exception thrown
- line 1155 of /lib/dml/mysqli_native_moodle_database.php: call to moodle_database->query_end()
- line 791 of /lib/blocklib.php: call to mysqli_native_moodle_database->get_recordset_sql()
- line 1499 of /lib/pagelib.php: call to block_manager->load_blocks()
- line 975 of /lib/pagelib.php: call to moodle_page->starting_output()
- line 1186 of /lib/outputrenderers.php: call to moodle_page->set_state()
- line 117 of /index.php: call to core_renderer->header()