Project

General

Profile

Actions

Bug #27922

closed

Extended TCA not loaded by CSC in function render_uploads

Added by Georg Schönweger almost 13 years ago. Updated about 11 years ago.

Status:
Closed
Priority:
Should have
Assignee:
-
Category:
Content Rendering
Target version:
Start date:
2011-07-06
Due date:
% Done:

90%

Estimated time:
TYPO3 Version:
4.5
PHP Version:
5.3
Tags:
Complexity:
Is Regression:
Sprint Focus:

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.


Files

Actions #1

Updated by Chris topher almost 13 years ago

  • Subject changed from extendet TCA not loaded by CSC in function render_uploads to Extended TCA not loaded by CSC in function render_uploads
Actions #2

Updated by Kay Strobach almost 13 years ago

checked current master - i think that is already in? - isn't it? (see line 279 in attachment)

Used following changeset:

commit acfa3ca029f429ac64bfce94c6f535e4c7690fb5
Author: Sebastian Michaelsen <sebastian.....@.....com>
Date:   Mon Jul 11 10:48:40 2011 +0200

    [BUGFIX] t3lib_div::debugRows doesn't return data

Bug should be closed - agree?

Actions #3

Updated by Georg Schönweger almost 13 years ago

no, $GLOBALS['TSFE']->includeTCA(); isn't executed before t3lib_div::loadTCA('tt_content'); in the file attached by you.

Actions #4

Updated by Kay Strobach almost 13 years ago

ok than it just need to be added before line 279
I thought, that $GLOBALS['TSFE']->includeTCA(); is called in t3lib_div::loadTCA('tt_content');

I you agree i would push the change in the reviewsystem for you - if you don't want to do it yourself.

Regards
Kay

[1] http://wiki.typo3.org/Contribution_Walkthrough_with_CommandLine#Contribution_Walkthrough_with_CommandLine.23Setting_up_your_environment

Actions #5

Updated by Georg Schönweger almost 13 years ago

I don't think that includeTCA() is called inside t3lib_div::loadTCA(). In the doc part of function loadTCA it is written "For complete TCA use $GLOBALS['TSFE']->includeTCA() instead."
On the other hand in doc part of function includeTCA it is written "To load full TCA for the table, use t3lib_div::loadTCA($tableName) after calling this function." ... So i'm not sure if both (includeTCA AND loadTCA) have to be called. We discussed that in the dev-mailinglist (http://lists.typo3.org/pipermail/typo3-dev/2011-July/043613.html) and loading both should be the safest way. Maybe the doc parts of the two functions should be changed so that there is no more confusion.

Would be great if you could push the changes, i'm not used to git/gerrit and i'm little bit busy at the moment.

thanks,
Georg

Actions #6

Updated by Mr. Hudson almost 13 years ago

Patch set 1 of change Icd68a4126f5633a4802822556c6e4f608e604f0f has been pushed to the review server.
It is available at http://review.typo3.org/3420

Actions #7

Updated by Björn Pedersen almost 13 years ago

This bug probably tries to address the general problem from the wrong side. I guess, TCA needs a more complete rewrite with caching of the parsed complete TCA. Then, access to the TCA should be easier.

Actions #8

Updated by Oliver Hader over 12 years ago

  • Target version changed from 4.5.4 to 4.5.6
Actions #9

Updated by Chris topher over 12 years ago

  • Target version changed from 4.5.6 to 4.5.8
Actions #10

Updated by Gerrit Code Review over 12 years ago

  • Status changed from New to Under Review

Patch set 2 for branch master has been pushed to the review server.
It is available at http://review.typo3.org/3420

Actions #11

Updated by Ernesto Baschny over 12 years ago

  • Target version changed from 4.5.8 to 4.5.12
Actions #12

Updated by Georg Ringer about 11 years ago

  • Status changed from Under Review to Closed

resolved with #44145

Actions

Also available in: Atom PDF