admin mode problem with Egglue/reCAPTCHA

dayzman1 - June 10, 2009 - 01:39
Project:CAPTCHA
Version:6.x-2.x-dev
Component:Captcha API (captcha)
Category:feature request
Priority:normal
Assigned:Unassigned
Status:postponed
Issue tags:collapsible, fieldset, JavaScript
Description

If Math CAPTCHA is used when a trusted user is logged in, it shows a presolved example. If reCAPTCHA or Egglue is used, it bounces to a blank page trying to access the APIs. I suspect it's trying to generate a presolved example when there isn't one.

#1

soxofaan - June 14, 2009 - 17:56
Title:Egglue/reCAPTCHA bounce for trusted users» admin mode problem with Egglue/reCAPTCHA

confirmed (only tested reCAPTCHA)

after disabling javascript, the page loads normal and the form processing works as expected

further looking into it..

I guess the easiest way to solve this is to disable the admin mode (presolving) for challenges like reCAPTCHA and egglue

#2

soxofaan - June 14, 2009 - 21:38

Ok, I think I'm on to something (which was not easy, the mix of iframes, javascript, external api's is not very comfortable to debug)

The admin mode CAPTCHA example is inside a collapsible fieldset.

<?php
$captcha_element
= array(
       
'#type' => 'fieldset',
       
'#title' => t('CAPTCHA'),
       
'#collapsible' => TRUE,
       
'#collapsed' => TRUE,
      );
?>

If I set the '#collapsible' property to false, there is no problem of a blank page and trying to access the apis.
Setting the '#collapsed' property to false does not change the weird behavior on the other hand

Apparently the Javascript that handles the collapsible fieldset interferes with the reCAPTCHA/egglue javascript, which causes the weird behavior.

I'm no Javascript expert, and the problem is hard to debug, so I welcome other people to look into this

#3

soxofaan - July 11, 2009 - 16:48

a bit more confirmation:

the problem is not related to admin mode on itself: if I make the fieldset for non admin, anonymous challenges collapsible, the same problem occurs.

#4

tnorm5828 - July 17, 2009 - 20:41

subscribe

#5

soxofaan - July 22, 2009 - 15:04
Status:active» duplicate

#525586: AJAX API seems to tackle the same problem as this thread and has more eyes on it
setting this one as duplicate for now

#6

tnorm5828 - July 28, 2009 - 01:15

Soxofaan - Not really the same issue, but might be related. I'm not using the ajax comment module that the other person who started the #525586: AJAX API issue is. But I'm no fluent in java at all.

#7

soxofaan - September 20, 2009 - 11:02
Category:bug report» feature request
Status:duplicate» postponed

Hi all,

In preparation for a final 6.x-2.0 release I added temporary workaround for the problem:
reCAPTCHA and Egglue are now blacklisted for the CAPTCHA admin preview:
http://drupal.org/cvs?commit=265144

This is a temporary workaround and should be removed once the problem itself is solved.
Setting this issue to a postponed feature request now

 
 

Drupal is a registered trademark of Dries Buytaert.