Unable to submit form over SSL

I have a website that has form which submits data over POST and redirects to another page that precesses the information and it works fine in my local environment but once I upload it to my live server using SSL from Let’s Encrypt, the form doesn’t submit. When I click the button it’ll just refresh the current page. Even after enabling the Kirby SSL option on the config.

After reading your post I tested on a site I just launched… Same here, now that the site uses SSL the contact form no longer works.
Investigating…
Edit: on another site with SSL it works. Same plugin version (2.2.6) so there is a way to make it work.

What kind of form are you using? Are you using a plugin? Without code it’s hard to say.

My company site has a contact form that can only be submitted via HTTPS (Let’s Encrypt) with the Uniform plugin and it works just fine.

In my case I use the Uniform plugin. The strange thing is that it works fine on another site.
Right now I’m having a look at the http->https redirection in the .htaccess file, but don’t see why it wouldn’t work.

Duh, I found out why: I forgot to disable the cache for contact pages… Still not a Kirby ninja :persevere:

So the problem did not arise from the fact of moving to SSL but from the fact of using a different config.php, I suppose.

Indeed, I have an additional config file locally which contains:

c::set('debug', 'true');

// Disable cache
c::set('cache', false);

// No https on localhost
c::set('ssl', false); 
```
It had nothing to do with SSL. I wonder if @irvin could have a similar issue?

Figured it out, turned out it was not the SSL. On submit I was writing the POST data into a file but I had forgotten to give my ‘content’ file write permissions (Duh!). I just wasted endless hours and tears on this thinking it had to do with either SSL or something with POST. :persevere:

1 Like