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

PHP82 Error thrown: Column 'mdl_user.auth' is invalid #91

Open
utmcgrep opened this issue Dec 16, 2024 · 1 comment
Open

PHP82 Error thrown: Column 'mdl_user.auth' is invalid #91

utmcgrep opened this issue Dec 16, 2024 · 1 comment

Comments

@utmcgrep
Copy link

Hello! Sorry to bother you again. I just wanted to the let you know that in my moodle 4.5 testsystem, the plugin is throwing a database error again. I know the plugin is not validated for 4.5 but thought I'd pass along the info.
All the best, Maresa :)

[16-Dec-2024 12:04:32 Europe/Berlin] Default exception handler: Error reading from database Debug: SQLState: 42000<br>
Error Code: 8120<br>
Message: [Microsoft][ODBC Driver 17 for SQL Server][SQL Server]Column 'mdl_user.auth' is invalid in the select list because it is not contained in either an aggregate function or the GROUP BY clause.<br>

SELECT u.* FROM mdl_user u LEFT JOIN (SELECT DISTINCT eu1_u.id
              FROM mdl_user eu1_u
            JOIN mdl_user_enrolments ej1_ue ON ej1_ue.userid = eu1_u.id
JOIN mdl_enrol ej1_e ON (ej1_e.id = ej1_ue.enrolid AND ej1_e.courseid = '6')
JOIN (SELECT DISTINCT userid
                                FROM mdl_role_assignments
                               WHERE contextid IN (1,3,155,167)
                                     AND roleid IN (6,10,13,14,15)
                             ) ra ON ra.userid = eu1_u.id
             WHERE 1 = 1 AND eu1_u.deleted = 0 AND eu1_u.id <> '1' AND eu1_u.deleted = 0) eu ON eu.id=u.id LEFT JOIN mdl_publication_file files ON (u.id = files.userid) WHERE u.deleted = 0 AND eu.id=u.id AND files.publication = 1 GROUP BY u.id
[array (
  0 => '6',
  1 => '1',
)]
Error code: dmlreadexception
* line 497 of \lib\dml\moodle_database.php: dml_read_exception thrown
* line 331 of \lib\dml\sqlsrv_native_moodle_database.php: call to moodle_database->query_end()
* line 438 of \lib\dml\sqlsrv_native_moodle_database.php: call to sqlsrv_native_moodle_database->query_end()
* line 909 of \lib\dml\sqlsrv_native_moodle_database.php: call to sqlsrv_native_moodle_database->do_query()
* line 985 of \lib\dml\sqlsrv_native_moodle_database.php: call to sqlsrv_native_moodle_database->get_recordset_sql()
* line 533 of \mod\publication\locallib.php: call to sqlsrv_native_moodle_database->get_records_sql()
* line 250 of \mod\publication\classes\local\allfilestable\base.php: call to publication->get_users()
* line 148 of \mod\publication\classes\local\allfilestable\base.php: call to mod_publication\local\allfilestable\base->init_sql()
* line 561 of \mod\publication\locallib.php: call to mod_publication\local\allfilestable\base->__construct()
* line 637 of \mod\publication\locallib.php: call to publication->get_allfilestable()
* line 215 of \mod\publication\view.php: call to publication->display_allfilesform()

@bluetom bluetom added the bug label Dec 20, 2024
@bluetom
Copy link
Member

bluetom commented Dec 20, 2024

Hi Maresa,
thank you for bringing up this issue.
I put it in the backlog for the next release.
Best regards,
Thomas

@bluetom bluetom self-assigned this Dec 20, 2024
@bluetom bluetom removed their assignment Dec 29, 2024
@bluetom bluetom added duplicate and removed bug labels Dec 29, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants