Support Forum

Captcha Not Functional.

24 Answers

New Answer

SR Shattered RPG
Shattered RPG
Member

Thanks, I’ll have to look into it. Maybe that will help in solving this issue.

SR Shattered RPG
Shattered RPG
Member

I have managed to fix the problem. it took two steps to fix. It seems that your code could not find the CSS file so I hardcoded it into the sp-captcha-components.php. Not sure why this is happening, but I got it to work so I’m not complaining.

        echo “<style type=’text/css’>@import ‘http://WEBSITE.COM/wp-content/sp-resources/forum-plugins/captcha/resources/css/sp-captcha.css’;</style>
“;
    if(isset($_GET[‘action’]) && $_GET[‘action’] == ‘register’) {
        $css = sp_find_css(SPCAPCSS, ‘sp-captcha.css’);
    }
}

Then the circle was not showing up. Well, apparently an empty <p> element was the problem. So I removed your jquery.cpatcha.js and edited the jquery.captcha-dev.js

From this: <p id=’ajax-fc-circle’></p>

To this (note the space): <p id=’ajax-fc-circle’> </p>

    $(this).html(“<div id=’ajax-fc-content’><div id=’ajax-fc-left’><p id=’ajax-fc-task’>” + options.text + “</p><ul id=’ajax-fc-task’><li class=’ajax-fc-0′><img src='” + options.captchaDir + “item-none.png’ alt=” /></li><li class=’ajax-fc-1′><img src='” + options.captchaDir + “item-none.png’ alt=” /></li><li class=’ajax-fc-2′><img src='” + options.captchaDir + “item-none.png’ alt=” /></li><li class=’ajax-fc-3′><img src='” + options.captchaDir + “item-none.png’ alt=” /></li><li class=’ajax-fc-4′><img src='” + options.captchaDir + “item-none.png’ alt=” /></li></ul></div><div id=’ajax-fc-right’><p id=’ajax-fc-circle’> </p></div></div>”);

MP Mr Papa
Mr Papa
Member

quite odd… have you checked the permissions on the sp resources folder?  and the captcha plugin itself?  only thing that comes to mind…

but good detective work none the less…

MP Mr Papa
Mr Papa
Member

I assume that is the directory… what about the files?  in particular the css file that cannot be read…

also, another test, in your browser, in the url field, enter the url to the css file (I assume it actually exists on your server?) and see if it comes up or generates an error… It should come up as it should be web accessible…

SR Shattered RPG
Shattered RPG
Member

CSS file is 644. I changed the permissions to 755 and used the original code, did not work.

The CSS file is web accessible.

 

If I use the absolute path instead of the search function you have in the PHP file and use <style>@import ________</style> instead of <link></link>, the CSS loads. I searched my “sp-captcha-components.php” file for the search function ‘sp_find_css”, and it does not seem to exist. Perhaps that is the problem?

MP Mr Papa
Mr Papa
Member

not sure what the issue would be… we have thousands using the captcha plugin without this issue… so while there might be an issue it seems to be related to some sort of server configuration… sp_find_css() is a core simple press function – that is in the simple press plugin not the captcha plugin… 

if you are able to debug where it fails on your setup, might provide useful info…

out of curiosity, what sp theme do you use?

SR Shattered RPG
Shattered RPG
Member

I use Black-Gold but it did the same with the default. I’m not quite sure where to debug where the plugin fails. All I know is that sp_find_css() returns nothing for this plugin.

MP Mr Papa
Mr Papa
Member

that function , sp_find_css(), s a critical part of simple press core api and used on tens or hundreds of thousands of installs and not having any other reported issues…  so tends to point to some sort of server configuration….  not saying one that is wrong or bad, but non standard…  if indeed valid, would like to know the particulars, cause or reason so any needed improvements could be made…  just lacking data currently…