Skip Navigation

[Resuelto] Post not displaying after form submission

This support ticket is created hace 6 años, 4 meses. 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.

Hoy no hay técnicos de soporte disponibles en el foro Juego de herramientas. Siéntase libre de enviar sus tiques y les daremos trámite tan pronto como estemos disponibles en línea. Gracias por su comprensión.

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

Supporter timezone: America/Jamaica (GMT-05:00)

Este tema contiene 8 respuestas, tiene 2 mensajes.

Última actualización por Shane hace 6 años, 4 meses.

Asistido por: Shane.

Autor
Mensajes
#919662
temp.jpg

I've just realized that none of my posts submitted from the front-end are redirecting to the post after the form is submitted like they are supposed to, and it's not displaying the form message either. Here are three pages that are experiencing the issue (all forms I've tested are experiencing the issue):

/private-page/request-support/request-new-features/
/private-page/groups/create-a-group/
/private-page/my-homeschool/add-a-term/?household=131

It used to automatically display the post after submitting the form, and now I get a blank page (see screenshot). I've disabled snippets I thought could be impacting it and the issue is still occurring. What makes it especially difficult is that no error messages get logged.

The site is live now so I need to figure this out ASAP. Any help would be appreciated. Thanks.

- Aaron

#919934

Shane
Supporter

Idiomas: Inglés (English )

Zona horaria: America/Jamaica (GMT-05:00)

Hi Aaron,

Thank you for contacting our support forum.

If you go to the created post on the frontend its created correct? All the values are populated ?

Next could you check if the post is assigned to a view ? What happens if you create the post on the backend instead?

Please let me know.
Thanks,
Shane

#919940

Hi Shane,

The post was successfully completed - it just doesn't bring the user to the post after submission. Creating a post on the back end does work and yes, the posts are associated with views. All of the post examples I provided have one or more views that are used to display their content.

- Aaron

#919966

Shane
Supporter

Idiomas: Inglés (English )

Zona horaria: America/Jamaica (GMT-05:00)

Hi Aaron,

I was able to check out the issue with the link you previously provided.

I noticed that the redirect link is incorrect for the post.

Could you temporarily disable all the non-toolset plugins if you have not already tried this and see if it starts working ?

Thanks,
Shane

#920014

Hi Shane,

Which redirect link were you referring to that you saw was incorrect? I disabled all my code snippets and can confirm it started working once I did that. I will now need to isolate which snippet was causing the issue, but any further details you could provide might be helpful. Thanks.

- Aaron

#920017

Hi Shane,

I was able to isolate the problem to a code snippet I created while developing a new feature to add to the site. I'm not sure why it would be causing other forms to have issues though. Here is the code:

	add_action('cred_save_data','be_create_new_event',11,2);
	function be_create_new_event($post_id,$form_data) {
	    if ($form_data['id']==3208) {
.....

All of the remaining code sits inside of that if statement so in theory should only have any effect if its related to form 3208 (completely different form than the one related to the affected posts). Do you have any suggestions on how to troubleshoot? Thanks.

- Aaron

#920018

Shane
Supporter

Idiomas: Inglés (English )

Zona horaria: America/Jamaica (GMT-05:00)

Hi Aaron,

Whenever the redirect is fired it should give the link to the post in the url.

In this case it seems to be giving the url for a that should display message when form is submitted. Notice there is a ?_tt=xxxxxxxxxx in the url.

What should be there is the full url of the post that was created.

Yes please isolate the code as it seems to be interfering with the redirection.

Thanks,
Shane

#920019

Wait - I just figured it out. I had a bit of code for debugging that sat outside that if statement. My bad. So sorry to have bugged you with this. I've got it sorted now.

- Aaron

#920022

Shane
Supporter

Idiomas: Inglés (English )

Zona horaria: America/Jamaica (GMT-05:00)

Hi Aaron,

Awesome 🙂 and no no not a bother. I'm here to help in any way I can.

Thanks,
Shane