Texts view does not sort rows

Created on 27 March 2024, 9 months ago
Updated 22 November 2024, about 1 month ago

Steps to reproduce

Go to /admin/content/texts and refresh the page. The order of the rows is different every time.

Proposed resolution

Sort the rows either alphabetically or by date

πŸ› Bug report
Status

Active

Version

1.0

Component

Code

Created by

πŸ‡¨πŸ‡­Switzerland dulnan

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

Merge Requests

Comments & Activities

  • Issue created by @dulnan
  • First commit to issue fork.
  • πŸ‡ΊπŸ‡ΈUnited States kurttrowbridge

    I was facing this issue too after having migrated in a set of Texts entities from a CSV I had prepared.

    First, I should note that I was confused that TextsListBuilder seemingly isn't used for the /admin/content/texts routeβ€”I think it might not be in use at all. (You can make it work for that page by adding a route that points to it, but its contents are different from what's in that table now, so I didn't want to change it.)

    I found that TranslationFormBase.php is what controls the contents of that page instead, and that had a single sort criterion based on the time of the entity's last update, sorted in descending order. In my case, that timestamp was the same for all of the entities I'd imported, so they continually got resorted.

    I added another sort criterion so that after it sorts by changed time, it sorts by the entity's ID. That's available in the merge request I've provided.

    Thanks!

Production build 0.71.5 2024