Werk #19436: Saving large rules: Spurious "selected element no longer available" error
| Component | Setup | ||
| Title | Saving large rules: Spurious "selected element no longer available" error | ||
| Date | May 21, 2026 | ||
| Level | Trivial Change | ||
| Class | Bug Fix | ||
| Compatibility | Compatible - no manual interaction needed | ||
| Checkmk versions & editions |
|
Saving a Setup rule with many entries could fail with an error like
The selected element '\r\n<long hex string>' is not longer available.
Please select something else.
even though the rule was otherwise valid and no field had actually been changed to an invalid value. This has been observed in a Check certificates rule containing many endpoints.
Whether the error showed up depended on the exact byte layout of the submitted form, so seemingly unrelated edits to the rule's contents could make the failure appear or disappear without an obvious cause.
Technical background
The cause was an upstream bug in Werkzeug's multipart form parser, fixed in Werkzeug 3.1.7 via Werkzeug PR #3089. In Checkmk this affects forms whose total POST body exceeds 64 KiB (Werkzeug's read-chunk size) — typically rules with many list entries. Single-choice fields immediately after a chunk boundary then carry a stray CRLF prefix, breaking the exact-match comparison.
Werkzeug has been bumped from 3.1.5 to 3.1.8 to pick up this fix.