Problem/Motivation

Views. Scored Sort relies on a views_pre_render hook to sort the views. Limits on the view occur in the query, meaning that if a view uses a limit the pre-render hook will sort on the results after the limit has been enforced. So if there's 1000 results, and then a limit of 3 is placed on the results list, the pre_render hook will only sort the 3 results, rather than the 1000 that it should have sorted.

Proposed resolution

Use a query_alter to remove the limit, but capture the value and send it to the scoring service, then use that value to array_slice.

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:

  • allow-limits Comparechanges, plain diff MR !2
  • 1.x Comparecompare

Comments

mdranove created an issue. See original summary.

mdranove’s picture

Status: Active » Fixed
mdranove’s picture

Status: Fixed » Closed (fixed)

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