Submit button displays a Javascript alert: "undefined"
Author | Posts |
---|---|
July 8, 2013 at 10:56 pm 5698 | |
ladantre21 | I cannot figure this out. I have a form on my website that will create a pending post. When you hit the submit button, there is a Javascript alert that only reads "undefined".
http://www.mejditours.com/open-tour-questionnaire/
Which is crazy because I tested this form out last week and it worked great. I can't remember what has changed since then, was there a plugin update this past week?
I'm pretty sure this is happening on line 128 of frontend-form.js, if that helps. I added one line here in this else clause:
console.log(res);
It returns -1 in the console log.
I have tried making some other changes to figure what is causing the undefined error. I was trying to add reCaptcha to another contact form last week, which I discovered interferes with the one that FrontEnd Pro uses. Or for that matter, you can only have one reCaptcha field on any page. I have removed all the other reCaptcha stuff I added to the contact form and calls to the recaptcha files (from my functions.php) so that the only reCaptcha would be the one that FrontEnd Pro uses. It still returned undefined. I then removed the reCaptcha from the FrontEnd Pro form and it still returns undefined. So now I don't think the reCaptcha is the issue and I cannot figure out what is causing it.
EDIT: I should also mention that I tried making a new form altogether, but it still doesn't work. |
July 8, 2013 at 11:06 pm 5701 | |
spark | I have discovered the source of the problem. I am using a plugin called Better WP Security. It has a setting to force the use of https on the login and admin areas; it’s the admin area that’s causing the problem. I think when the form makes the AJAX request to an https address (I noticed this in the console) it can’t get a response. When I disable the https-forcing the form works fine. Do you think there is a solution to this? I’d still like to force https on the admin area if possible. |
July 9, 2013 at 2:49 am 5710 | |
Tareq Hasan | Hmm, thats a different problem. But as I’m using Now it should follow the https URL scheme. |
July 10, 2013 at 1:53 am 5822 | |
spark | Dang, that didn’t seem to help 🙁 I can still force https on the login, so they’ll still be using https in the dashboard area. I guess they could manually change the URL after that, but I don’t think the client will know enough about that sort of thing for it to be a worry 😛 I assume the problem lies with the security plugin and how it rewrites URLs, not with WP Frontend. Oh well, if I run into problems I’ll have to figure something out with that. Thanks anyway! |
July 11, 2013 at 5:28 am 5856 | |
Tareq Hasan | Right, the plugin might doing something with the URL structure. Other than that, it should work. |
August 19, 2013 at 4:41 am 7143 | |
ladantre21 | I am having the same original problem. All my forms now have a popup that displays “undefined” and won’t actually submit the info. And I don’t have the ‘Better WP Security’ plugin. I don’t know what to do. |
August 19, 2013 at 5:05 am 7144 | |
ladantre21 | One more tid bit, is that it’s happening on a Single WordPress Installation. My multi-site Installation is working fine. Not sure if that makes any difference. |
August 19, 2013 at 5:25 pm 7152 | |
Tareq Hasan | Can you post your site address and login details in a private reply? |
August 19, 2013 at 7:13 pm 7156 | |
ladantre21 | This reply has been marked as private. |
August 20, 2013 at 1:14 am 7164 | |
Tareq Hasan | Some plugin is conflicting in your case. The plugin uses ajax for form submission and file upload and seems like no request is being reached to the server. Some plugin is blocking the ajax request, but I can’t see which one. Disabling one by one may help to detect the problem. |
August 20, 2013 at 1:35 am 7169 | |
ladantre21 | It’s stupid Jetpack. I’m deactivating it for good. |