Project

General

Profile

Actions

Bug #50803

closed

Fatal error: "enableFields on non-object" in extension manager

Added by Ernesto Baschny over 11 years ago. Updated about 6 years ago.

Status:
Closed
Priority:
Should have
Category:
File Abstraction Layer (FAL)
Target version:
Start date:
2013-08-05
Due date:
% Done:

100%

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

Description

Extbase extensions might fail with:

Fatal error: Call to a member function enableFields() on a non-object in .../typo3_src/typo3/sysext/core/Classes/Resource/StorageRepository.php on line 211

The problem was "uncovered" with the #45498 (the new EM fatals with this error since this patch), but could happen in other situations too.

Reason is that Extbase in certain situations will try to create a dummy simulated "TSFE" object to be able to use cObject stdWrap's in the backend context.

Now this is not a "complete TSFE" and doesn't for example include a proper sys_page property.

So to make sure we are in a proper FE context, we shouldn't rely on "is_object($TSFE)" but instead check if TYPO3_MODE==FE like it is done throughout other places in the core.


Related issues 1 (0 open1 closed)

Related to TYPO3 Core - Bug #50809: Failing test StorageRepositoryTest::getWhereClauseForEnabledFieldsCallsSysPageForDeletedFlagInFrontendClosedAnja Leichsenring2013-08-06

Actions
Actions

Also available in: Atom PDF