"Sort criteria" is not respected anymore

Created on 10 April 2023, about 1 year ago
Updated 5 September 2023, 10 months ago

Problem/Motivation

My entityreference field shows users with particular roles; they're ordered by UID by default. I sort them by "User: Name" for better UX. It stops working after updating from 7.x-1.5 to 7.x-1.8, defaulting back to the UID default sort.

Steps to reproduce

  1. Create an entityreference view of users; filter only users with a particular role; do not add any sort criteria yet.
  2. Add a new Entity Reference field with Select List widget to a content type. Under Entity Selection, reference the view above.
  3. Create a new node of the above content type, notice the Entity Reference field users are sorted by UID as expected.
  4. Edit the source entityreference view, adding Sort Criteria > User: Name (sort ascending). You should see the user names presented in alphabetical order in the preview below. Save the view.
  5. Flush caches to be safe
  6. Create a new node of the above content type, notice the Entity Reference field user entities are still sorted by UID, which does not match the entityreference view.
πŸ› Bug report
Status

Active

Version

1.8

Component

Code

Created by

πŸ‡ΊπŸ‡ΈUnited States nodecode

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Production build 0.69.0 2024