Module config not saved, "Password reset form email address only description cannot be longer than 128 characters …"

Created on 8 February 2025, 6 months ago

On a bilingual site (german as default + english), I tried to configure mail_login form at /admin/config/people/mail-login, but no matter which configuration, no matter how much characters the login override strings are, I can't save the config, throwing this error:

Password reset form email address only description cannot be longer than 128 characters but is currently 132 characters long.

Since nobody told about this issue earlier, I think it might be related to my multilingual site, maybe language strings are longer in german?
Any help much appreciated.

🐛 Bug report
Status

Active

Version

4.0

Component

Code

Created by

🇩🇪Germany adam1

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

Comments & Activities

  • Issue created by @adam1
  • 🇯🇴Jordan mqanneh Amman

    I'm unable to reproduce this issue. can you test it in a fresh installation?

  • 🇩🇪Germany adam1

    I tested the issue on several fresh and clean installs — with german locale, issue is always occuring.
    Just use this DDEV recipe:

    mkdir testsite-german && cd testsite-german
    ddev config --project-type=drupal10 --docroot=web
    ddev start
    ddev composer create drupal/recommended-project:^10
    ddev composer require drush/drush
    ddev drush site:install --account-name=admin --account-pass=admin --locale=de -y
    ddev launch
    ddev composer require 'drupal/mail_login:^4.0'
    ddev drush pm:enable mail_login  
    ddev launch $(ddev drush uli)
  • 🇩🇪Germany daveiano

    Same problem for me, also german locale.

    What I noticed: The field from the error edit-mail-login-password-reset-email-only-description is set to display:none, I don't know why. Seems that the german translation for the field is too long, but since we can not see the field, we can not fix it via the UI.

    When I manually show the field, the error says: Password reset form email address only description cannot be longer than 128 characters but is currently 132 characters long.

  • Status changed to Postponed: needs info about 2 months ago
  • Same thing for Spanish.

    How I solved it:

    - Search in the inspector (F12) the input field edit-mail-login-password-reset-email-only-description.
    - Change its value to a shorter message, you can achieve this by double clicking on the value attribute of the element.
    - Click on Save configuration, it should not prompt the same error again.

  • 🇩🇪Germany adam1

    I tried workaround described by mike gp, comment #5. Unfortunately, for me it didn't work, still couldn't save the configuration.
    I located this HTML in web developer:

    <input
      data-drupal-selector="edit-mail-login-password-reset-email-only-description"
      aria-describedby="edit-mail-login-password-reset-email-only-description--description"
      type="text"
      id="edit-mail-login-password-reset-email-only-description"
      name="mail_login_password_reset_email_only_description"
      value="My new shorter value"
      size="60"
      maxlength="128"
      class="form-text form-element form-element--type-text form-element--api-textfield"
      data-drupal-states='{"required":{":input[name=\u0022mail_login_email_only\u0022]":{"checked":true,"visible":true}},"visible":{":input[name=\u0022mail_login_override_login_labels\u0022]":{"checked":true,"visible":true},":input[name=\u0022mail_login_email_only\u0022]":{"checked":true}}}'
      data-once="states"
      required="required"
    />

    And changed original value to "My new shorter value".
    Any help making workaround actually working is much appreciated.
    Or, even more appreciated is a proper fix for the issue!

    • mqanneh committed 484a518e on 4.2.x
      Issue #3505333 by mqanneh: Module config not saved, "Password reset form...
    • mqanneh committed 31556ef1 on 3.2.x
      Issue #3505333 by mqanneh: Module config not saved, "Password reset form...
  • 🇯🇴Jordan mqanneh Amman

    Fixed in 4.2.2 and 3.2.1

Production build 0.71.5 2024