[英]SaveToDatabase in TYPO3 8
如何在TYPO3 8.7.1中使用表格修整器SaveToDataBase? 我嘗試在YAML中添加修整器,但出現錯誤:
傳遞給TYPO3 \\ CMS \\ Form \\ Domain \\ Finishers \\ SaveToDatabaseFinisher :: process()的參數1必須為整數類型,給定字符串,在第207行的typo3 \\ sysext \\ form \\ Classes \\ Domain \\ Finishers \\ SaveToDatabaseFinisher.php中調用
YAML文件:
renderingOptions:
submitButtonLabel: Submit
type: Form
identifier: form
label: Form
prototypeName: standard
finishers:
-
options:
table: table1
mode: update
whereClause:
uid: '1'
elements:
text-1:
mapOnDatabaseColumn: column1
identifier: SaveToDatabase
renderables:
-
renderingOptions:
previousButtonLabel: 'previous Page'
nextButtonLabel: 'next Page'
type: Page
identifier: page-1
label: Page
renderables:
-
defaultValue: ''
type: Text
identifier: text-1
label: Text
我有相同的TYPO3異常。 嘗試使用-
將選項寫為數組。 這為我解決了問題。
renderingOptions:
submitButtonLabel: Submit
type: Form
identifier: form
label: Form
prototypeName: standard
finishers:
-
options:
-
table: 'table1'
mode: update
whereClause:
uid: '1'
elements:
text-1:
mapOnDatabaseColumn: column1
identifier: SaveToDatabase
renderables:
-
renderingOptions:
previousButtonLabel: 'previous Page'
nextButtonLabel: 'next Page'
type: Page
identifier: page-1
label: Page
renderables:
-
defaultValue: ''
type: Text
identifier: text-1
label: Text
來自typo3 \\ sysext \\ form \\ Classes \\ Domain \\ Finishers \\ SaveToDatabaseFinisher.php的示例
* =======
*
* finishers:
* -
* identifier: SaveToDatabase
* options:
* table: 'fe_users'
* mode: update
* whereClause:
* uid: 1
* databaseColumnMappings:
* pid:
* value: 1
* elements:
* text-1:
* mapOnDatabaseColumn: 'first_name'
* text-2:
* mapOnDatabaseColumn: 'last_name'
* text-3:
* mapOnDatabaseColumn: 'username'
* advancedpassword-1:
* mapOnDatabaseColumn: 'password'
* skipIfValueIsEmpty: true
*
也許我錯過了什么?
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.