Closed (fixed)
Project:
Drupal core
Version:
11.x-dev
Component:
typed data system
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
25 Nov 2025 at 16:13 UTC
Updated:
10 Jun 2026 at 08:37 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #3
wim leersNote that in config schema, it does:
👆 That was coincidentally also the only config schema type using validation. but nothing was calling it (
$config_entity->getTypedData()->validate(), so that mattered … not at all)Ironic that it's still an issue outside of config!
Comment #4
wim leersComment #5
phenaproximaComment #6
phenaproximaNice and clean. Let's get it in!
Comment #7
phenaproximaTagging this as something that was ported from Drupal Canvas to fix a core bug, which is unfortunately a very common thing in Canvas. This will help later identify bugs that were fixed in core that would allow Canvas to remove its overrides and shims.
Comment #8
lendudeChange looks good and makes sense.
As discussed on slack with phenaproxima, any current entities that abuse this non-validating behavior (first thing I could think of was somebody mis-using it to store an external ID when importing content from outside Drupal) will now be broken and, depending on submit flow, might be unable to be updated. So maybe not something we want to do in a patch release and should probably have a change record.
Comment #9
phenaproximaDone: https://www.drupal.org/node/3560109
Comment #10
longwaveI assume the 128 comes from
While that seems like it would be hard to change now, is it worth adding a more correct Length constraint while we are here?
Comment #12
catchMoving back to needs review for #10.
Comment #13
angel_devoeted commentedThanks for pointing this out.
The max_length = 128 on UuidItem is a historical storage setting rather than an intended UUID length. With the Uuid constraint in place, format (and effective length) is already validated.
Would adjusting the length or storage behavior be considered a broader, potentially BC-impacting change?
Comment #14
dcam commentedI think so. We'd have to deal with potential issues of data loss. It seems like this would seriously complicate what's currently a fairly simple issue that's impacting a high-profile Drupal CMS module. Maybe we should commit this as-is. Just my $0.02.
Comment #15
idebr commentedGeneral question:
I see some FieldType constraints added in the definition, for example "timestamp": https://git.drupalcode.org/project/drupal/-/blob/main/core/lib/Drupal/Co...
and others in
getConstraints(), for example "email": https://git.drupalcode.org/project/drupal/-/blob/main/core/lib/Drupal/Co...and then there is this implementation for Uuid in
propertyDefinitionsIs there any preference of implementing one over the other? I would expect this simple constraint to be added in the
#[FieldType]definition itselfComment #16
longwaveLet's add it in the FieldType definition, seems cleanest that way. The Email one is done so we can add the label to the error message.
Comment #17
idebr commentedThe Uuid constraint is now applied in the FieldType definition
Comment #18
needs-review-queue-bot commentedThe Needs Review Queue Bot tested this issue. It fails the Drupal core commit checks. Therefore, this issue status is now "Needs work".
This does not mean that the patch necessarily needs to be re-rolled or the MR rebased. Read the Issue Summary, the issue tags and the latest discussion here to determine what needs to be done.
Consult the Drupal Contributor Guide to find step-by-step guides for working with issues.
Comment #19
idebr commentedNot sure how these checks are generated, but the MR pipeline does not report any failed checks
Comment #20
dcam commentedThe constraint has been added to the field type definition as requested. The change looks good to me.
Comment #24
godotislateCommitted and pushed 5487950 to main. and 21d984c to 11.x. Thanks!
Comment #26
quietone commentedCorrect the branch in the change record.
Comment #28
quietone commentedThe tag is only used once so removing per Issue tags field and Issue tags -- special tags and for issue #3565085: Drupal core issue tag cleanup.