mdomba
(Maurizio Domba Cerin)
January 6, 2012, 12:41am
1
Unfortunatelly there are some issues with CActiveForm introduced in the Yii 1.1.9 (mea culpa)
If $form->error() is called without rendering the input field an JS error is fired.
beforeValidateAttribute and afterValidateAttribute are not called
Issues fixed in r3529 - http://code.google.c …e/detail?r=3529
Required fields are not validated if left empty
This issue is fixed in r3530 - http://code.google.c …e/detail?r=3530
Fixing the above issues (r3529) a new "bug" ws introduced, and validateOnType was not working
This is fixed in r3531 - http://code.google.c …e/detail?r=3531
To update just grab the latest jquery.yiiactiveform.js file and put it in your Yii folder.
Don’t forget to clean the assets folder of your project(s)
if(!o.length)
return undefined;
This does not work with input type file. Because there is o but there is not o[0].
The bug still exist if you set validateOnType = true.
mdomba
(Maurizio Domba Cerin)
January 7, 2012, 1:22pm
3
o is the jQuery object generated from the inputID… o[0] should give the originating DOM element… it should not matter if the type is file…
can you post your code so I can check what is the problem here…
So, if you set the form
'validateOnType' => true
You are going here :
if (this.validateOnType) {
$form.find('#' + this.inputID).keyup(function () {
if (attribute.value !== getAFValue($(attribute))) {
validate(attribute, false);
}
});
}
But when you calling $(attribute) and passing it to getAFValue($(attribute)) there is no o[0].tagName and validation crashes.
And i have changed the code to this:
if (this.validateOnType) {
$form.find('#' + this.inputID).keyup(function () {
if (attribute.value !== getAFValue($('#' + attribute.inputID))) {
validate(attribute, false);
}
});
}
But you can fix it better way.
Best Regards
mdomba
(Maurizio Domba Cerin)
January 7, 2012, 6:21pm
5
You are right… this "bug" was introduced in the r3529 when fixing above issues - http://code.google.com/p/yii/source/detail?r=3529
Thanks for reporting this…
Now it’s fixed - http://code.google.com/p/yii/source/detail?r=3531
Sooooo… Is there going to be a v1.1.9a?
Yii is not the Linux kernel But looking back at the past version numbers for Yii, v1.1.9a could be problematic: I associate tha appended letter as a hotfix. But it looks like this has been used already to mark alpha-grade software (Yii v1.0a, v1.1.0a)
official reply?
[font="arial, sans-serif"][color="#4d90f0 "][size=2]
[/size][/color][/font]
mdomba
(Maurizio Domba Cerin)
January 23, 2012, 9:11pm
12
There will not be the 1.1.9.(1 or a) version… but we will release the 1.1.10 much sooner… probably next weekend…
Well, I think we can live with that
mdomba
(Maurizio Domba Cerin)
February 13, 2012, 7:46am
15
Just released
We where waiting a bit more to see if there will be some more bug issues about the 1.1.9 version so to release a version as stable as possible…