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.
Attached is a patch that trims generated text to a fields maximum length value, if set.
Comment | File | Size | Author |
---|---|---|---|
#5 | max-field-length-1254790-5.patch | 1.51 KB | awolfey |
#4 | max-field-length-1254790-4.patch | 1.48 KB | awolfey |
#1 | max-field-length-1254790-2.patch | 1.47 KB | awolfey |
Comments
Comment #1
awolfey CreditAttribution: awolfey commentedPatch attached.
Comment #2
moshe weitzman CreditAttribution: moshe weitzman commentedi think this is a dupe - can't search right now
Comment #3
awolfey CreditAttribution: awolfey commentedI found a couple of issues on length of titles. This patch affects textareas only.
Comment #4
awolfey CreditAttribution: awolfey commentedNeeded to cast the length as an integer to prevent warnings.
Comment #5
awolfey CreditAttribution: awolfey commentedAdds another needed check.
Comment #6
salvisComment #7
salvisMakes sense, except for the trailing spaces here:
It still applies, too.
@moshe: I see two related issues:
#689212: provide option for limiting number of chars of generated body text (old feature request for D6)
#1010394: Use devel_create_greeking for text field instead of user_password (feature request for text fields, not text areas)
Neither of these are exact duplicates.
Comment #8
LGLC CreditAttribution: LGLC commentedAs far as I can tell, textareas now don't have a maximum length (only a number of rows for display purposes). There is no max_length in field_settings. It seems that this issue therefore doesn't exist any more.
Comment #9
pcambraAs for the comment in #8, there's no max length for textareas, only number of rows, so what makes more sense is to take care of it in #689212: provide option for limiting number of chars of generated body text