moodleou / moodle-mod_oublog

Alternative blog module for Moodle 2 (including course blogs)
31 stars 27 forks source link

Error open OU blog activity #123

Closed snack753 closed 2 years ago

snack753 commented 2 years ago

We have an issue with error message with OU blog as activity.

I am able to add the activity to a course, however when clicking on on it shows: Error reading from database

We currently have a Moodle 3.11.5+ (build: 20220218) | version 2021051705.08. The version of the OU blog plugin is 3.11 r1.

Any idea what's going wrong here?

jason-platts commented 2 years ago

Is this the same as this issue https://github.com/moodleou/moodle-mod_oublog/issues/121 ?

To fix that one you need the latest version which includes the following fix https://github.com/moodleou/moodle-mod_oublog/commit/dfe5f80b5da4841f51f81729aed9566ff1f33fd6

snack753 commented 2 years ago

No, I think it's a different one. I don't even come to the state where I can enter a new blog. As soon as I click on the activity it I only see "Error reading from database"

The plugin version 3.11 r1 is the latest one, isn't it?

jason-platts commented 2 years ago

It sounds like you have the latest code.... do you have access to your server php logs to give more details on the error message please?

snack753 commented 2 years ago

Just got the details from the IT colleague: The php-log is empty, however the Debug mode reveals a similar Information than the issue (#121) you linked above.

It says: Debug-Info: Duplicate column name 'firstnamephonetic' SELECT COUNT(1) FROM (SELECT c.id, c.postid, c.title, c.message, c.timeposted, a.id AS authorid, a.firstnamephonetic, a.lastnamephonetic, a.middlename, a.alternatename, a.firstname, a.lastname,pa.firstnamephonetic, pa.lastnamephonetic, pa.middlename, pa.alternatename, pa.firstname, pa.lastname, p.title AS posttitle, p.timeposted AS postdate FROM mdl_user a, mdl_oublog_comments c INNER JOIN mdl_oublog_posts p ON (c.postid = p.id) INNER JOIN mdl_oublog_instances bi ON (bi.id = p.oubloginstancesid) INNER JOIN mdl_user pa on bi.userid = pa.id WHERE bi.oublogid = ? AND a.id = bi.userid AND p.timedeleted IS NULL AND c.userid = ? AND c.timedeleted IS NULL) p [array ( 0 => '7', 1 => '2', )] 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 1671 of /lib/dml/moodle_database.php: call to mysqli_native_moodle_database->get_records_sql() • line 1744 of /lib/dml/moodle_database.php: call to moodle_database->get_record_sql() • line 3602 of /mod/oublog/locallib.php: call to moodle_database->get_field_sql() • line 4475 of /mod/oublog/locallib.php: call to oublog_get_user_participation() • line 374 of /mod/oublog/view.php: call to oublog_stats_output_myparticipation()

However, we have the latest version of the plugin installed.

Any advice?

jason-platts commented 2 years ago

That looks like the issue that was fixed in issue #121

That fix is both in the github version and the version at https://moodle.org/plugins/download.php/25667/mod_oublog_moodle311_2020091403.zip

snack753 commented 2 years ago

I am going to verify if we have the latest version installed properly.

snack753 commented 2 years ago

Seems as if there was issue with the OU blog version. After installing the latest version again from a fresh plugin download, the issue got solved.

Thank you for the prompt support.