I've created two input fields and a dropdown menu in the typo3 backend. When I click the save button I get the error message:
Doctrine\DBAL\Exception\InvalidFieldNameException
An exception occurred while executing 'SELECT `inputfield1` FROM `tt_content` WHERE `uid` = ?' with params [1]: Unknown column 'inputfield1' in 'field list'
In my ext_tables.sql I created the table with the following sql statement:
CREATE TABLE tt_content (
inputfield1 varchar(255) DEFAULT '' NOT NULL,
inputfield2 varchar(255) DEFAULT '' NOT NULL,
ddOne varchar(255) DEFAULT '' NOT NULL
);
In Configuraion/TCA&Overrides/tt_content.php I created the three fields:
\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addTCAcolumns('tt_content', array(
'inputfield1' => array(
'label' => 'Saschas Test',
'exclude' => 1,
'config' => array(
'type' => 'input',
'max' => 255,
'eval' => 'trim,nospace'
),
),
'inputfield2' => array(
'label' => 'Noch ein Test',
'exclude' => 1,
'config' => array(
'type' => 'input',
'max' => 255,
'eval' => 'trim,nospace'
),
),
'ddOne' => array(
'label' =>'My dropdownMenu',
'exclude' => 1,
'renderType' => 'selectSingle',
'config' => array(
'type' => 'select',
'items' => [
['Author Jahr Titel'],
['Titel Author Jahr'],
['Jahr Titel Author']
]
)
)
)
Why does the mapping to the table tt_content not work here? Thanks in advance.