Maxlength Module 2.0 Out Now - Set Character Limits on Your Drupal Website
Last year, we at DevCollaborative became maintainers of the Maxlength Drupal module. We use Maxlength on most of our clients’ websites to set character limits on key text fields to ensure concise messaging.
As can happen with volunteer-run open-source projects, we noticed the module had several patches reviewed and tested by the community sitting idly in the issue queue. When we asked longtime Maxlength maintainer Daniel Wehner if we could help maintain the project, he quickly and graciously obliged.
Since then we’ve worked hard defining a vision for the project, triaging the issue queue, running usability tests and improving the module to make setting character limits an intuitive experience.
Maxlength 2.0 Is Here!
We’re excited to issue Maxlength’s first stable release for Drupal 8+. Maxlength 2.0 boasts a streamlined configuration process and more accurate character counting.
Maxlength Configuration Before ( 1.0-RC3)
In our usability testing we found that site builders were consistently confused by the Force truncate and Safe truncate HTML options. Both use overly technical language. As a result, people often left the Safe truncate HTML option off on rich text fields, leading to less accurate character counts.
Maxlength Configuration After (2.0.0)
We moved the settings into a fieldset to keep the field’s configuration clean and reworded "Force truncate" to simply "Hard limit". The "Safe truncate HTML" behavior is now applied on all rich text fields, saving site builders from an unnecessary configuration step.
The result is a simple, easy to understand configuration process for setting character limits.
In addition to improving the configuration experience, we also
- Rewrote the help page in plain language
- Removed the broken and unhelpful Bypass Maxlength settings permission
- Enabled the soft limit behavior on plain text fields
- Set the character countdown message to red when the limit is exceeded
- Fixed numerous character miscounts
Plus, site maintainers will benefit from the added security coverage and active maintenance that comes with a stable release.
Update from Maxlength 1.0-RC1 to 2.0
If you’re already using Maxlength, updating to 2.0 is a breeze. Any existing character limits on your site will remain the same and you will benefit from more accurate character counts, security coverage, and future improvements such as a better hard limit behavior.
Update to Maxlength 2.0 with Composer
If you manage contributed modules via Composer, update to Maxlength 2.0 by doing the following:
- Update Composer.json to reference drupal/maxlength": "^2.0"
- Run Composer update
Update to Maxlength 2.0 Manually
If you manage contributed modules manually, follow the Updating a Module - Using the Administrative Interface instructions on drupal.org.
A Big Thank You to the Drupal Community
All of this work would not have happened without the help of the greater Drupal community. As new maintainers, it was exciting to see so many people diving in alongside us to test, design, and develop the improvements; 35 people contributed to making Maxlength 2.0 a reality.
- Allie Thorpe
- Suresh Prabhu Parkala
What’s Next for Maxlength
We’re continuing to improve Maxlength, with an eye in particular to making it Drupal 10 compatible. Since the 2.0 branch is the stable and actively maintained branch, Maxlength 1.0-RC3) will no longer be supported starting September 1, 2022. We encourage all Maxlength users to update to Maxlength 2.0 as soon as possible.
The major work for Drupal 10 compatibility is updating the code to work with CKEditor 5 and to no longer rely on jQuery. We will do this in a new major version, 3.0. Like the update from 1.0 to 2.0, we hope the update from 2.0 to 3.0 will also be seamless.
In the meantime, enjoy the new and improved Maxlength module and let us know how you like it!