Skip to content

fix: keep advanced filters within the list limits of Strapi 5.63 - #13

Merged
Schero94 merged 1 commit into
mainfrom
fix/strapi-563-array-limit
Nov 18, 2026
Merged

Schero94 merged 1 commit into
mainfrom
fix/strapi-563-array-limit

Conversation

@Schero94

Copy link
Copy Markdown
Owner

Summary

Strapi 5.63 answers a filter list longer than the strapi::query arrayLimit (100) with 400. Advanced filters could build such a list, and a stored bookmark could hold one. While testing on 5.63.0 a second limit showed up: the admin parses the URL with qs defaults (arrayLimit 20), so a root $and with more than 20 conditions makes the Content Manager list view crash ("Something went wrong", ($and ?? []).reduce is not a function; same code in 5.62).

  • "is one of" / "is none of": at most 100 values, inline field error while typing (aria-invalid), Apply blocked.
  • Conditions: at most 100 with "Any condition", 20 with "All conditions". "Add condition" is disabled at the limit with a hint; an over-limit state (loaded from the URL or after switching the match mode) shows an inline role="alert" message and blocks Apply.
  • Opening a stored bookmark over these limits: warning notice with the fix ("open the list, narrow the filters, save the current view"), no navigation. 4.x already refuses to save more than 100 items per list on the server; this covers older bookmarks.
  • Advanced filters dialog: aria-describedby={undefined} so Radix stops warning about a missing Description.
  • Messages in en, de, fr, es, pt; README (limits + troubleshooting row) and CHANGELOG [Unreleased].

Release: fix: → patch.

Evidence

  • Regression tests tests/admin-filters-563.test.cjs (6 tests): fail 5/5 on main, pass on this branch. Full suite 121/121; lint, format:check, test:ts:front, test:ts:back, build, verify, verify:runtime OK.
  • Isolated Strapi 5.63.0 host (SQLite, random secrets, egress blocked, packed plugin tarball, synthetic data), Chromium at 1440 and 390, light and dark:
    • Content API: $in with 100 values → 200, 101 → 400 (the regression this fixes).
    • 101 values → inline error, Apply blocked; 20 "All" rows → Add disabled + hint, switching to "Any" re-enables; 100 "Any" rows → Add disabled + hint; switching to "All" → alert, Apply blocked; legacy bookmark with 101 values → notice, URL unchanged.
    • measure.js: documentOverflow 0, lowContrast 0, clippedText 0 in every state; smallTargets only the DS Combobox internals (inner input 22 px high, clear button 16 px), same as the native filters.
    • Console: 0 plugin messages. Remaining: useRBAC object-argument warning and React Router future-flag warning, both also on native pages (core).
  • Docs read: @strapi/core 5.63.0 middlewares/query, @strapi/utils 5.63.0 validate/validators, @strapi/admin 5.63.0 useQueryParams / Notifications.d.ts, @strapi/content-manager 5.63.0 ListView Filters, qs 6.17.0, Design System 2.3.1 TextButton / Modal, @radix-ui/react-dialog DescriptionWarning.

🤖 Generated with Claude Code

Strapi's strapi::query middleware parses the query string with qs
arrayLimit 100. A longer $in/$notIn or $or list arrives as an object
keyed by index, and from Strapi 5.63 @strapi/utils answers it with 400
("the list has more items than the query parser's arrayLimit"). The
admin itself parses the URL with qs defaults (arrayLimit 20), so a root
$and with more than 20 conditions becomes an object and the Content
Manager list view (Filters: query.filters.$and.reduce) fails to render
(Strapi 5.62 and 5.63, measured on an isolated 5.63.0 host).

- Advanced filters: at most 100 values for "is one of" / "is none of"
  (inline field error while typing), at most 100 conditions with
  "Any condition" and 20 with "All conditions" ("Add condition" is
  disabled at the limit with a hint; more conditions loaded from the
  URL or a switch of the match mode show an inline error and block
  Apply).
- Opening a bookmark whose stored query exceeds these limits shows a
  notice that explains how to fix it, without navigating.
- The Advanced filters dialog states that its title is its only label
  (aria-describedby={undefined}), so Radix no longer warns.
- Messages in en, de, fr, es, pt. README and CHANGELOG [Unreleased].

Docs read: @strapi/core 5.63.0 dist/middlewares/query.js (arrayLimit
100, depth 20); @strapi/utils 5.63.0 dist/validate/validators.js
(arrayLimitMessage, hasOnlyIndexKeys); @strapi/admin 5.63.0
useQueryParams (qs.parse with defaults) and Notifications.d.ts (type
warning, timeout); @strapi/content-manager 5.63.0 ListView Filters.mjs;
qs 6.17.0 parse (measured 100 vs 101 items); Design System 2.3.1
TextButton.d.ts (disabled) and Modal ContentProps (Radix
DialogContentProps); @radix-ui/react-dialog DescriptionWarning.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@Schero94
Schero94 force-pushed the fix/strapi-563-array-limit branch from ba37379 to dddbb21 Compare November 18, 2026 22:37
@Schero94
Schero94 merged commit e5d7dcb into main Nov 18, 2026
5 checks passed
github-actions Bot pushed a commit that referenced this pull request Nov 18, 2026
## [4.0.3](v4.0.2...v4.0.3) (2026-11-18)

### Bug Fixes

* keep advanced filters within the list limits of Strapi 5.63 ([#13](#13)) ([e5d7dcb](e5d7dcb))

### Fixed

* Advanced filters stay within what Strapi accepts: at most 100 values for "is one of" / "is none of" and at most 100 conditions with "Any condition" (the `arrayLimit` of Strapi's `strapi::query` middleware; Strapi 5.63 answers a longer list with 400), and at most 20 conditions with "All conditions" (with more, the Content Manager list view does not render on Strapi 5.62 and 5.63). The editor says so next to the fields, in all five admin languages, instead of applying a filter that fails.
* Opening a bookmark whose filters exceed these limits shows a notice that explains how to fix it, instead of a list view that fails. Magic Mark 4.x already refuses to save more than 100 items in one list; older bookmarks can still hold more.
* The Advanced filters dialog no longer logs the Radix "Missing `Description`" warning: its title is its only label (`aria-describedby={undefined}`).
@Schero94
Schero94 deleted the fix/strapi-563-array-limit branch November 19, 2026 15:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant