The following warnings occurred:
Warning [2] Undefined array key "avatartype" - Line: 783 - File: global.php PHP 8.1.27 (Linux)
File Line Function
/global.php 783 errorHandler->error
/printthread.php 16 require_once
Warning [2] Undefined array key "avatartype" - Line: 783 - File: global.php PHP 8.1.27 (Linux)
File Line Function
/global.php 783 errorHandler->error
/printthread.php 16 require_once
Warning [2] Undefined variable $newpmmsg - Line: 40 - File: global.php(841) : eval()'d code PHP 8.1.27 (Linux)
File Line Function
/global.php(841) : eval()'d code 40 errorHandler->error
/global.php 841 eval
/printthread.php 16 require_once
Warning [2] Undefined array key "style" - Line: 909 - File: global.php PHP 8.1.27 (Linux)
File Line Function
/global.php 909 errorHandler->error
/printthread.php 16 require_once
Warning [2] Undefined property: MyLanguage::$lang_select_default - Line: 5024 - File: inc/functions.php PHP 8.1.27 (Linux)
File Line Function
/inc/functions.php 5024 errorHandler->error
/global.php 909 build_theme_select
/printthread.php 16 require_once
Warning [2] Undefined array key "additionalgroups" - Line: 7162 - File: inc/functions.php PHP 8.1.27 (Linux)
File Line Function
/inc/functions.php 7162 errorHandler->error
/inc/functions.php 5044 is_member
/global.php 909 build_theme_select
/printthread.php 16 require_once
Warning [2] Undefined array key 1 - Line: 1415 - File: inc/functions.php PHP 8.1.27 (Linux)
File Line Function
/inc/functions.php 1415 errorHandler->error
/inc/functions.php 1370 fetch_forum_permissions
/printthread.php 76 forum_permissions
Warning [2] Undefined array key "showimages" - Line: 160 - File: printthread.php PHP 8.1.27 (Linux)
File Line Function
/printthread.php 160 errorHandler->error
Warning [2] Undefined array key "showvideos" - Line: 165 - File: printthread.php PHP 8.1.27 (Linux)
File Line Function
/printthread.php 165 errorHandler->error
Warning [2] Undefined array key "showimages" - Line: 160 - File: printthread.php PHP 8.1.27 (Linux)
File Line Function
/printthread.php 160 errorHandler->error
Warning [2] Undefined array key "showvideos" - Line: 165 - File: printthread.php PHP 8.1.27 (Linux)
File Line Function
/printthread.php 165 errorHandler->error
Warning [2] Undefined array key "showimages" - Line: 160 - File: printthread.php PHP 8.1.27 (Linux)
File Line Function
/printthread.php 160 errorHandler->error
Warning [2] Undefined array key "showvideos" - Line: 165 - File: printthread.php PHP 8.1.27 (Linux)
File Line Function
/printthread.php 165 errorHandler->error
Warning [2] Undefined array key "showimages" - Line: 160 - File: printthread.php PHP 8.1.27 (Linux)
File Line Function
/printthread.php 160 errorHandler->error
Warning [2] Undefined array key "showvideos" - Line: 165 - File: printthread.php PHP 8.1.27 (Linux)
File Line Function
/printthread.php 165 errorHandler->error



Form Tools
Captcha undefined with or without the API - Printable Version

+- Form Tools (https://forums.formtools.org)
+-- Forum: Form Tools (https://forums.formtools.org/forumdisplay.php?fid=1)
+--- Forum: API (https://forums.formtools.org/forumdisplay.php?fid=17)
+--- Thread: Captcha undefined with or without the API (/showthread.php?tid=199)



Captcha undefined with or without the API - sergiozambrano - Jun 30th, 2009

After many days (last few and weeks ago's) of struggling with the recaptcha, I think it's a good idea to share my issues so others find something about it, at least until documentation is finished.

In brief:
1) Don't use functions using "recaptcha" in the name. They seem to have changed to "captcha"
2) There's no captcha for the POST version (direct-post to process.php withouth API).
3) Don't use the following out-dated links:


Whether you wanted to use RECAPTCHA in your form, Direct-post or API, you surely found some "UNDEFINED FUNCTION" errors if followed this link
http://docs.formtools.org/tutorials/post_form_captchas/index.php?page=index

The error is something like
Call to undefined function ft_api_start_sessions()

That page wanted to be a tutorial for adding recaptcha to a NON-API form, but it ends up taking you to the API version here http://docs.formtools.org/tutorials/post_form_captchas/index.php?page=adding_captcha
I don't know what happened along the way, but there are many attempts to do it but it never happened.

Later, if you decided to finally go with the API, it wont work if you used that link due to some update on the name of the function. So again, they will be undefined if copied from that page or from the overview of "function reference" here http://docs.formtools.org/api/?page=function_reference (page was fixed but the functions list still shows the wrong one)

The wrong functions I found (so far) are:
PHP Code:
<?php ft_api_display_[color=#FF0000]recaptcha[/color](); ?>
and
PHP Code:
<?php ft_api_display_post_form_[color=#FF0000]recaptha[/color]_error(); ?>

There is no good captcha or server-side validation tutorials yet (that I know).

Use the captcha demo for adding recaptcha to your forms using the API, found here:
http://demo.formtools.org/forms/captcha/

The outdated recaptcha tutorial mentioned above also has extra functions for the "thank you" page and error texts thrown by the captcha function that don't work either. I haven't found what the replacements are yet, if they are needed at all.

My apologies for my bad english. Fell free to edit it.


RE: Captcha undefined with or without the API - Ben - Jul 4th, 2009

Hi Sergio,

Thanks for the post! And I'm sorry for the problems you've been encountering! I'm the first to admit, the documentation is not always up to date.

I haven't fully gone through everything you've mentioned just yet, but one thing was probably worth mentioning right off the bat: it looks like you may not be running the latest version of the API. It was last updated on June 16 - earlier versions don't include the ft_api_start_sessions function that it's complaining about.

To upgrade, just click on your Settings -> Main tab and click the Check for Updates button. I'll check out the documentation right now.

- Ben


RE: Captcha undefined with or without the API - Ben - Jul 4th, 2009

Hi again,

I've just updated the user doc so that the function reference and other areas reference the valid function names; I *think* I've caught everything, but let me know if you spot anything else out of whack.

For the problems you listed, I think that using the latest version of the API should fix it. But of course, please post back if you have trouble.

- Ben


RE: Captcha undefined with or without the API - sergiozambrano - Jul 5th, 2009

Thank you for you response.

Excuse my english, but I don't know if that's fine, or it's me…
This page http://docs.formtools.org/tutorials/post_form_captchas/index.php?page=index
says
Quote:You can add submissions to Form Tools by two methods: the API or by directly posting your form to the process.php script. The second type is known as a POST form; this tutorial explains how to add a CAPTCHA to that form type.

and the first page after that, still takes you out of that, to the API version.
http://docs.formtools.org/tutorials/post_form_captchas/index.php?page=requirements

Are you still working on CAPTHAs for the non-API version?

Thanks.

PS: I figured out how to get it done, along with updating the code, but I can't get the variables loaded to the form after validation failed and just an empty form is shown.
Can you take a look at it and see if there is something missing at first sight?
http://forums.formtools.org/showthread.php?tid=196