Bug #47993

Possible 6.1 TCA load regression if calling includeTCA() in eid context

Added by Christian Kuhn about 2 years ago. Updated about 2 years ago.

Status:Resolved Start date:2013-05-06
Priority:Should have Due date:
Assigned To:- % Done:

100%

Category:- Spent time: -
Target version:-
TYPO3 Version:6.1 Is Regression:
PHP Version:5.3 Sprint Focus:
Complexity:medium

Description

Index: typo3/sysext/frontend/Classes/Controller/TypoScriptFrontendController.php
===================================================================
--- typo3/sysext/frontend/Classes/Controller/TypoScriptFrontendController.php    (revision 709)
+++ typo3/sysext/frontend/Classes/Controller/TypoScriptFrontendController.php    (working copy)
@@ -2459,6 +2459,9 @@
     public function includeTCA($TCAloaded = 1) {
         // Full TCA is always loaded during bootstrap in FE, this method is obsolete.
         \TYPO3\CMS\Core\Utility\GeneralUtility::logDeprecatedFunction();
+        if (!is_array($GLOBALS['TCA']) || !isset($GLOBALS['TCA']['pages'])) {
+            \TYPO3\CMS\Core\Core\Bootstrap::getInstance()->loadCachedTca();
+        }
     }

     /**

Associated revisions

Revision 8a78029c
Added by Christian Kuhn about 2 years ago

[BUGFIX] TCA load regression in eid context

TCA refactoring in 6.1 misses an edge case:
Frontend index_ts loads TCA after eid is handled, so there is
no TCA loaded in eid context. Eid scripts that still need
TCA should call EidUtility::initTCA(), but some call instead
TSFE->includeTCA(). But includeTCA() is empty now and deprecated.

The patch adds a call to includeTCA() to load TCA, if
GLOBALS['TCA'] array is empty. This makes sure populating TCA
is done only once.

ext:caretaker_instance is affected by this, eg. test "Check
backend user accounts" needs TCA and fails without the patch.

Change-Id: Iaa70fe62e0eba9981e31379b853c968efe1d4cca
Resolves: #47993
Releases: 6.2, 6.1
Reviewed-on: https://review.typo3.org/20554
Reviewed-by: Markus Klein
Reviewed-by: Alexander Opitz
Reviewed-by: Stefan Neufeind
Tested-by: Alexander Opitz
Reviewed-by: Felix Kopp
Reviewed-by: Dmitry Dulepov
Tested-by: Markus Klein

Revision c2ddc758
Added by Christian Kuhn about 2 years ago

[BUGFIX] TCA load regression in eid context

TCA refactoring in 6.1 misses an edge case:
Frontend index_ts loads TCA after eid is handled, so there is
no TCA loaded in eid context. Eid scripts that still need
TCA should call EidUtility::initTCA(), but some call instead
TSFE->includeTCA(). But includeTCA() is empty now and deprecated.

The patch adds a call to includeTCA() to load TCA, if
GLOBALS['TCA'] array is empty. This makes sure populating TCA
is done only once.

ext:caretaker_instance is affected by this, eg. test "Check
backend user accounts" needs TCA and fails without the patch.

Change-Id: Iaa70fe62e0eba9981e31379b853c968efe1d4cca
Resolves: #47993
Releases: 6.2, 6.1
Reviewed-on: https://review.typo3.org/20932
Reviewed-by: Markus Klein
Tested-by: Markus Klein

History

#1 Updated by Gerrit Code Review about 2 years ago

  • Status changed from New to Under Review

Patch set 1 for branch master has been pushed to the review server.
It is available at https://review.typo3.org/20554

#2 Updated by Gerrit Code Review about 2 years ago

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

#3 Updated by Gerrit Code Review about 2 years ago

Patch set 3 for branch master has been pushed to the review server.
It is available at https://review.typo3.org/20554

#4 Updated by Gerrit Code Review about 2 years ago

Patch set 1 for branch TYPO3_6-1 has been pushed to the review server.
It is available at https://review.typo3.org/20932

#5 Updated by Christian Kuhn about 2 years ago

  • Status changed from Under Review to Resolved
  • % Done changed from 0 to 100

Also available in: Atom PDF