Hello,

I have two error messages:

The first one on the configuration page of the CAPTCHA module:

Notice: Undefined property: stdClass::$captcha_type in captcha_admin_settings() (line 79 of /var/www/clients/client0/web29/web/profiles/openpublic/modules/contrib/captcha/captcha.admin.inc).

And the second one on all others frontend and backend pages:

Strict warning: Only variables should be passed by reference in captcha_get_form_id_setting() (line 74 of /var/www/clients/client0/web29/web/profiles/openpublic/modules/contrib/captcha/captcha.inc).

I choose Math (from module captcha) on DEFAULT CHALLENGE TYPE and "none" or "default" for the challenge type field.
I think those errors do not affect the captcha because it works when I add a comment.

Any idea...

Comments

chiddy249’s picture

Hi,

As above. I'm also receiving the following warning on admin pages after changing DEFAULT CHALLENGE TYPE from image CAPTCHA to reCAPTCHA:

Notice: Undefined property: stdClass::$captcha_type in captcha_admin_settings() (line 79 of /profiles/openpublic/modules/contrib/captcha/captcha.admin.inc).

The following appears on all front-end pages:

Notice: Undefined property: stdClass::$captcha_type in captcha_get_form_id_setting() (line 84 of /profiles/openpublic/modules/contrib/captcha/captcha.inc).

Notice: Undefined property: stdClass::$module in captcha_get_form_id_setting() (line 94 of /profiles/openpublic/modules/contrib/captcha/captcha.inc).

Notice: Undefined property: stdClass::$captcha_type in captcha_get_form_id_setting() (line 94 of /profiles/openpublic/modules/contrib/captcha/captcha.inc).

Notice: Undefined property: stdClass::$captcha_type in captcha_form_alter() (line 383 of /profiles/openpublic/modules/contrib/captcha/captcha.module).

Switching back to image captcha or math doesn't get rid of the notices either.

soxofaan’s picture

Where did you get the CAPTCHA module from, your line numbers seems to be off with what I have from http://drupal.org/node/1140494

pierrecw’s picture

ok problem solved for me !

I use the openpublic distribution for drupal and the captcha module was include in the 7.x-1.0-alpha3. But strange thing the name of version is the same but not the module itself !!

So like soxofaan said, i reupload the captcha 7.x-1.0-alpha3 version and all errors are gone !! thanks

soxofaan’s picture

Title: Error: 'Undefined property' & 'Only variables should be passed by reference' » OpenPublic ships broken CAPTCHA module: 'Undefined property' & 'Only variables should be passed by reference'
Project: CAPTCHA » OpenPublic
Version: 7.x-1.0-alpha3 » 7.x-1.0-beta3
Component: Captcha API (captcha) » Code

Indeed, apparently the OpenPublic distribution seems to ship a patched version of the CAPTCHA module, using patch http://drupal.org/files/issues/825088-19-captcha_ctools_export.patch from issue #825088: Exportables support for CAPTCHA points

This patch however does not seem in good shape and needs more work.
Overwriting the module with the vanilla version from http://drupal.org/node/1140494 probably solves the (original) issue, but could create interoperability issues with the rest of the OpenPublic distribution.

Moving this to the OpenPublic issue queue for now

DSheffler’s picture

Thanks for pointing this out. We'll look into this as we update modules for our next release.

hefox’s picture

Issue summary: View changes
Status: Active » Closed (won't fix)

Re-open if still an issue with latest version