Closed (fixed)
Project:
MaxLength
Version:
6.x-2.x-dev
Component:
Code
Priority:
Critical
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
23 May 2009 at 20:51 UTC
Updated:
2 Mar 2011 at 11:11 UTC
Jump to comment: Most recent file
Comments
Comment #1
scoorch commentedDo others have this problem as well? Just wondering because I think the module can hardly be used in a production environment with this bug...
Comment #2
glkz commentedI have the same issue.
Comment #3
rolfmeijer commentedYep, me too. But note that I use it in combination with TinyMCE and the js_editor patch (http://drupal.org/node/314508#comment-1695260)
Comment #4
swentel commentedBeen bitten by this one too. Attached is a patch which fixes this. The key for success is #after_build since form_alter isn't invoked when at validation errors occur. I still left a lot of debugging code and didn't remove all code yet so others can play with it as well. Apply against latest dev version.
Comment #5
dawehnerCool that is definitive a better way to do it.
Comment #6
timbit commentedI had this issue as well.... until I added a CCK field to my node type. Now, it appears that form_alter is hit after a validation error despite the fact that I am only using maxlength on the title and body.
Why is it the case that without a CCK field I experience this behaviour, but once I add a custom field everything works as expected? I took a look through the code and didn't see anything specific to CCK that would cause form_alter to be called. Is this happening within CCK for some reason?
Comment #7
NaX commentedPatch #4 worked for me. Thanks swentel.
Unfortunately I had to manually apply the patch but it still works on the latest dev.
Comment #8
aron novakIt seems to be a quite solid approach, committed.