- This topic has 3 replies, 2 voices, and was last updated 1 year, 2 months ago by
Support. This post has been viewed 1383 times
-
AuthorPosts
-
April 19, 2025 at 12:43 am #10045720
jmorin
ParticipantHi,
I am still running a customized old version (4.3.1) of the porto theme. Our web host recently updated our php version to 8.2 and it broke the contact forms. It is currently rolled back but I am trying to figure out how to update the contact pages.
I downloaded the newest version of porto. I followed the documentation for a contact form with Google Recaptcha v3, replacing old form code with new form code and older js and php files with new ones referenced in the documentation, bu I think I am out of my league. I can’t get it working.
One thing I noticed is this code:<form class="contact-form" action="php/contact-form.php" method="POST"> <div class="contact-form-success alert alert-success d-none mt-4"> <strong>Success!</strong> Your message has been sent to us. </div> <div class="contact-form-error alert alert-danger d-none mt-4"> <strong>Error!</strong> There was an error sending your message. <span class="mail-error-message text-1 d-block"></span> </div>
Both alerts show before the form is submitted…I’m guessing there is some css that hides it until submit is clicked but I can’t find it. Also on the contact-us-recaptcha html template page, the recaptcha doesn’t show…is this normal?
So basically, I thought I updated everything correctly but my form displayed the alerts prior to hitting submit and didn’t display the captcha.
I’m not sure if you can help me, but if you could walk me through all the files I need to update and any new css that wouldn’t be in the old versions.
Template Version: 4.3.1 - 12.1.0April 19, 2025 at 9:49 pm #10045722Support
KeymasterHello, thanks for using Porto. The version that you’re running was released 10 years ago, and most of the main files, like jQuery, Bootstrap, etc.. are now very different and not compatible with recent version of Porto. In that case “d-none” doesn’t work on Bootstrap v3, on that version the class was “hidden” – https://getbootstrap.com/docs/3.4/css/#helper-classes-show-hide – To get the contect form from Porto 12 to work in that version you would have to update at least jquery and bootstrap, but it will probably break a lot of the things in your site. Unfortunatelly there no easy way to do that.
You may consider to keep the version that you are using and update the folder /php/php-mailer with recent version https://github.com/PHPMailer/PHPMailer/archive/refs/heads/master.zip – to fix most of the problems related to PHP version.
Kind Regards.
April 21, 2025 at 11:53 pm #10045723jmorin
ParticipantHi,
Thanks very much. I tried the second option – replacing the php-mailer folder. The page loads now ( so I thought it was fixed), but unfortunately the message does not send and I do not get “Success. Your message has been sent to us” dialog.Any more help would be greatly appreciated.
Thanks
April 22, 2025 at 3:44 am #10045724Support
KeymasterHi, I can see that the page is submitted and and error 500 appears.
Add this at the top of the PHP file:
<?php ini_set('display_errors', 1); ini_set('display_startup_errors', 1); error_reporting(E_ALL);It will make the PHP show the errors to help figured out where the error is. You can also check the server log (a folder called “logs” in your server, you can see that with FTP) file to see the error message.
Kind Regards
-
AuthorPosts
This topic is marked as "RESOLVED" and can not rceive new replies.