Issue Bug Closed

#27922Extended TCA not loaded by CSC in function render_uploads

Georg Schönweger 07/06/11, 18:29 updated 02/07/13, 18:57

Description

Bug:
css_styled_content doesn’t call $GLOBALS[‘TSFE’]->includeTCA() before running t3lib_div::loadTCA(‘tt_content’). Thus only the default tt_content TCA definitions are loaded. Any extensions extending tt_content TCA is ignored.

Background:
Consider you want to secure “File Links” content elements (jumpurl_secure). By default all files inserted in “media” field of “File Links” CE are copied to “uploads/media”. Denying access to this folder can lead to problems. A solution could be to extend tt_content TCA and use a new field “my_field” ONLY for “File Links” CE with a separate uploadfolder. This uploadfolder can then be protected e.g. by a .htaccess file.
Currently it is not possible to do this because the extended TCA is not loaded by CSC!

Side effects:
This will add some performance penalty to it, because it will load the TCA for “every” extension. Which is fine, because any extension might want to add additional fields for tt_content.

Reviews 1