简体   繁体   English

在TYPO3 v9.5中提交表单时出现问题

[英]Problems when submitting a form in TYPO3 v9.5

In TYPO3 versions before v9, when using the native form, I always disabled the cache of that specific "contact" page (where the form was placed). 在v9之前的TYPO3版本中,当使用本机表单时,我总是禁用该特定“联系人”页面(放置表单的地方)的缓存。 If I didn't disable the cace, the form wouldn't redirect to my "confirmation" (v6/v7) or "redirect" page (v8), but instead it would simply reload the (filled-out) form (on the same page). 如果我没有禁用cace,那么该表单将不会重定向到我的“确认”(v6 / v7)或“重定向”页面(v8),而只是重新加载(已填写)表单(在同一页)。

So, to bypass this and to make sure that the form actually got submitted and forwarded to the correct confirmation page, I always disabled the cache (Page Properties -> Page -> Behaviour -> Disable cache). 因此,要绕过此过程并确保表单确实已提交并转发到正确的确认页面,我总是禁用缓存(页面属性->页面->行为->禁用缓存)。

In TYPO3 v9 however, this option has been removed, and adding config.no_cache = 1 into that specific page (in a TS template), doesn't seem to do the (same) trick. 但是,在TYPO3 v9中,此选项已被删除,并且在该特定页面中(在TS模板中)添加config.no_cache = 1似乎并没有起到相同的作用。

I would expect that the form, after clicking the submit button, would forward to the confirmation (redirect) page which I configured insde the form itself. 我希望该表单在单击“提交”按钮后,将转发到我配置了insde表单本身的确认(重定向)页面。 That confirmation page isn't usergroup-protected or anything, it's simply a sub-page of the "contact" page (containing the form) itself. 该确认页面不受用户组保护或任何其他内容,仅是“联系”页面(包含表单)本身的子页面。

The actual issue in this case is that you are most likely using some kind of autofill for your fields, eg from Chrome or using a form filler extension. 在这种情况下,实际的问题是您很可能在字段中使用某种自动填充功能,例如从Chrome或使用表单填充扩展名。

This will also fill the honeypot field of your form which then prevents submitting the form. 这也将填写您的表单的蜜罐字段,从而阻止提交表单。

Right now there is nothing you can do about this except voting for the bug in the Chromium issue tracker . 现在,除了投票表决Chromium问题跟踪器中错误外,您无能为力。

As Mathias Brodola righfully points out, this seems to be a problem in Chrome only. 正如Mathias Brodola严格指出的那样,这似乎仅在Chrome中是一个问题。 I found this following plugin - that completely disables autocomplete support for a form - to be helpful in this matter. 我发现以下插件-完全禁用了对表单的自动完成功能-在此问题上很有帮助。 It solved my issue (however, it does completely disable auto-complete support for the form): https://github.com/terrylinooo/jquery.disableAutoFill 它解决了我的问题(但是,它确实完全禁用了对表单的自动完成支持): https : //github.com/terrylinooo/jquery.disableAutoFill

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM