Sauter la navigation

[Résolu] Form redirect not working after form submission

Ce fil est résolu. Voici une description du problème et la solution proposée.

Problem:
A form to publish posts is supposed to show the published post after submission, but does not redirect.

Solution:
The issue was that a redirect delay was included in the form, and a bug meant that anything other than a delay of zero broke the redirection.

This was fixed with an update to Forms 2.2.1.1

This support ticket is created Il y a 6 années. 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
- 7:00 – 14:00 7:00 – 14:00 7:00 – 14:00 7:00 – 14:00 7:00 – 14:00 -
- 15:00 – 16:00 15:00 – 16:00 15:00 – 16:00 15:00 – 16:00 15:00 – 16:00 -

Supporter timezone: Europe/London (GMT+00:00)

Ce sujet contient 7 réponses, a 3 voix.

Dernière mise à jour par Nigel Il y a 6 années.

Assisté par: Nigel.

Auteur
Publications
#1158038
dashboardd.png
image3.png
image2.png
image1.png

I have a cpt, Customers with a cred form. After the form has been completed (image1) it is set to display the post. When it displays the post it only shows a "1" (Image 2) instead of the template set for customers single post. Here is the code for the template that should display.

<h2>[wpv-post-title]<br/></h2>
[types field='dtms-registration-nr'][/types]<br/>
[types field='dtms-ph-city'][/types]<br/>
[types field='dtms-ph-address-1'][/types]<br/>
[types field='dtms-ph-address-2'][/types]<br/>
[types field='dtms-ph-city'][/types]<br/>
[cred_child_link_form form='45' parent_id='-1' text='Add New Contact' target='_blank']

This template is set under usage to display for customers (image3)

Please advice.
Included is a screen print of the toolset Dashboard

#1158607

Nigel
Supporter

Les langues: Anglais (English ) Espagnol (Español )

Fuseau horaire: Europe/London (GMT+00:00)

Hi there

Sorry for the slow response.

With the settings you have, what should happen when you submit the form is that the form redirects to the URL of the newly published post, adding a cred_referrer_form_id URL parameter. From your screenshots I can't see the URLs, but it looks like you stay on the same page, is that right?

First, check your browser console for JS errors.

That seems more likely than a PHP error, but you should also check your debug log.

I haven't observed this myself, and just tested it again to be sure, so it seems to be something specific to your installation.

Which means, first, ruling out any conflicts from other plugins or the theme.

Could you please try disabling the non-Toolset plugins and switching theme to twentyseventeen then trying again? If the issue disappears then it should be possible to determine the source of any conflict by a process of elimination.

Let me know how the above goes so I can see how to proceed.

#1158620

HI Nigel,

I have done the plugins, changed the theme to 2017 and the console error shows the following:

Error in event handler for (unknown): TypeError: Cannot read property 'sites' of undefined
at chrome-lien caché

There is nothing else that I can pick up right now

#1158627

Nigel
Supporter

Les langues: Anglais (English ) Espagnol (Español )

Fuseau horaire: Europe/London (GMT+00:00)

I think I'll need a copy of your site for test locally then, if you could please make a Duplicate available (lien caché).

I'll set the next reply as private.

#1158777

Nigel
Supporter

Les langues: Anglais (English ) Espagnol (Español )

Fuseau horaire: Europe/London (GMT+00:00)

I installed a copy locally and tried various permutations and combinations to get past the issue and could not, but I was unable to reproduce the same on my own test site.

I'm escalating this so that my colleagues can take a deeper look, and I'll report back with their findings.

#1159664

Hi Andre,

Nigel is away for a few days and I'll follow up with you on this ticket.

Thanks to your report, we've identified an issue related to form redirection to the created post, when some delay is set.
( https://toolset.com/errata/a-form-redirecting-to-the-post-created-with-delay-will-not-redirect-to-the-post-created/ )

I'm afraid, we don't have a time estimate to share at this time, but we will inform you as soon as this gets fixes, through this ticket.

Meanwhile, you can use a workaround and set the form redirection delay to "0", to avoid this.

Appreciate you brought this forward and thank you for your patience.

regards,
Waqar

#1162786

My issue is resolved now. Thank you!

#1167754

Nigel
Supporter

Les langues: Anglais (English ) Espagnol (Español )

Fuseau horaire: Europe/London (GMT+00:00)

Just a follow-up to say that we published an update to Forms 2.2.1.1 today which fixes this issue.