plain-solutions-gmbh / kirby-form-block-suite

This form plugin for Kirby offers you maximum flexibility and usability. It can be used as a block anywhere you needed. This repository replaces the obsolete version 2.0.
Other
38 stars 11 forks source link

[K4] Page redirect not working #28

Closed brandsis closed 7 months ago

brandsis commented 8 months ago

I've installed the latest version of Form Block Suite (3.5.7) in a K4 test site and the 'on success' page redirect does not appear to be working.

I've installed from scratch and recreated my form from scratch. In the Options, I've turned on 'Redirect visitor' and selected the relevant page as the destination...

image

However, when I submit through the form, which is successful and appears in the Panel, the front-end page simply refreshes with the form now gone. I assume it's behaving as if the redirect is not switched on and the page is trying to show a confirmation message, which I haven't entered.

image

brandsis commented 8 months ago

I've just turned the redirect off and added some confirmation text but that made no difference. The form page refreshes, as before, but message does not appear.

plain-solutions-gmbh commented 8 months ago

Please open the dev console and see if there's an error message.

brandsis commented 8 months ago

Hi, Roman. All I'm getting in the console is this...

Uncaught TypeError: Cannot set properties of null (setting 'outerHTML')
    at FormBlock.onfieldvalidate (formblock.js:72:80)
    at FormBlock.onvalidate (formblock.js:59:15)

I hope that helps.

plain-solutions-gmbh commented 8 months ago

Interesting, i had the same issue recently with an another customer. I turns out, that the templates /site/snippets/blocks/form.php comes from a older plugin version version. Please verify this file with the one from the plugin

brandsis commented 8 months ago

I do not have a form.php file in the folder /site/snippets/blocks. And the form.php file in the folder /site/plugins/form-block-suite/snippets/ is identical to the one you linked to.

plain-solutions-gmbh commented 8 months ago

Can you upgrade to version 4.0.0 and check it? To make sure that all old files are gone, please delete the folder of the form block plugin and reinstall it.

brandsis commented 8 months ago

Hi, Roman.

I've installed v4.0.0. All old files are gone and I had/have no overriding files in the main blueprints or snippets folders.

However, I am getting the same result with both the success message and redirect options – the contact form page refreshes with an empty space where the form was.

plain-solutions-gmbh commented 8 months ago

Is this page reachable over the internet? Do you have me a link?

brandsis commented 8 months ago

Happy New Year, Roman! The page is currently in a locahost dev environment. I'll promote it to my test environment, which is public-facing, and share a link soon.

cselex commented 7 months ago

Hi!

I have almost the same problem. When I wanted to send a form, I got this: image

Kirby 4.0.0 and your plugin is up to date. So now it is not working, please help.

You can check on here: http://patakimartina.iavel.hu/kapcsolat

plain-solutions-gmbh commented 7 months ago

@whitmoa: Take your time. I'il close this thread too keep it clean. You can open a new issue, if the issue still persist and you still need assistance. Thanks for your understanding.

brandsis commented 7 months ago

Hi, Roman. Thanks for your patience. I'm just pushing the site to my internet-facing UAT environment. Once done, I'll retest and, if the problem persists, I'll raise a new issue ticket.

brandsis commented 7 months ago

Roman, I'm pleased to say that the page redirect works on an internet-facing site. Not sure why it's not working in my localhost environment, which is on XAMPP, but at least it means I can push forward with updating my client's site to Kirby 4.

No new issue ticket required. 🙂