doumeba0486 2013-09-09 07:30
浏览 11
已采纳

Typo3没有将发布数据发送到联系表单

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)

  • 写回答

1条回答 默认 最新

  • douzaipou3327 2013-11-18 09:58
    关注

    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 ;)

    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论

报告相同问题?

悬赏问题

  • ¥15 对于这个问题的解释说明
  • ¥200 询问:python实现大地主题正反算的程序设计,有偿
  • ¥15 smptlib使用465端口发送邮件失败
  • ¥200 总是报错,能帮助用python实现程序实现高斯正反算吗?有偿
  • ¥15 对于squad数据集的基于bert模型的微调
  • ¥15 为什么我运行这个网络会出现以下报错?CRNN神经网络
  • ¥20 steam下载游戏占用内存
  • ¥15 CST保存项目时失败
  • ¥20 java在应用程序里获取不到扬声器设备
  • ¥15 echarts动画效果的问题,请帮我添加一个动画。不要机器人回答。