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
EE 6.4.2
This functionality works fine on the live version which runs using MariaDb.
The error is on the local version using MAMP with MySQL 5.7.34 and php 7.4.21.
This is to show a list of the top 5 trending entries for the specific category being viewed in the last week (start on tweaked in dev environment because entries are older)
For some reason the orderby="view_count_one" is not being accepted.
Exception Caught SQLSTATE[HY000]: General error: 3065 Expression #2 of ORDER BY clause is not in SELECT list, references column 'ajot_ee.t.entry_date' which is not in SELECT list; this is incompatible with DISTINCT: SELECT DISTINCT t.entry_id , exp_channels.channel_id , t.view_count_one FROM exp_channel_titles AS t LEFT JOIN exp_channels ON t.channel_id = exp_channels.channel_id LEFT JOIN exp_channel_data AS wd ON wd.entry_id = t.entry_id INNER JOIN exp_category_posts ON t.entry_id = exp_category_posts.entry_id INNER JOIN exp_categories ON exp_category_posts.cat_id = exp_categories.cat_id WHERE t.entry_id != '' AND t.site_id IN ('1') AND t.entry_date <= 1670518054 AND (t.expiration_date = 0 OR t.expiration_date > 1670518054) AND t.channel_id IN (1,2,23,24) AND t.entry_date >= '1657295256' AND exp_categories.cat_id = '1' AND t.status IN ('open','featured') AND t.status != 'closed' AND ( (wd.site_id=1 AND wd.field_id_4!="" AND wd.site_id=1 AND wd.field_id_4 IS NOT NULL) )ORDER BY t.view_count_one desc, t.entry_date desc, t.entry_id desc LIMIT 0, 5
ee/legacy/database/drivers/mysqli/mysqli_connection.php:114
Stack Trace: Please include when reporting this error
EE 6.4.2
This functionality works fine on the live version which runs using MariaDb.
The error is on the local version using MAMP with MySQL 5.7.34 and php 7.4.21.
This is to show a list of the top 5 trending entries for the specific category being viewed in the last week (start on tweaked in dev environment because entries are older)
URL
localhost:8888/site/news/category/category-name
{exp:channel:entries channel="news" status="open" orderby="view_count_one" sort="desc" start_on="-5 weeks" search:image_1="not IS_EMPTY" limit="5" sticky="n" dynamic="yes"}
For some reason the orderby="view_count_one" is not being accepted.
Exception Caught SQLSTATE[HY000]: General error: 3065 Expression #2 of ORDER BY clause is not in SELECT list, references column 'ajot_ee.t.entry_date' which is not in SELECT list; this is incompatible with DISTINCT: SELECT DISTINCT t.entry_id , exp_channels.channel_id , t.view_count_one FROM exp_channel_titles AS t LEFT JOIN exp_channels ON t.channel_id = exp_channels.channel_id LEFT JOIN exp_channel_data AS wd ON wd.entry_id = t.entry_id INNER JOIN exp_category_posts ON t.entry_id = exp_category_posts.entry_id INNER JOIN exp_categories ON exp_category_posts.cat_id = exp_categories.cat_id WHERE t.entry_id != '' AND t.site_id IN ('1') AND t.entry_date <= 1670518054 AND (t.expiration_date = 0 OR t.expiration_date > 1670518054) AND t.channel_id IN (1,2,23,24) AND t.entry_date >= '1657295256' AND exp_categories.cat_id = '1' AND t.status IN ('open','featured') AND t.status != 'closed' AND ( (wd.site_id=1 AND wd.field_id_4!="" AND wd.site_id=1 AND wd.field_id_4 IS NOT NULL) )ORDER BY t.view_count_one desc, t.entry_date desc, t.entry_id desc LIMIT 0, 5
ee/legacy/database/drivers/mysqli/mysqli_connection.php:114
Stack Trace: Please include when reporting this error
The text was updated successfully, but these errors were encountered: