Skip to content

More explicit size ordering#12658

Closed
brianjhanson wants to merge 1 commit intov3from
bugfix/cms-12652-asset-ordering
Closed

More explicit size ordering#12658
brianjhanson wants to merge 1 commit intov3from
bugfix/cms-12652-asset-ordering

Conversation

@brianjhanson
Copy link
Contributor

Description

Explicitly orders by asset.size just in case users have a field with a handle of size. Reserved handles don't help us here because the columnMap used by orderBy uses all columns on the content table, so any entry type with a fieldHandle of size will cause issues.

Related issues

Fixes #12652

@brianjhanson brianjhanson requested a review from a team as a code owner February 9, 2023 15:10
Explicitly orders by asset.size just in case users have a field with a
handle of `size`
@brianjhanson brianjhanson force-pushed the bugfix/cms-12652-asset-ordering branch from b456434 to 2e82be5 Compare February 9, 2023 15:10
brandonkelly added a commit that referenced this pull request Feb 9, 2023
@brandonkelly
Copy link
Member

This feels a little too lighthanded. It solves this one guy’s problem, but the same could still happen from any of the other asset-specific sortable attributes that don’t specify the table name in orderBy (or any other element type, for that matter).

So I just beefed up element queries’ automatic column name mapping for 4.4 via 74211f8. Going forward, all element extension table columns will be included automatically from joinElementTable() (unless the column name is already included in the mapping).

@brandonkelly brandonkelly deleted the bugfix/cms-12652-asset-ordering branch February 9, 2023 22:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants