Cookies Service Input fields limit text length too short

Created on 14 December 2022, over 2 years ago
Updated 18 January 2023, over 2 years ago

Problem/Motivation

The following text
Cookies ermöglichen es Lorem Ipsum, Produkte anzubieten und die erhaltenen Informationen zu verstehen, einschließlich der Informationen über die Website-Nutzung.
only has 160 chars but can't be entered into the Cookies Service Purpose at the translation form. It's truncated.
The regular form doesn't have that limit.

There's no good reason for that, as Drupal supports by far longer labels, I'm sure. Only limit to the technical limit, which I guess might be 255.

I've looked around and this seems to come from core? There are several similar issues and I guess we should have a core fix, if there isn't any good reason for this limit.

See similar issues like:
https://www.drupal.org/project/drupal/issues/3184542
https://www.drupal.org/project/metatag/issues/2706941
https://www.drupal.org/project/webform/issues/3085409
https://www.drupal.org/project/webform/issues/3260223

The types are explained here:
https://www.drupal.org/node/1905070#types

My guess would be to grep core for "#maxlength" and see where that's set. For a quickfix we could override the default, but I don't think that is needed.

A good place to override the limit by type - for exampel to 255 for textfield could be in this folder:
core/modules/config_translation/src/FormElement

That would be a nice alternative approach, if changing the limit for inputs to 255 isn't accepted in general.

Steps to reproduce

Visit a config entity translation page and try to enter a string longer than 128 characters, like: admin/config/system/cookies/cookies-service/functional/edit/translate

Proposed resolution

Remaining tasks

User interface changes

API changes

Data model changes

🐛 Bug report
Status

Fixed

Version

1.2

Component

Code

Created by

🇩🇪Germany Anybody Porta Westfalica

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

No activities found.

Production build 0.71.5 2024