QueryParamBuilder setting a limit when one is absent breaks VBO

Created on 25 September 2025, 13 days ago

Problem/Motivation

See https://git.drupalcode.org/project/search_api_opensearch/-/blob/3.x/src/...

    // Set the size and from parameters.
    $body['from'] = $query->getOption('offset') ?? self::DEFAULT_OFFSET;
    $body['size'] = $query->getOption('limit') ?? self::DEFAULT_LIMIT;

If a query is passed in that has no limit, then a limit of 10 is set. This means that any VBO submission for more than 10 items will only handle 10 items, even though it claims to handle more.

It puzzles me why we would want a limit of 10 on any query that comes in without a limit. Chances are those queries are using a condition of some sort and want to see all results for said condition. If you then add an arbitrary limit of 10, things get funky.

Steps to reproduce

  1. Build a search api view with an opensearch index
  2. Add VBO to said view
  3. Select more than 10 rows
  4. Submit
  5. See that the output only mentions the first 10 being handled

Proposed resolution

Do not set a default limit or offset if they are absent on the original query.

Remaining tasks

Do not set a default limit or offset if they are absent on the original query.

User interface changes

N/A

API changes

N/A

Data model changes

N/A

🐛 Bug report
Status

Active

Version

2.3

Component

Code

Created by

🇧🇪Belgium kristiaanvandeneynde Antwerp, Belgium

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

Merge Requests

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

Production build 0.71.5 2024