This does not work with Jquery 1.3 yet. The remaining characters do not count down.

CommentFileSizeAuthor
#6 maxlength-jquery.1.3.patch1.18 KBdawehner

Comments

dawehner’s picture

Is there an error or similar.
This would speed up the fixing of the bug.

iaminawe’s picture

No error as such, the automated character countdown does not work and the field lets you enter more than the specified amount of characters.
When I try and save, it fails to validate the field and then lets you know that there are too many characters entered. So it is still functional but is no longer intuitive with Jquery 1.3.

Thanks for looking at this
Gregg

skizzo’s picture

I am seeing the same behaviour. I am running Maxlength 6.x-2.0-beta1
After installing jquery_update 6.x-1.1 the status page reads jQuery Update 1.2.6
My CCK field is: Text, Text Area, 5 Rows, Requirwd, 1 value, Plain Text, max 500 chars, countdown enabled
Enabling Firebug I see the following in Console (right after loading the form page with CCK field)

field.val() is undefined
anonymous(Object length=0 prevObject=Object jquery=1.2.6)maxlength.js?J (line 7)
anonymous()maxlength.js?J (line 32)
anonymous()jquery.min.js?J (line 27)
anonymous()jquery.min.js?J (line 27)
anonymous([function(), function(), function(), 2 more...], function(), Object name=args)jquery.min.js?J (line 21)
anonymous()jquery.min.js?J (line 27)
[Break on this error] var remainingCnt = limit - field.val().length;\nmaxlength.js?J (line 7)

gausarts’s picture

I confirm this happened with jquery_update 2/ jquery 1.3. The counter stays frozen. Any fix yet? Thanks

dawehner’s picture

Status: Active » Postponed (maintainer needs more info)

OK. I tryed to reproduce it.

  1. Installed jquery update 1.1 ( jquery 1.2.6)
    No erros at all. Perhaps @skizzo could try to reproduce the error on a clean drupal installation. This would help! Thx!
  2. Even after jquery update 2.x I cannot reproduce it.
    I had enabled maxlength for title, body and a cck field.
    I need more informations to reproduce it :(
dawehner’s picture

StatusFileSize
new1.18 KB

Does this patch fix it?

skizzo’s picture

uhm... before applying the patch I tried to reproduce the problem on same system used for #3, but the problem is gone. I will keep an eye on it and if/when the problem shows up again I will appply the patch. Meanwhile let see what gausarts says. Thank you.

dawehner’s picture

This patch is totally logical wrong :)
I Applied the right wrong from http://drupal.org/node/581854#comment-2059844

gausarts’s picture

Forgot to mention I have editablefields in place. I'll report back after the patch. Thanks

gausarts’s picture

Hi,

The counter works fine in fresh install, jquery_update2, jquery 1.3.2. The patch only put the counter to freeze.

Somehow it conflicts with other javascripts that I am still investigating. Sorry to bother you. I'll report back when I find out the conflict.

Thanks.

dawehner’s picture

Sure the patch is totally wrong as i sad.

replace === with !== in the patch :)

gausarts’s picture

That's what I suspected :) Still figuring out the real conflict though. Thanks

skizzo’s picture

please see charCode Property in case it's related.

cedewey’s picture

Issue summary: View changes
Status: Postponed (maintainer needs more info) » Closed (won't fix)

The Drupal 6 version of Maxlength is no longer supported so I'm marking this Closed (won't fix).

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.