Skip Navigation

[Resolved] CRED ajax post form submission generates “undefined” popup

This thread is resolved. Here is a description of the problem and solution.

Problem:

On CRED version 1.9.6.1, with option option "AJAX submission", get a
popup that said "Operation completed successfully".

Solution:

It seems to be a known bug of stable version of CRED plugin 1.9.6.1, then I tried your settings with the development version of CRED plugin 2.0, it works fine, but it is still under QA status, so I suggest you try these:

1) Edit your CRED form, disable option "AJAX submission"

2) Wait for the next stable version of CRED plugin 2.0, and test again.

Relevant Documentation:

This support ticket is created 6 years, 6 months ago. There's a good chance that you are reading advice that it now obsolete.

This is the technical support forum for Toolset - a suite of plugins for developing WordPress sites without writing PHP.

Everyone can read this forum, but only Toolset clients can post in it. Toolset support works 6 days per week, 19 hours per day.

Sun Mon Tue Wed Thu Fri Sat
- 9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 -
- 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 -

Supporter timezone: Asia/Hong_Kong (GMT+08:00)

This topic contains 5 replies, has 3 voices.

Last updated by sarahP 6 years, 6 months ago.

Assisted by: Luo Yang.

Author
Posts
#901199
Undefined Capture.PNG

I have a CRED form on my site's sidebar (visible to admins only, so I don't have a link at this time) that allows me to change the custom status of the custom post type post on which it displays via some checkboxes and an Update button.

This worked smoothly for quite a while. Then at some point, around 1.9.3.1, when I updated the status, I received a popup that said "Operation completed successfully" with an "ok" button to close the box.

I am now on CRED version 1.9.6.1 and I still get a popup when updating, but now it simply says "undefined" with an "ok" button to close the box.

The status changes are taking effect, so overall the form is working, but the popup is clearly an issue (regardless of the message) and creates unnecessary clicks. If I turn off Ajax submission in the form settings, then I don't get the weird popup.

Any ideas on what might be interfering with the Ajax and causing the popup?

Thanks!
Sarah

#901267

I suggest to quickly try this as follows:

- If possible, on a staging site deactivate all Plugins but Toolset, and activate the Twenty Seventeen Theme
- Create a new form with the same purpose as the existing form
- Insert it where you have the current form

If it works, re-enable all plugins and the Theme, and check it again.
If it proceeds working dump the old form and use the new one.

If not, please check the Console for any errors, and enable WP Debug Log as well to see the PHP log:
https://codex.wordpress.org/WP_DEBUG

Let me know if you see any errors, and what the exact steps are you take to make the issue happen, in case it proceeds - so we can try to replicate this.
Or, a copy of the site will do as well in that case:
hidden link

#901796

Hello Beda,
I have done as you suggested. On a staging site, I disabled all plugins, enabled the default 2017 theme, but no luck and no errors in the log.

I created a new form that does the same thing (checkboxes) and inserted it both in the same place (in a content template, then in a text widget in the sidebar) and also tried embedding the form directly in the content template for the custom post type. In each case, submitting the form creates the "undefined" popup.

Here is my original form:

[credform class="cred-form cred-keep-original"]
	[cred_field field="form_messages" value=""]
		<div class="cred-field cred-field-status">
          <h6><label class="cred-label">Edit Status</label></h6>
			[cred_field field="status" post="plants" value="" urlparam=""]
		</div>
	[cred_field field="form_submit" value="Update" urlparam=""]
[/credform]

Is there something else I could be doing wrong? This was working flawlessly until some time earlier this year. Should I proceed with making a copy of the site for you?

#901827

Hello,

Yes, since you have already checked the compatibility problems, please provide a database dump file (ZIP file) of your website in below private detail box, also point out the problem page URL, I need to test and debug

#902279

Thanks for the details, I can duplicate the same problem in my localhost, it seems to be a know bug of stable version of CRED plugin 1.9.6.1, then I tried your settings with the development version of CRED plugin 2.0, it works fine, but it is still under QA status, so I suggest you try these:
1) Edit your CRED form, disable option "AJAX submission"
2) Wait for the next stable version of CRED plugin 2.0, and test again.

#902564

Ok, great! I'll look forward to the next release. 🙂

Thank you,
Sarah