[Recaptcha] [reCAPTCHA] Discussion

[Recaptcha] [reCAPTCHA] Discussion

  
Forge Component
(11)
Published on 2015-06-26 by Robert Chanphakeo
11 votes
Published on 2015-06-26 by Robert Chanphakeo
We are still working in Outsystems 4.1.
Is there a version of this component for OutSystem 4.1 ?
No there isn't, but you can easily backport it. There isn't anything being used in this component that can't be done in 4.1. Just install Service Studio 5.0 to see the block definition and mimic the same in 4.1.
You will also need to install Integration Studio 5.0 to check the HttpRequestHandler that's included in the solution and copy the implementation of PostRequest_Submit to the 4.1 version of HttpRequestHandler, because old versions of it didn't work properly with the recaptcha service.

Best Regards,
Gustavo Guerra
Gustavo,

reCAPTCHA error message is no longer visible.

Scenario
-Blank input, reCAPTCHA_Validate(PrivateKey:Site.PrivateKey) returns false, with no error message displayed.
-Invalid input, reCAPTCHA_Validate(PrivateKey:Site.PrivateKey) returns false, with no error message displayed.
-Valid Input, reCAPTCHA_Validate(PrivateKey:Site.PrivateKey) returns true.




The issue has been identified, the problem only occurs when you use AJAX with reCAPTCHA.

A solution will be released shortly.

Thank you.
I am having a warning while trying to upload the.osp file.
it says HttpRequestHandler not found.and that it might not work.while i already have the HttpRequestHandler in my platform server
Tmlewin

Solution:

Open the solution file, and when the solution pack tool is open, click on "Extract". Extract the solution content to a folder, and then deploy each eSpaces seperately.

This will resolve the problem.

Let me know if this works for you or if you have any other questions.


Hi Carlos,

I am having some probelms with this oml/osp.

the pics do not appear;)

i am using the 1.1 vertion on google chrome and on a 5.0 outsystems platform

have you got any idear what can cause this?

thanks in advance,
Pedro Dias
@Pedro

I assume you have set your button onclick method to "ajax" is this correct? If so, you will need to add an onload extended property to your button,  for further details on how to do this, please have a look at the example eSpace in the downloaded solution. (This only works for previous AP versions released before and including 5.1.1.9).

Important noticefrom AP version 5.1.1.9+ and above, outsystems fixed a javascript bug that causes the reCAPTCHA to stop working when reCAPTCHA is used with a button that has it's onclick method set to ajax.

Solution on how to resolve this issue, when you use reCAPTCHA in your form, you should set your button's onclick method to submit, if you are unable to do this or for any reason need to set your button onclick method to ajax, see example attached, the attached solution should solve your problem!


Hi Robert

What was fixed in 5.1.1.9+ regarding to this?

Anyway regarding the bug with ajax buttons. That is only a workaround to force a submit on fails.
The problem is not actually on OutSystems side, but on the reCAPTCHA javascript that uses document.write to inject the image on the pages...


Regards,
João Rosado
@Joao

Before you were able to use the reload method, but you can no load use the reload method in versions above 5.1.1.9

"A complete analysis was performed to understand the problem which is as detailed next:
·         When you click the button it will first call issue the call to reload() and then call the Ajax method.
·         Since reload() is unknown to JavaScript it will return an error and won’t execute the Ajax method call, instead it will issue a submit (POST) request to the page.
·         With revision 5.1.1.9 and below the submit request was being handled by the same Ajax request logic and ended up redirecting to the desired page, this was in fact a side effect which resulted in the desired behavior hiding problems with the application javascript. With revision 5.1.1.13 the submit request will be performed and will be handled by the own page leading to the broken page as the submit had no target." 
Hugo Veiga, Product Support Engineer, OutSystems 



"That is only a workaround to force a submit on fails." 

You are right.

Hi robert and João,

thanks for the help...
but I do not know why same times it works other doesn't ...

I am going to check it again because some times I get an error "Input error: Invalid referer "... after pressing the button and after the reload :S

thank you 
best regads,
Pedro Dias
Hello everyone!! How can i test this on a development environment? It works under localhost and production... what about development tests?

Best regards,
Diogo Pacheco
Diogo Pacheco wrote:
Hello everyone!! How can i test this on a development environment? It works under localhost and production... what about development tests?

Best regards,
Diogo Pacheco
 
Hello Diogo,
I don't think that anyone understood your question...
Can you explain better your problem/error and your needs?
If I can give you a tip, you should check the Private and Public key that you're using and confirm if it's register.
Note that "This demo has been setup to work with localhost. To setup reCAPTCHA for your domain, register at http://recaptcha.net/ and then set the PublicKey &
PrivateKey Site Properties.
Hope that this information can be usefull..

Best Regards,
Gonçalo Martins
Hello guys,

i'm trying to use this extension, but i got the following error:
Just to add more information, i did the register on http://recaptcha.net/ and i have my keys set on the site properties.

Message:
The remote server returned an error: (403) Forbidden.
Stack:
at ssreCAPTCHA.RssExtensionHTTPRequestHandler.MssPostRequest_Submit(HeContext heContext, String inParamURL, Byte[] inParamArguments, Int32 inParamTimeout, Boolean inParamKeepAlive, String& outParamTextContent, Byte[]& outParamBinaryContent, String& outParamBinaryContentType)
at ssreCAPTCHA.Actions.ActionPostRequest_Submit(HeContext heContext, String inParamURL, Byte[] inParamArguments, Int32 inParamTimeout, Boolean inParamKeepAlive, String& outParamTextContent, Byte[]& outParamBinaryContent, String& outParamBinaryContentType)
at ssreCAPTCHA.Actions.ActionreCAPTCHA_Validate_Aux(HeContext heContext, String inParamPrivateKey, Boolean& outParamResult, String& outParamError)
at ssreCAPTCHA.Actions.ActionreCAPTCHA_Validate(HeContext heContext, String ...ssreCAPTCHA_Demo.Functions.rssespacerecaptcha_ActionreCAPTCHA_Validate(HeContext heContext, String inParamPrivateKey)
at ssreCAPTCHA_Demo.Flows.FlowMain.ScrnreCAPTCHA_Demo.CommandSubmit1_Submit(HeContext heContext)
at ssreCAPTCHA_Demo.Flows.FlowMain.ScrnreCAPTCHA_Demo.wt25_Click(Object sender, EventArgs e)
at System.Web.UI.WebControls.Button.OnClick(EventArgs e)
at System.Web.UI.WebControls.Button.RaisePostBackEvent(String eventArgument)
at OutSystems.HubEdition.WebWidgets.Button.RaisePostBackEvent(String eventArgument)
at System.Web.UI.Page.RaisePostBackEvent(IPostBackEventHandler sourceControl, String eventArgument)
at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)
-Env-
eSpaceVer: 15 (Id=3967, PubId=3897, CompiledWith=7.0.0.19)
RequestUrl: http://qgdirecoutdev/reCAPTCHA_Demo/reCAPTCHA_Demo.aspx (Method: POST)
AppDomain: /LM/W3SVC/1/ROOT/reCAPTCHA_Demo-131-130038759349830748
FilePath: C:\...\PS\running\reCAPTCHA_Demo.1834201395\reCAPTCHA_Demo.aspx
Locale: en-US
DateFormat: yyyy-MM-dd
PID: 1916 ('w3wp', Started='1/23/2013 6:40:39 PM', Priv=368Mb, Virt=2930Mb)
TID: 72
Thread Name:
.NET: 2.0.50727.5456

Best Regards,
Felipe Souza

I got the same error above.

 Regards,
Pedro Soares