Schema - Fix crash when editing a field with a null description (stable hotfix)#4198
Open
agalin920 wants to merge 1 commit into
Open
Schema - Fix crash when editing a field with a null description (stable hotfix)#4198agalin920 wants to merge 1 commit into
agalin920 wants to merge 1 commit into
Conversation
Fields whose description is null (legacy and API-created fields store it as null) crashed the Add/Edit Field modal on open with "Cannot read properties of null (reading 'length')". PR #4127 added a length validation to the description field, routing its value through getErrorMessage, which called value.length without guarding against null. Guard the length check so a null value is treated as no error. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Contributor
Coverage ReportOverall Coverage
Changed Files Coverage
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Hotfix to
stablefor a live production crash. Editing (or opening the Add/Edit modal for) a Schema field whosedescriptionisnullcrashes the app:descriptionisnullfor legacy and API-created fields — most fields created before the description field existed. This has been live onstablesince the 2026-07-01 Stable Release (#4177).Root cause
PR #4127 added
validate: ["length"]to thedescriptionconfig entry, routing its value throughgetErrorMessagefor the first time.descriptionis the only validated input whose hydrated value can benull, and the length check calledvalue.lengthwithout a null guard.Fix
Guard the length check in
getErrorMessageso anull/empty value is treated as no error. Same one-line fix as thedevPR (#4197); this hotfix stops the bleeding onstabledirectly rather than waiting for thedev → stage → beta → stablecascade.closes #4196