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.
This module adds maxlength attribute to textfields and textareas.
In ckeditor textarea current length computed by stripping html tags from it. But native IE 10 (and other browsers) maxlength check do not strip tags to count the length of text. So we have a situation when module outputs "Content limited to 200 characters, remaining: 5" but actually the length of field is more then 200. The problem is that only IE blocks form submission in this case. So we just can't save the node.
Comment | File | Size | Author |
---|---|---|---|
#2 | maxlength-force-truncate.png | 39 KB | RowboTony |
#1 | maxlength-maxlength_attribute_on_ckeditor_textarea-2248935.patch | 2.04 KB | undertext |
Comments
Comment #1
undertext CreditAttribution: undertext commentedComment #2
RowboTony CreditAttribution: RowboTony commentedHi @undertext, I have tested this on a site I am working on, and I am finding that, after applying this patch - the "Force test truncate" is not being respected. Though the patch does resolve the IE issues you mention. So - I can post in IE, but if I have a truncate to 600 characters, and I post 900 characters, all 900 are allowed to be posted.
Comment #3
arled CreditAttribution: arled commentedI'm having a similar issue. When exceeding max length in Filtered HTML field IE refuses to save the changes. It just doesn't feel like responding at all. I tried this patch but does not seem to effect the issue.
Comment #4
cedeweyWe are only maintaining the Drupal 7 version of the module for critical security fixes, so I'm marking this Closed (won't fix). Thank you for working on this issue. If you do want to maintain the Drupal 7 version, do reach out. We'd be happy to bring you on board as a maintainer.
I also encourage you, if you haven't already, to upgrade your site to Drupal 8/9. We are actively maintaining that version and you would enjoy all of the other features of the latest version of Drupal.