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
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.
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?
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 waterdownmusicacademy.ca/lessons which has a page beneath it called Piano Lessons. Before removing the slashes, the Piano Lessons page would publish at waterdownmusicacademy.ca/lessons/piano-lessons-in-waterdown.php which is what I want.
When I remove the slash from the ‘piano lessons’ page, it publishes at waterdownmusicacademy.ca/lessons/lessons/piano-lessons-in-waterdown.php - 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?
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.
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…
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.
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.
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.