Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
Problem/Motivation
TextLongItem and StringLongItem both inherit the 'max_length' settings from their base field. But its not used anywhere but it is configurable in the user interface.
Proposed resolution
Remove the setting form TextLongItem and StringLongItem.
Remaining tasks
User interface changes
API changes
Comment | File | Size | Author |
---|---|---|---|
#11 | drupal-stringitembase-2380391-11.patch | 4.76 KB | MrHaroldA |
#1 | stringitem-max-length-2380391-1.patch | 2.39 KB | webflo |
Comments
Comment #1
webflo CreditAttribution: webflo commentedComment #2
webflo CreditAttribution: webflo commentedThis blocks #2068655: Entity fields do not support case sensitive queries
Comment #5
jibranSo it is a critical then cuz it blocks a critical
Comment #6
chx CreditAttribution: chx commentedThanks, this is a very simple and nice fix.
Comment #7
alexpottThis issue addresses a critical bug and is allowed per https://www.drupal.org/core/beta-changes. Committed d8776af and pushed to 8.0.x. Thanks!
Comment #9
yched CreditAttribution: yched commentedNice - however, contrary to what the issue title says, this was only about StringLongItem ?
TextLongItem doesn't have the issue (doesn't inherit from TextItem), and the patch touched nothing there.
Also, the config schema for storage settings needs to be updated accordingly - opened #2381079: Adjust storage_settings schema for string_long field type
Comment #10
MrHaroldA CreditAttribution: MrHaroldA commentedI might be completely wrong here, but StringLongItem extends StringItem, but removes the max_length restrictions? Shouldn't that be the other way araound: the least restrictive as base?
... or an abstract StringItemBase as base, and extend that into StringItem and StringLongItem?
I've attatched a patch of how I think it should be, but again: I'm a nOOP, pun intended ;)
Comment #11
MrHaroldA CreditAttribution: MrHaroldA commentedOops ... missed a spot. The comment was still referring to numeric fields.
Comment #12
chx CreditAttribution: chx commentedI'd recommend opening a new issue cos the patch on a fixed issue will get overlooked.
Comment #13
MrHaroldA CreditAttribution: MrHaroldA commentedDone: #2383277: StringLongItem should not extend StringItem