Thursday 14 December 2006 9:32:04 am
Hi again Claudia,
after some testing, I've found that the problem is that when a missing classattribute is found, it returns as you say, EZ_INPUT_VALIDATOR_STATE_INVALID, and then in collectinformation.php sets the $canCollect to false without checking if the attribute has content or not, or is required or not, so, as the attribute has no content, it have the $hasValidationError set to false, so it don't generate any error message. I've found that including a simple check to see if the attribute has content or is required, the problem is solved. I've changed this line in collectinformation.php from
else if ( $status == EZ_INPUT_VALIDATOR_STATE_INVALID )
to this one
else if ( $status == EZ_INPUT_VALIDATOR_STATE_INVALID && ($contentObjectAttribute->attribute( 'has_content' ) || $contentObjectAttribute->attribute( 'is_required' )) )
and now the form is processed correctly and the object information is collected, obviously without any attributes that you don't have put in the form. I don't know if it is a bug or a feature :s kind regards!
--
Xavier Serna
eZ Publish Certified Developer
Departament de Software
Microblau S.L. - http://www.microblau.net
+34 937 466 205
|