Frontend form not working ("Oops...") when on server

I’ve had trouble with forms: they return the “oops” error message whenever I attempt to submit.

I even get the error in the standard example, and no hint in debug mode.

This happens only in the production environment (arch linux/apache web server), whereas everything works fine when I use the folder locally and host with php -S localhost:8000 system/router.php.

The form seems not to even get to the process chain. I have little clue what is going wrong, but suspect mis-configured file permissions or stuff from the .htaccess file.

here a stripped .htaccess file:

RewriteEngine On

RewriteCond %{REQUEST_URI} !^/index\.php
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule .* index.php [L]

</IfModule>

and the folder settings in the httpd.conf:

<Directory /srv/http/test>
       Options -Indexes +FollowSymLinks +ExecCGI
       AllowOverride All
       Order allow,deny
       Allow from all
</Directory>

Any help is much appreciated! I would at least love to have some debug clue.

Cheers,

Falk

Edit: might be related to “Error on contact form submit after 1.6 update” but @virusX did not specify whether it worked in a test environment.

I worked more on this, but did not succeed.
I would appreciate help.

I found out that the “oops” error is related to the “NONCE_NOT_VALIDATED” error from the form plugin. But I only saw it in the translations from the languages.yaml in the forms.
by grepping around, I also found that error in the plugins/form/classes/Form.php file.

        if (!$this->values->get('form-nonce') || !Utils::verifyNonce($this->values->get('form-nonce'), 'form')) {
            $this->status = 'error';
            $event = new Event(['form' => $this,
                'message' => $grav['language']->translate('PLUGIN_FORM.NONCE_NOT_VALIDATED')
            ]);
            $grav->fireEvent('onFormValidationError', $event);

            return;
        }

So I reckon this checks for a “nonce”.
And indeed, when I comment out the block above, my form submits smoothly.

Could someone please explain what a nonce is and why I do not get it on a website with default configuration?

Thank you in advance!

PS: I saw this, and I am using firefox. Maybe someone could resolve that other issue?