Form Pro: form disappears after submission

I made a change to the ‘success message’ in my FormPro instance. Now, instead of showing the message, the form just disappears after submitting. It does submit correctly however. My server generates an error_log after submission which reads:

PHP Fatal error: Cannot redeclare PHPMailerAutoload() (previously declared in /home/waterdown/public_html/lessons/piano-lessons-in-waterdown_files/phpmailer/PHPMailerAutoload.php:24) in /home/waterdown/public_html/lessons/piano-lessons-in-waterdown_files/phpmailer/PHPMailerAutoload.php on line 31

How can I go about fixing this?

Do you have more than one form on the page?

Do you have a URL we can look at?

Also please provide us a copy of your project file.

Create a ZIP file containing your project file. This is the file you open in RapidWeaver to edit your site. After creating the ZIP file, upload it using a service like Dropbox, WeTransfer, Droplr, or a similar service to create download link for us. Paste that download link in your reply.

Yes, there’s one in the body and one in the footer. They each have different classes.

One form per page unfortunately. These forms work off of reloading the page to send the form contents. Having two on the page (or more) triggers them all to try and send their content.

I’ve been using the same setup for a couple of years, though. All I did today was to change the contents of the Success Message and something broke.

Screenshot what you changed for me please.

I pulled a Time Machine backup of the working project so that I could compare it to my problematic version of the project.

The only thing that’s different is the Success Message. In the screenshot, the problematic version is on the left and the working version on the right.

Here’s the entire text of the problematic Success Message:
Thanks for your inquiry! If you have not heard back from us within the day, please check that our reply has not been sent to your junk or spam folder.

Here’s the entire text of the working Success Message:
Your message has been successfully sent! We’ll follow up with you as soon as possible.

The apostrophe is escaped in the working message but I don’t think I need to escape the ! or , in the problem one, right?

If you’re interested in seeing the project file for the working version, you can find it at Dropbox - RESTORED - WMA - - Simplify your life

I’m on my phone right now out of the office so I can’t look at your project until morning. Two things to try, in this order:

  • Remove one of the forms, then Republish All Files. Then clear browser cache, reload the page and give it a try again.

  • Add second form back and revert message to old version. Repeat the publishing, cache and refresh steps and then submit form again.

Let us know the results of each.

No change.

Put the old message back, republished etc, but the problem persists. Grr!

I popped into the office real quick. The immediate thing I notice is your folders are improperly named. You cannot use a slash in front of the folder name. This is not proper procedure in RW.

By doing this you’re creating cross over content in some of the resources RW publishes, and probably causing your problem. I can’t troubleshoot the project because you’re using several stacks I do not own. But I suspect if you sort out all of your folders and name the correctly that it may sort out your problem.

You can try fixing the folder names and then Republishing All Files, and see if it sorts everything out and make sure you don’t have other problems, but you might run into conflicts as RW does not remove content from the server – which is purposeful. You may need to delete the site that resides on the server to clear up the problem before republishing the fixed site. If you do so I would HIGHLY advise logging in via your FTP software, downloading a copy of the entire site as a backup before you delete the site from the server.

Thanks for the diligent troubleshooting, I really appreciate it! I took your advice and removed the leading slashes from the folder names, wiped the existing page from my server and re-published. However, this led to some pages being published at URLs that I do not want.

I have a page at which has a page beneath it called Piano Lessons. Before removing the slashes, the Piano Lessons page would publish at which is what I want.

When I remove the slash from the ‘piano lessons’ page, it publishes at - you’ll notice that /lessons appears TWICE in the URL.

How can remove the slashes as you’ve recommended and keep my desired URL structure? I feel like I should point out that I’ve had the leading slashes in front of the folder names for years and everything has worked perfectly until yesterday - has there maybe been a change in a recent RW update that is no longer allowing this?

FYI, here’s how things look in my editor:

It is one of those things – you can be doing something the wrong way, and it still work. But that does make it prone to breaking easier or having problems that you don’t see under-the-hood.

As for folder structure –

If that is what you want, then you cannot nest the Piano Lessons page in the Lessons page. Folder structure works the way it does for a reason. By adding that / in front of folder names you’re incorrectly structuring things. Now pages that should have their own files folder within them are sharing that folder and you get things confused. The Ghostbusters said it best…


Don’t name the Piano Lessons folder lessons then. Try something like piano-lessons for the Piano Lessons page. Or just piano maybe since it is already in the lessons parent folder.

Slashes have now been vanquished and are safely contained in the ghost trap. I’ve renamed folders as per your suggestion, deleted the old site and published the slash-free version. I also removed the second FormPro stack from the page.

But the issue persists! I’m still seeing an error_log being generated on my server after submitting a form. It reads:

[31-Mar-2022 14:08:21 UTC] PHP Fatal error: Cannot redeclare PHPMailerAutoload() (previously declared in /home/waterdown/public_html/lessons/piano/files/phpmailer/PHPMailerAutoload.php:24) in /home/waterdown/public_html/lessons/piano/files/phpmailer/PHPMailerAutoload.php on line 31

Please give this a try – Make a new page as a test. Something very plain and simple. Create a form using Form Pro on the page, then publish and test it. Let me know the results of that test.

I can’t test your current project file as it contains a slew of 3rd-party stacks that I don’t have. But if you recreate the problem in a test page as outlined above then I can work with that here. If you continue to get the error on your test page then send me that test page project file.

I did try that earlier, and the form worked as expected.

That rules out the stack not working as designed then. So I suspect you’ve got something amiss with the way you’ve built that page.

You can do one of the following:

Make a backup of your project file. Then try the following…

  1. Go through the problem page and delete a few items at a time and republish. Clear your cache and test things out. Do this until you’ve found the offending problem.

  2. Rebuild the page and add a few things at a time, testing as you go to find the offender. This is the reverse of option 1.

  3. Provide me a ZIP file, via email, that contains the 3rd-party stacks you’re using on that page, along with your current project file. This will allow me to do option 1 for you, as that is where I would start myself to quickly find the offender, and then test further if that turns up no results.

If things were working, then you changed something, but that change isn’t the problem, then it would appear something else has changed, too that you’re not remembering or didn’t realize perhaps.

OK, found the culprit. I did have another “invisible” FormPro on the page that I wasn’t considering (it’s invoked by the user clicking on something to have it appear instead of just being embedded into the page outright). Removing that solved the problem.

Glad you got it sorted out. I’ll mark this one as solved then! :smiley:

Thanks for everything!

No problem. I’m glad it was something known in the end instead of being an obscure bug.