Installing and upgrading help

dmlreadexception error while upgrading from 3.3.5 -> 3.3.6

 
Picture of Douglas Ward
dmlreadexception error while upgrading from 3.3.5 -> 3.3.6
 

Upgrading a production installation from 3.3.5+ -> 3.3.6 returns an error connecting to database error. When I run the developer debug setting the following error is returned. It looks like the SQL statement is looking for a field that no longer exists in the database. Has anyone else run into this issue during this upgrade? I tried filing a bug report in the bug tracker but cannot get around the rule that says I must vote for or follow similar issues. My search skills failed me as I cannot find a similar issue that isn't from a much older version of Moodle. Following an issue had no effect - still stuck. Any thoughts on how to get around this error would be most appreciated.

Debug info: 

Unknown column 'p.deleted' in 'where clause'

SELECT p.*, f.type AS forumtype, d.forum, d.groupid,

d.timestart, d.timeend, u.id AS duserid,u.picture,u.firstname,u.lastname,u.firstnamephonetic,u.lastnamephonetic,u.middlename,u.alternatename,u.imagealt,u.email

FROM mdl_forum_posts p

JOIN mdl_forum_discussions d ON d.id = p.discussion

JOIN mdl_forum f ON f.id = d.forum

JOIN mdl_user u ON u.id = p.userid

WHERE p.created > ? AND f.course = ? AND p.deleted <> 1

ORDER BY p.id ASC

[array (

0 => 1526392400,

1 => '1',

)]

Error code: dmlreadexception

Stack trace:

line 486 of /lib/dml/moodle_database.php: dml_read_exception thrown

line 1216 of /lib/dml/mysqli_native_moodle_database.php: call to moodle_database->query_end()

line 1578 of /mod/forum/lib.php: call to mysqli_native_moodle_database->get_records_sql()

line ? of unknownfile: call to forum_print_recent_activity()

line 7680 of /lib/moodlelib.php: call to call_user_func_array()

line 213 of /blocks/recent_activity/block_recent_activity.php: call to component_callback()

line 74 of /blocks/recent_activity/block_recent_activity.php: call to block_recent_activity->get_modules_recent_activity()

line 288 of /blocks/moodleblock.class.php: call to block_recent_activity->get_content()

line 230 of /blocks/moodleblock.class.php: call to block_base->formatted_contents()

line 1205 of /lib/blocklib.php: call to block_base->get_content_for_output()

line 1257 of /lib/blocklib.php: call to block_manager->create_block_contents()

line 374 of /lib/blocklib.php: call to block_manager->ensure_content_created()

line 3839 of /lib/outputrenderers.php: call to block_manager->region_has_content()

line 44 of /theme/remui/layout/common.php: call to core_renderer->blocks()

line 26 of /theme/remui/layout/columns2.php: call to require_once()

line 1162 of /lib/outputrenderers.php: call to include()

line 1092 of /lib/outputrenderers.php: call to core_renderer->render_page_layout()

line 120 of /admin/settings.php: call to core_renderer->header()

 
Average of ratings: -
Picture of Leon Stringer
Re: dmlreadexception error while upgrading from 3.3.5 -> 3.3.6
Particularly helpful Moodlers

I've run through a test upgrade from 3.3.5 to 3.3.6 and I didn't get this issue.

Your analysis is almost right: a new database field was added in 3.3.6 and the error you're getting is because it's not there. It should get added during the upgrade process.

A potential explanation could be that the source code for your forum had been modified with a later version number which would prevent the forum-specific upgrade. If you've still got your site's 3.3.5 source code you could check the value for $plugin->version in mod/forum/version.php (should be 2017051501).

If you need further help, please let us know more about the environment (types and versions for web server, operating system, database, and PHP version).

 
Average of ratings: -