netzding
netzding

Reputation: 777

TYPO3 MASK missing TCA entry after adding mask-element

I have a working site with TYPO3 7.6.31, the extension mask 2.1.1, and many already working mask-elements for custom content.

I've tried to add a new mask element containing a repeat-element (also tried content-element and some others) (already in use) filled with two textfields.

The second I save the new content element it says "successfully added..." And I can go back to the element overview where I can also find my newly created one. Once I, for example, hit the landing page everything related to the mask extension throws nasty errors.

After checking the logs I got this error message:

[ALERT] request="x" component="TYPO3.CMS.Frontend.ContentObject.Exception.ProductionExceptionHandler": Oops, an error occurred! Code: 201906251014509abc80c7 - {"exception":"InvalidArgumentException: There is no entry in the $TCA array for the table \"tx_mask_ytfieldkey\". This means that the function enableFields() is called with an invalid table name as an argument. in \/data\/typo3relaunch\/typo3_src-7.6.31\/typo3\/sysext\/frontend\/Classes\/Page\/PageRepository.php:1203

I logged into the MySQL client and checked the table, the table already exists with all its needed structure without any database updates - so I guess mask handles that internally - that's good but now I'm stuck with a missing TCA entry for that table and do not know where to place it - shouldn't that be handled by mask too?

I'm stuck and can't create new content elements now because of that - any ideas how I can fix that or where I could place that TCA entry for the table?

the check in the PageRepository looks like this:

if (isset($GLOBALS['TCA'][$table]) && is_array($GLOBALS['TCA'][$table]) && $uid > 0) {

So the entry for that table is really just completely missing

The mask extension should handle the TCA entries for content elements right here: (mask/ext_tables.php)

$tcaCodeGenerator = \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance('MASK\\Mask\\CodeGenerator\\TcaCodeGenerator');

// Generate TCA for Content-Elements
$contentColumns = $tcaCodeGenerator->generateFieldsTca($configuration["tt_content"]["tca"]);
\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addTCAcolumns('tt_content', $contentColumns);
$tcaCodeGenerator->setElementsTca($configuration["tt_content"]["elements"]);

// Generate TCA for Pages
$pagesColumns = $tcaCodeGenerator->generateFieldsTca($configuration["pages"]["tca"]);
\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addTCAcolumns('pages', $pagesColumns);
\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addTCAcolumns('pages_language_overlay', $pagesColumns);
$tcaCodeGenerator->setPageTca($configuration["pages"]["tca"]);

// Generate TCA for Inline-Fields
$tcaCodeGenerator->setInlineTca($configuration);

So I guess I do not have to do anything manually in that process.

Upvotes: 0

Views: 755

Answers (0)

Related Questions