Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error open OU blog activity #123

Closed
snack753 opened this issue Feb 22, 2022 · 7 comments
Closed

Error open OU blog activity #123

snack753 opened this issue Feb 22, 2022 · 7 comments

Comments

@snack753
Copy link

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
Copy link
Member

Is this the same as this issue #121 ?

To fix that one you need the latest version which includes the following fix
dfe5f80

@snack753
Copy link
Author

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
Copy link
Member

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
Copy link
Author

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
Copy link
Member

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
Copy link
Author

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

@snack753
Copy link
Author

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants