madmuffin
madmuffin

Reputation: 993

TYPO3 How to extend existing extensions table definition

I am supposed to extend a TYPO3 Extension that a colleague wrote who is not working with us any longer.

Say we have a collection of animals, like dogs, cats, birds, snakes whatever. Now I need to add a new relation that specifies the animals family, like mammal, bird, reptile.

I figured I have to do the following:

Unfortunately, the table is not created in the database and does not appear in the backend. Can anyone please hint me to what I am missing? (If you believe I did something wrong, I am willing to share my code, right now I have the feeling there is just a step missing - like initializing the new data et.al.)

Thanks in advance.

Upvotes: 0

Views: 954

Answers (2)

madmuffin
madmuffin

Reputation: 993

I was missing a significant step:

In order to have the fields show up in the backoffice, one is required to add them to the TCA array and more specific to the interface sub-array like so:

$GLOBALS['TCA']['tx_mytable']['interface']['showRecordFieldList'] .= ",newfield";
$GLOBALS['TCA']['tx_mytable']['feInterface']['fe_admin_fieldList'] .= ", newfield";

Hope this becomes useful to someone after all...

Upvotes: 0

Stephan
Stephan

Reputation: 161

Seems legit.

After you create/extend all this files, you should go into the install-tool modul. Log in and go in the "Important actions"-Area and run "Compare current database with specification".

You should probably see all your new tables and fields. Select all queries and start them with"Execute"-button.

Let me know if this solve your problem.

Upvotes: 1

Related Questions