I have created a Toolset form which allows a user to create a new post (called Ticket) with the status Pending Review. When the post is created it also sends a notification to alert us that a new post has been created. Everything was working as it should be when suddenly it stopped working. The posts are not being created when i hit publish and the notification is not being sent. As far as I know I haven't changed anything.
The toolset form is set to stay on the same page once the form is submitted but instead it is redirecting to a random page (looks like some kind of archive) with this url - hidden link
Thanks!
Hi, can you try these troubleshooting steps first to eliminate a possible conflict?
- Temporarily deactivate any custom code you have active in Toolset > Settings > Custom Code, then deactivate all plugins except Types, Forms, and Views/Blocks. Then activate a default theme like Twenty Twenty and test again
- If the problem is resolved, reactivate your custom code snippets, other plugins, and theme one by one until the problem returns
- If the problem is not resolved, can you tell me where the Form can be seen on your site?
- Are any server-side errors shown in the server logs when the Form is submitted? If you are not familiar with server logs I can show you how to activate them temporarily. 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'll review your responses and we can go from there.
Hi I went through all the steps and the issue returned when I re-activated my Theme. (I am using the7 Theme) but i hadn't updated the Theme or changed it in anyway and it was working before
Here is the error message I got when attempting to submit the form
Can you enable private and I will add the error as it has some identifying info in it - Thanks
Hi, sorry for the delay. Here is a private reply field you can use. Feel free to use "fake" information in the plugins and themes fields.
Okay thanks, I don't think the warning shown in the error log here would be causing the problem you have described. I'm not able to reproduce a problem like this in my local site with the7 active, but there are quite a few configurable theme options and it's possible one of these is causing a conflict. Would it be possible for me to log in to your site's wp-admin area, install the Duplicator plugin, and make a clone of your site? I can run some additional tests locally where I can monitor code execution in a controlled environment. If that's okay with you, please provide login credentials in the private reply fields here and I can get started.
Thanks, I'm escalating this to my 2nd tier team for additional investigation. I'm able to replicate the problem when I have a taxonomy input field and a conditional group based on that input field in my Form. I'll let you know what I find out as soon as I have more information to share.
Hi Christian
From your response I decided to try and use a custom select field rather than a taxonomy. This seems to be working so far. I.e instead of the user selecting the job or promotion category which conditionally shows the appropriate fields to the user, I've created a select field with 2 options (job and promotion) which conditionally shows the appropriate fields to the users depending on what they select.
Unfortunately I've used conditional logic in multiple other places (views, content template, notifications etc) to show and hide content depending on what category they have selected. Would you be able to tell me what the code should be amended to in the conditional short code. This is what I am currently using in a notification email for example.
A new
[wpv-conditional if="( CONTAINS(#(ticket-category),'job-advert') )"]Job Ticket[/wpv-conditional]
[wpv-conditional if="( CONTAINS(#(ticket-category),'promotion') )"]Promotion Ticket[/wpv-conditional]
has been submitted on the Marketing Ticketing System.
Click here to Approve or Reject the ticket.
Try the following conditionals:
[wpv-conditional if="( $(ticket-type) eq 1 )"] Job Ticket [/wpv-conditional]
[wpv-conditional if="( $(ticket-type) eq 2 )"] Promotion Ticket [/wpv-conditional]