When a OU Blog is set to use Separate individual blogs and a student or lecturer clicks on the blog they get error reading database.
With debugging turned on this message is displayed:
Debug info: Unknown column 'U.id' in 'where clause'
SELECT COUNT(1) FROM (SELECT p.id, p.title, p.timeposted, p.groupid,
p.allowcomments, p.visibility,
bi.userid, bi.name AS blogname, u.id AS posteridx,u.picture,u.firstname,u.lastname,u.firstnamephonetic,u.lastnamephonetic,u.middlename,u.alternatename,u.imagealt,u.email
FROM mdl_oublog_posts p
INNER JOIN mdl_oublog_instances bi ON p.oubloginstancesid = bi.id
INNER JOIN mdl_user u ON bi.userid = u.id
WHERE p.deletedby IS NULL AND oublogid = ?
AND p.timedeleted IS NULL AND U.id = ?
ORDER BY p.timeposted DESC ) as p
[array (
0 => '65',
1 => 11129,
)]
Error code: dmlreadexception
Stack trace:
line 443 of /lib/dml/moodle_database.php: dml_read_exception thrown
line 1062 of /lib/dml/mysqli_native_moodle_database.php: call to moodle_database->query_end()
line 1428 of /lib/dml/moodle_database.php: call to mysqli_native_moodle_database->get_records_sql()
line 1501 of /lib/dml/moodle_database.php: call to moodle_database->get_record_sql()
line 4408 of /mod/oublog/locallib.php: call to moodle_database->get_field_sql()
line 4098 of /mod/oublog/locallib.php: call to oublog_get_participation_details()
line 319 of /mod/oublog/view.php: call to oublog_stats_output_participation()
This happens to existing blogs and newly created blogs.
We are using Moodle 2.6.8 and oublog version 2014072501
This is happening on 2 different Moodles, both on 2.6.8. both were recently upgraded from Moodle 2.6.6 and oublog 2014042500
Any suggestions how to fix this?