fix(manager): remove URI maxLength and show URI field on validation errors#16895
Open
Ibochkarev wants to merge 1 commit intomodxcms:3.xfrom
Open
fix(manager): remove URI maxLength and show URI field on validation errors#16895Ibochkarev wants to merge 1 commit intomodxcms:3.xfrom
Ibochkarev wants to merge 1 commit intomodxcms:3.xfrom
Conversation
…rrors (modxcms#13815) - Remove maxLength from URI field in resource panel and tree quick update - Override failure to reveal URI field when server returns uri errors - In failureSubmit, reveal URI field when client validation fails on uri - Add revealUriField() and hasUriError() for clarity and reuse
Code ReviewSummaryRemoves client-side AssessmentCorrect fix. VerdictApprove |
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.
What does it do?
maxLength: 255constraint from the URI field in the resource panel and in the tree quick-create/quick-update form, so long URIs (e.g. withuse_alias_pathand nested resources) are no longer blocked by client-side validation.urifield, the panel now reveals the URI field and checks "Freeze URI" so the user sees which field failed.Why is it needed?
With
use_alias_pathand nested resources, the generated URI can exceed 255 characters. The form showed a generic "Please correct the errors in your form before submitting." with no indication of the problematic field, because the URI field is hidden by default. Per maintainer feedback (opengeek): theuricolumn is TEXT and not limited to 191 characters; the index prefix is 191 but does not prevent longer values; there should not be a soft limit in the manager UI. Improving error handling was also requested (Mark-H).How to test
use_alias_path, with a deep resource tree and long aliases so the generated URI exceeds 255 characters.Related issue(s)/PR(s)
Resolves #13815