Recently upgraded to 21.11.01 and the "Advanced editor" page https://chnc-koha-intra.domain/cgi-bin/koha/cataloguing/editor.pl now returns Error 500. The intranet-error.log reports the following SQL syntax error: AH01215: {UNKNOWN}: DBI Exception: DBD::mysql::db selectall_arrayref failed: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ',servername' at line 3 at /usr/share/perl5/DBIx/Class/Schema.pm line 1118.: /usr/share/koha/intranet/cgi-bin/cataloguing/editor.pl AH01215: \tDBIx::Class::Schema::throw_exception(Koha::Schema=HASH(0x561f387caed8), "DBI Exception: DBD::mysql::db selectall_arrayref failed: You "...) called at /usr/share/perl5/DBIx/Class/Storage.pm line 113: /usr/share/koha/intranet/cgi-bin/cataloguing/editor.pl AH01215: \tDBIx::Class::Storage::throw_exception(DBIx::Class::Storage::DBI::mysql=HASH(0x561f389880d8), "DBI Exception: DBD::mysql::db selectall_arrayref failed: You "...) called at /usr/share/perl5/DBIx/Class/Storage/DBI.pm line 1501: /usr/share/koha/intranet/cgi-bin/cataloguing/editor.pl AH01215: \tDBIx::Class::Storage::DBI::__ANON__("DBD::mysql::db selectall_arrayref failed: You have an error i"..., DBI::db=HASH(0x561f3a9a8f90), undef) called at /usr/share/koha/intranet/cgi-bin/cataloguing/editor.pl line 80: /usr/share/koha/intranet/cgi-bin/cataloguing/editor.pl AH01215: : /usr/share/koha/intranet/cgi-bin/cataloguing/editor.pl Koha 21.11.01.000 MySQL 8.0.27
The problem is in file /usr/share/koha/intranet/cgi-bin/cataloguing/editor.pl. You've got a hard coded SQL statement that uses the MySQL (as of version 8, anyway) reserved keyword "rank." Escaping that seems to fix the issue.
Raising severity for now to get some attention on this.
This was fixed by bug 33375. *** This bug has been marked as a duplicate of bug 33375 ***