Reputation: 483
I'm working on a typo3
-based system (Version 4.7), and trying to get the contact-email-form to work. It is a fairly simple one (Name, Email, some fields like Adress and a Question Text) to send a simple text based email. The plugin I'm currently using is powermail
.
When testing this form on my local version of the system it is sending the email to my adress without a problem - on the live system, however, it only displays the message
An error occurred while trying to call Tx_Powermail_Controller_FormsController->createAction(). Error: Required property 'form' does not exist.
what I already know:
The Problem seems to be that the html form is not submitting any POST
data to the extension controller and therefore it has nothing to work with and is displaying that error ...
This is not a problem with powermail, building the form with other extensions (mailformplus
, the built-in form
plugin ...) has the same problem: no post data is sent.
It's also not a problem with POST-data on that server in general, calling a simple test script like this:
<form method="post" action="test.php?gettest=1" enctype="multipart/form-data">
<input type="text" name="test" value="" />
<input type="submit" name="submit" value="Testen" />
</form>
from a script not in the typo3-system displays
GET:
array (size=1)
'gettest' => string '1' (length=1)
POST:
array (size=2)
'test' => string 'test' (length=4)
'submit' => string 'Testen' (length=6)
correctly in test.php
(which is just a var_dump($_POST/$_GET)
).
However, building the above as a page in the typo3 system shows shows an empty POST array in test.php
.
The problem is the same with realurl
disabled.
Now my question is, could there be anything else in typo3 rewriting/redirecting request that POST-data might get lost? As I said, my local system works and I really can't findd any configuration difference between those two ... (but I'm also still far away from understanding every bit of the typo3 CMS' internal working)
Upvotes: 1
Views: 3106
Reputation: 483
It finally works now, and it was a rather stupidly simple issue with the webserver.
It rewrote requests to this site to use http://example.de
as a refferer, whereas the links generated from Typo3 used http://www.example.de
(because I entered that as config.baseUrl
).
The normal pages didn't have any problem with that, but everytime a POST
-form was used from within Typo3 it resulted in the POST
-data not being send, resulting in above mentioned error from Powermail (and all other email plugins).
So the solution was setting the config.baseUrl
to http://example.de
, the exact same the webserver rewrote requests to.
I hope maybe this can help someone else having a similar problem someday ;)
Upvotes: 4