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
Description of the problem
When using a custom field in the orderby option of the exp:channel:entries the generated SQL is incorrect. Also, there is a notice that a PHP variable is not defined.
How To Reproduce
Steps to reproduce the behavior:
Install EE with the default theme.
Enable Site Manager (under settings).
Create a new site.
Edit the default_site/home.group/index.html template the following channel entries tag for the list of blog entries. (The important part is adding orderby='seo_title' site="not random" as parameters to the channel entries tag.)
Visit the site home page.
{exp:channel:entries orderby='seo_title' site="not random" channel='{ch}' disable='{ch_disable}' limit='4'}
{!-- listing as a snippet, as it's used through more than one template --}
{snp_blog_list}
{!-- no results --}
{if no_results}
<divclass="alert warn no-results"><p>{gv_entries_none}</p></div>
{/if}
{/exp:channel:entries}
Error Messages
SQLSTATE[42S22]: Column not found: 1054 Unknown column 'Array' in 'field list':
SELECT DISTINCT t.entry_id , exp_channels.channel_id , t.sticky , Array 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 t.entry_id = wd.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 LEFT JOIN exp_channel_data_field_72 ON exp_channel_data_field_72.entry_id = t.entry_id WHERE t.entry_id != '' AND t.site_id IN ('1','2') AND t.entry_date < 1550500263 AND (t.expiration_date = 0 OR t.expiration_date > 1550500263) AND t.channel_id IN (7) AND exp_categories.cat_id IN ('9','10','11','12','13','14') AND t.status = 'open' AND t.status != 'closed'
The steps to reproduce this seem very incomplete. The code you're referencing only runs when pulling entries from multiple sites and/or ordering by multiple fields, and the query in your error is pulling from multiple sites, but there's no mention of that in the instructions and your channel entries tag is very simple. Is this really all that's needed to reproduce the issue from a fresh install? I can't reproduce, and I imagine we would have heard about this by now if it were that simple to reproduce, ordering by a custom field is a very common task and this code rarely changes. But, I could see there being problems if you had a more narrow use case like ordering by fields from different sites.
Description of the problem
When using a custom field in the
orderby
option of theexp:channel:entries
the generated SQL is incorrect. Also, there is a notice that a PHP variable is not defined.How To Reproduce
Steps to reproduce the behavior:
default_site/home.group/index.html
template the following channel entries tag for the list of blog entries. (The important part is addingorderby='seo_title' site="not random"
as parameters to the channel entries tag.)Error Messages
Environment Details:
Possible Solution
Implode the field list on these two lines
And change the concatenation assignment to just an assignment on this line
The text was updated successfully, but these errors were encountered: