Sunday 18 March 2007 7:02:49 pm - 8 replies
Hi,
I use the datatype extension for 2 months ago, and it always works fine, but since yesterday, I systematically get the validation error message, enven if I tape the write antispam code.
In order to "debug", I changed this in at the line 158 of the sckantispamtype.php
if( $answer != $objectAttribute->content() )
{
$objectAttribute->setValidationError( "Antispam code is incorrect_[\$answer:]_".$answer."_[\$objectAttribute->content:]_".$objectAttribute->content());
return EZ_INPUT_VALIDATOR_STATE_INVALID;
}
So the error message is like this when the code displayed in the captcha is 00483 :
Antispam code is incorrect_[$answer:]_00483_[$objectAttribute->content:]_12482
It seems that $objectAttribute->content() doesn't contains the value that is used to make the captcha that is displayed at the end of the form, but I don't know why...
You can see this
at http://88.191.51.31/index.php/fr/...ansons_corses_et_versions_originales by trying to add a comment (button at the bottom of the page)
thanks in advance for your help !
Wednesday 21 March 2007 3:18:33 pm
No one can see your install, you have http acl authentication on the url,
<i>http://88.191.51.31/index.php/fr/...ses_et_versions_originales</i>
Why not output the expected value and the submitted value to debug this statement ... many people use this extension with success.
//darken
Wednesday 21 March 2007 6:26:36 pm
Hi,
Sorry for the htaccess protection, login is "dev" and password is "dev".
I don't made any upgrade or modification into related templates, moreother this bug is present in all classes that uses this datatype.
I have also replaced the extension/antispam folder, with the version avalaible on ez.no to avoid all doubt of file modification, but the bug is still here, and the code is too complex for me.
I know that this extention abitually works very well, I use it on many sites... I don't understand !
Wednesday 21 March 2007 11:31:54 pm
Hi Sébastien
I used the link you provided in your original post and I was able to submit a comment without a problem. Do you do anything special when it fails (submitting even though it won't validate, eg not filling out required information)?
Feel free to delete the comment I added ![]()
Thursday 22 March 2007 6:47:27 am
Hi Hans,
Yesterday I have tried to install the ezcaptcha extension in order to replace the antispam datatype, just to test.
So I have copied the files, activate the extension, and edited the comment class to replace the antispam datatype by the ezcaptcha datatype, but the edition doesn't save my modifications, I have tried many times, cleared all caches, the antispam datatype is still here, I can't delete it, and I can't add another attribute on my comment class.
Perhaps this is because she has many objects, but why don't I get an ezpublish error message when trying to edit this class ?
So to conclude, since this manipulations, all is ok, comments can be nicely added...
Today I have to check all the parameters (the comment class, extensions, templates, etc.) in order to understand the origin of this bug.
Thanks for your help ! (and for your contrib !)
Modified on Thursday 22 March 2007 6:48:38 am by Sébastien Antoniotti
Wednesday 24 September 2008 3:55:52 pm
2 Sébastien Antoniotti
There occurred an error in code of sckantispamtype.php v.1.1. To solve it:
1. Add including file at the top of the script
include_once( 'lib/ezutils/classes/ezinputvalidator.php' );
2. Change the original lines ## 161 and 166 so they look like
return eZInputValidator::STATE_INVALID;
return eZInputValidator::STATE_ACCEPTED;
instead of
return EZ_INPUT_VALIDATOR_STATE_INVALID;
return EZ_INPUT_VALIDATOR_STATE_ACCEPTED;
Hope this fix will help someone who uses eZ Publish 4 + antispam extension
Monday 16 March 2009 1:29:04 pm
Hi!
http://ez.no/developer/contribs/datatypes/ib_captcha is good alternative for antispam
You must be logged in to post messages in this topic!