Form submissions not working on subsequent submissions #866
-
Describe your problem 🧐I have a default Wordpress search form in my header. The swup transition works perfectly on the first attempt. However any subsequent submissions do not and are redirected like a normal GET form. I've disabled all my Wodpress plugins, other javascript, swup plugins and even tested with the default Wordpress TwentyTwentyFour theme. This plugin works perfectly in CodeSandox so it must be something Wordpress is doing that's incompatible with the plugin. I've narrowed it down to the 'form:submit' hook not being called on the subsequent attempt. I've noticed What is your question? 🙋♀️Any idea why this might be occurring and a possible fix? URL to minimal reproduction 🔗N/A with codesandbox Checked all these? 📚
|
Beta Was this translation helpful? Give feedback.
Replies: 5 comments 1 reply
This comment has been hidden.
This comment has been hidden.
-
Just working on getting a demo environment to show the behaviour. In the meantime I've narrowed things down. If I change line 129 of index.ts from:
To simply:
Everything works perfect. For some reason the callSync method doesn't seem to do anything after the first page load. |
Beta Was this translation helpful? Give feedback.
-
Demo wordpress site here: https://swup.swelldev.com.au/?s= As you can see – the first form submission works perfect. Subsequent submissions cause a page redirect. This is a demo with the default wordpress theme. I can confirm I get exactly the same behaviour with my custom theme that uses different markup in the search form. |
Beta Was this translation helpful? Give feedback.
-
Been doing some investigating — this seems to be an issue with the Forms Plugin itself. I've created a PR with a fix along with a bug report. |
Beta Was this translation helpful? Give feedback.
-
This was indeed an issue with the plugin — we've improved how swup handles hooks in a previous release and haven't made some of the required adjustments to make the plugin compatible. This should be fixed in the latest plugin release 3.4.2. |
Beta Was this translation helpful? Give feedback.
This was indeed an issue with the plugin — we've improved how swup handles hooks in a previous release and haven't made some of the required adjustments to make the plugin compatible. This should be fixed in the latest plugin release 3.4.2.