Jahia Dev Forum > Issues with Captcha

0 (0 Good)
0 (0 Bad)

Issues with Captcha

by  namitgupta »  2013/03/04 16:47

Hi All,

I am having certain issues with the OOB captcha implementation in Jahia. We want to implement captcha on some of the forms on our website.  Our form is encased in the <template:tokenizedForm> , as per the documentation.  The documentation presents a very specific example for implementing captcha validation for user generated content. However, in our case, we are not generating any user content , i.e. we are not creating any node on form submission. In my implementation, i have included following hidden fields in the form:

 

<input type="hidden" name="jcrResourceID" value="${renderContext.mainResource.node.identifier}"/>
 
However, in case a form is submitted with an incorrect captcha value/ empty captcha value, the form goes to https://1<DNS>/cms/sign-up/pagecontent/eeuserregistration.html?ec=c8792276-acf0-4d46-b0e0-b22fc68c57c8, which is a non-existent page. It doesn't go back to the form as per the documentation.
 
Can anyone help me out with this issue.
 
Regards,
Namit
  • Issues with Captcha
    2013/03/04 16:47

    namitgupta <p> Hi All,</p> <p> I am having certain issues with the OOB captcha implementation in Jahia. We want to implement captcha on some of the forms on our website. &nbsp;Our form is encased in the &lt;template:tokenizedForm&gt; , as per the documentation. &nbsp;The documentation presents a very specific example for implementing captcha validation for user generated content. However, in our case, we are not generating any user content , i.e. we are not creating any node on form submission. In my implementation, i have included following hidden fields in the form:</p> <p> &nbsp;</p> <div> &lt;input type=&quot;hidden&quot; name=&quot;jcrResourceID&quot; value=&quot;${renderContext.mainResource.node.identifier}&quot;/&gt;</div> <div> &nbsp;</div> <div> However, in case a form is submitted with an incorrect captcha value/ empty captcha value, the form goes to&nbsp;https://1&lt;DNS&gt;/cms/sign-up/pagecontent/eeuserregistration.html?ec=c8792276-acf0-4d46-b0e0-b22fc68c57c8, which is a non-existent page. It doesn&#39;t go back to the form as per the documentation.</div> <div> &nbsp;</div> <div> Can anyone help me out with this issue.</div> <div> &nbsp;</div> <div> Regards,</div> <div> Namit</div>

  • Number of messages  36
    Registration date Mar 4, 2013
    0 (0 Good)
    0 (0 Bad)

    Re: Issues with Captcha

    by  dgriffon »  2013/03/06 10:18

     

    Hello,
     
    do you have any exception or message in the console when you post ?
     
    Why do you use the mainResource identifier instead of the currentNode identifier for jcrResourceID parameter ? 
     
    <input type="hidden" name="jcrResourceID" value="${currentNode.identifier}"/> should be used instead.
     
    What are the other paramters you set ? 
     
    best regards,
     
    David

    David Griffon (dgriffon)

    Number of messages  76
    Registration date
    Contact
    Share
    Feedback

    Get in touch

    Whether you are a current user or if you are just evaluating Jahia, we are here to help.

    Contact us

    Share this page