I recently had the dubious pleasure of debugging Views exposed sorting and can now confirm that the code in \Drupal\search_api\Plugin\views\sort\SearchApiSort::query() is indeed required. Furthermore, we should let \Drupal\search_api\Plugin\views\query\SearchApiQuery::$orderby default to NULL, not [], to make the code work exactly as intended.
It also seems like we can remove the reference to the (ten years old) #2145547: Exposed sort order doesn't work when combined with non-exposed sort on the same field.

Issue fork search_api-3449298

Command icon Show commands

Start within a Git clone of the project using the version control instructions.

Or, if you do not have SSH keys set up on git.drupalcode.org:

Comments

drunken monkey created an issue. See original summary.

immaculatexavier made their first commit to this issue’s fork.

immaculatexavier’s picture

Status: Active » Needs review

drunken monkey’s picture

Status: Needs review » Fixed

Looks good, thanks!
Merged.

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.