Skip Navigation

[Resolved] Toolset form does not submit content and goes to page not found

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

Problem: When I disable AJAX for Form submissions, one of my site's Forms will submit, but no post is created. The User is redirected to the same page URL, but a URL parameter tt is added and a generic 404 error is displayed. No JavaScript or PHP errors are logged in this scenario. With AJAX active for this Form submission, the Form submits successfully without any errors and the post is created as expected.

Solution: In this case, the problem seems to be related to a generic field with the slug name. Forms that include a generic field with the slug name will not create or edit posts successfully and will redirect to a 404 error page. Our developers are aware of this problem and will resolve the issue in the upcoming Forms 2.6.10 release. Until that time, a workaround is required. You can either rename the field slug to something other than "name", or you can enable AJAX submissions for this Form.

This support ticket is created 3 years, 9 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
8:00 – 12:00 8:00 – 12:00 8:00 – 12:00 8:00 – 12:00 8:00 – 12:00 - -
13:00 – 17:00 13:00 – 17:00 13:00 – 17:00 13:00 – 17:00 13:00 – 17:00 - -

Supporter timezone: America/New_York (GMT-04:00)

This topic contains 8 replies, has 2 voices.

Last updated by Christian Cox 3 years, 8 months ago.

Assisted by: Christian Cox.

Author
Posts
#2025369

Hi

I am following up from this ticket which recently closed:
https://toolset.com/forums/topic/toolset-form-does-not-submit-content-and-goes-to-page-not-found/

I tried disabling all plugins (but all Toolset ones) and using the default theme but same issue occurs.

I wasn't really sure how to look in the browser logs or server logs to see issues with this though.

I can provide WP login if you let me send a private reply?

Thanks

P.S. Please note this is a live site.

#2025413

Hello, if you're not sure how to access server logs I can show you how to enable one temporarily from a standard wp-config.php file. Go in your wp-config.php file and look for

define('WP_DEBUG', false);

Change it to:

define('WP_DEBUG', true);

Then add these lines, just after the WP_DEBUG line:

define('WP_DEBUG_LOG', dirname(__FILE__) . '/error_log.txt');
define( 'WP_DEBUG_DISPLAY', false );
@ini_set( 'display_errors', 0 );
define('WP_DISABLE_FATAL_ERROR_HANDLER',true);

Submit the Form once again. If any server-side errors are triggered during this process, it will create an error_log.txt file in your site's root directory. Use FTP to look for this file in the same directory as wp-config.php. You may need to click "Refresh" in your FTP browser to see a new file appear. Please download this file to your computer, open it in any text editing software, and send me its contents. Once that is done, you can revert the changes you made to wp-config.php and delete the log file using FTP.

I have activated private reply fields here so you can share login credentials. Let me know if it is okay for me to submit the Form on the live site as a test. If not, let me know if I may create a clone of the site using a cloning plugin to run tests locally on my test environment.

#2026253

I was able to get the Form to submit successfully with AJAX submissions enabled (hidden link), but for some reason a full page load submission still isn't working. I would need to create a clone of the site to run some tests locally to continue troubleshooting. Let me know if you'd like for me to continue with those tests and I'll create the site clone.

#2026367

Right I see, yes please continue as I would really like to be able to do a page reload.

Thanks

#2026651

Okay I was able to track this down to the generic field with slug "name". For some reason I'm not completely understanding yet, that field slug is causing a problem here. If you change the slug to "your-name" or something similar, the Form will submit correctly with page reload. You may need to adjust any custom code you are using that targets that generic field to expect the new field slug. I'm escalating this issue to my 2nd tier support team, because it's not obvious why the "name" slug would cause this problem. I'll let you know what I find out.

#2027393

Okay my 2nd tier support has escalated the issue to our developers, and we'll work on a fix for the "name" slug in a generic field. Using a different slug as a workaround should be sufficient for now, let me know if you have any questions about that. Otherwise, I think we can close out here.

#2032253

Very odd, don't really actually have any custom code on this form so its easy enough to simply change this. 🙂

Thanks for your help!

#2032255

My issue is resolved now. Thank you!

#2079303

FYI the permanent solution for this problem will be included in the upcoming Forms 2.6.10 release.