You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When calling eZContentClass::fetchAllClasses(true, false, false); on a MySQL 8+ based install, no results are returned.
On MariaDB installs, the method works as expected.
The cause is the ORDER BY clause in the query the method constructs when $asObject is set to true (first arg).
The query
SELECT DISTINCT cc.* FROM ezcontentclass cc, ezcontentclass_name WHERE cc.version = 0 AND cc.id = ezcontentclass_name.contentclass_id AND
cc.version = ezcontentclass_name.contentclass_version AND
( ezcontentclass_name.language_id & cc.language_mask > 0 AND
( ( cc.language_mask - ( cc.language_mask & ezcontentclass_name.language_id ) ) & 1 )
+ ( ( ( cc.language_mask - ( cc.language_mask & ezcontentclass_name.language_id ) ) & 2 ) )
<
( ezcontentclass_name.language_id & 1 )
+ ( ( ezcontentclass_name.language_id & 2 ) )
)
ORDER BY ezcontentclass_name.name ASC
The error
ERROR 3065 (HY000): Expression #1 of ORDER BY clause is not in SELECT list, references column 'ezpub_2023.ezcontentclass_name.name' which is not in SELECT list; this is incompatible with DISTINCT
The cause
The $asObject ternary does not contain the ezcontentclass_name.name field in the true condition.
The text was updated successfully, but these errors were encountered:
Noting this here until I can test and create a PR
When calling eZContentClass::fetchAllClasses(true, false, false); on a MySQL 8+ based install, no results are returned.
On MariaDB installs, the method works as expected.
The cause is the ORDER BY clause in the query the method constructs when $asObject is set to true (first arg).
The query
The error
The cause
The $asObject ternary does not contain the ezcontentclass_name.name field in the true condition.
The text was updated successfully, but these errors were encountered: