ajax.php and captcha error

Hi there, I'm having three issues with the plugin.

Firstly, when I tried to submit the form, it gives me the following error from contact-form/scripts/ajax.php.

Failed to load resource: the server responded with a status of 500 (Internal Server Error)

With the above error, no email was sent at all.

Secondly, with reference to the first screenshot, you will notice too that though I did not enable captcha, it still has the reCAPTCHA button.

Finally, with reference to the second screenshot, when I do enable captcha, the whole thing fails altogether (no submit button at all). No error is being printed out on the console.

Hope you will be able to help me with this. Thanks.

  • flashmech
    • The Incredible Code Injector

    Hi Phil, thanks for getting back.

    Yes the file exist in my install, in the right folder hierarchy.

    The file is not shown in the address bar. I saw the error in the console of my browser, Safari.

    Thanks for looking into this. :slight_smile:

  • Vladislav
    • Dead Eye Dev

    Hi,

    Unfortunately, I haven't been able to reproduce the issue on my side - but this just means that the problem is a bit less obvious. Do you perhaps have any custom .htaccess rules, other then what WordPress puts in there (either added by hand, or by a plugin - e.g. Bulletproof Security)?

    If not, can you please take a look at your PHP error logs and see if there are any errors reported? Also, could you please verify which PHP version you're running, just in case?

  • flashmech
    • The Incredible Code Injector

    Hi dev, how am I able to check custom .htaccess rules? I did not change anything, but my hosting provider might have. Anything specific to look out for? I don't have bulletproof security.

    Can you also help to point to me where the error logs and where to verify the version of PHP? I don't tinker much with these stuff, so it's not very obvious to me.

    Thanks much!

  • Vladislav
    • Dead Eye Dev

    Hi,

    If you are using cPanel, you can find out the PHP version by looking at the box labeled "Stats". If you don't see PHP version listed there, click the "expand stats" link under the box, and you should be able to see it then.

    For .htaccess, for single site it should look similar to this: http://codex.wordpress.org/Using_Permalinks#Creating_and_editing_.28.htaccess.29

    For network install, it should look more like this: http://codex.wordpress.org/Create_A_Network#.htaccess_and_Mod_Rewrite

  • Mason
    • DEV MAN’s Sidekick

    Hiya,

    As we haven't heard back from ya with any response in awhile I'm gonna mark this one resolved. If you'd like to go through anything further, feel free to re-open this thread. Alternately, you can also always open up a new one.

    Thanks!

  • flashmech
    • The Incredible Code Injector

    Hi dev and support, sorry for the delay on this. Was caught up on other fronts of the battle.

    Ok so here's the info that you need. :slight_smile:

    PHP Version: 5.3.5

    With regards to htaccess, I've read up more on the subject and definitely changed a few things over the past 2 weeks. I'm not ready to share this openly, so if you want to take a look, please let me know your email address. :slight_smile:

    So I reactivated the plugin today, and apparently the situation is different now (maybe after I changed the htaccess?)

    Problem 1: Conflict with another plugin
    Fatal error: Cannot redeclare _recaptcha_qsencode() (previously declared in /home/flashmech/public_html/blog/wp-content/plugins/tantan-spam/plugin.php:519) in /home/flashmech/public_html/blog/wp-content/plugins/contact-form/scripts/recaptchalib.php on line 55

    Problem 2: submit_form is not defined
    After I deactivated the conflicting plugin, the captcha area appears now. After I fill in the details, and I click on submit, the function is apparently not defined. This error came up on the Firebug console.

    I tried disabling the captcha to no avail too.

  • flashmech
    • The Incredible Code Injector

    I just realised that the css is also apparently not used on my settings. The css rules did specify some styles that were previously working, but wasn't now (could it be the htaccess?).

    I went to check if the css is active or not, and indeed it is inactive. This is true with the rest of the files as well. :slight_frown:

  • Mason
    • DEV MAN’s Sidekick

    Hiya flashmech,

    Thanks for the additional information. I'm going to ask our developer to take a look at this. The first error just means the function needs to be renamed to avoid conflicts with the other one. The second is odd, but we'll take a look. I know VeBailovity has got quite a few updates to other plugins, but I'll ask him to take a look here as well.

    Thanks again for the detailed info!

  • Vladislav
    • Dead Eye Dev

    Hi,

    When you open plugin files in the editor other then the main plugin file (the one with the plugin header information), having them read "inactive" is normal. The conflict with the other plugin is about both of them including the same third party library. This can be solved easy enough and the patch is already ready, but let's just see if we can track down and solve the main issue first and include a fix for that in the release too, if needed.

    Can you please try and temporarily revert your .htaccess file to just the WordPress defaults? This way we can determine if the cause is in one of the custom rules, so we can go from there.

  • Mason
    • DEV MAN’s Sidekick

    Hiya flashmech,

    Apologies as this one appears to have been over-looked. Can I get a link to your site? I'll check it out and see if I can see anything at the source. My guess here is similar to what other's have said though - something in your setup is stopping the ajax file from loading.

    Thanks!

  • flashmech
    • The Incredible Code Injector

    Hi there,

    Thanks for getting back. I've activated the plugin on my site, please check it out at http://flashmech.net/.

    Once you have investigated, please update this thread soonest. Nothing about the plugin is working and it looks ugly on my site. I will want to disable it as fast as I can until something can be fixed.

    Thanks for your understanding and time looking into this. :slight_smile:

  • flashmech
    • The Incredible Code Injector

    I went ahead and changed it from "contact-form" to "contact-widget", but that caused more problems.

    Digging deeper, I found that the $plugin_dir defined in contact-form.php is directing it to "contact-form"

    I changed it from "contact-form" to "contact-widget" and tada, the issue remains as before I did all these. :slight_frown:

  • Philip John
    • DEV MAN’s Apprentice

    Yeah, I asked that because the plugin files aren't actually arranged in the normal way. If you upload as-is you get this situation:
    /wp-content/plugins/contact-widget/contact-form/contact-form.php

    However, you have read the instructions :slight_smile:

    The developer will be back soon to take a look though to try and figure this one out. Really got us stumped...

    Phil

Thank NAME, for their help.

Let NAME know exactly why they deserved these points.

Gift a custom amount of points.