TYPO3 Extension FAL record save failure in BE

355 views Asked by At

When I try to save a record of my extension I get an "Attempt to insert record on page '[root-level]' (0) where this table, sys_file_reference, is not allowed" error.

I can easily save the record if it doesn't contain any file relations (like images).

It worked until I updated my extension yesterday via extension_builder and the TYPO3 Core from 6.2.12 to 6.2.13. Since then I get the error above.

I included 'rootLevel' => -1 to ext_tables.php, as described here.

Maybe it's somehow related to this bug.

Has anyone experienced this kind of behavior?

Thanks for the replies.

1

There are 1 answers

0
Nicholas Brandt On

I "fixed" the problem.

I guess this behavior is intended...

I added the following line to my ext_tables.php:

\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::allowTableOnStandardPages('sys_file_reference');
$TCA['sys_file']['ctrl']['security']['ignoreRootLevelRestriction'] = 1; 
$TCA['sys_file']['ctrl']['rootLevel'] = -1; 
$TCA['sys_file_reference']['ctrl']['security']['ignoreRootLevelRestriction'] = 1; 
$TCA['sys_file_reference']['ctrl']['rootLevel'] = -1; 

I don't know if it's minimalistic or best-practice but at least I can save records now on root level.