Project

General

Profile

Actions

Bug #56851

closed

t3lib_extMgm::isLoaded is TRUE for not existing extension

Added by Franz Holzinger over 10 years ago. Updated almost 10 years ago.

Status:
Closed
Priority:
Could have
Assignee:
-
Category:
-
Target version:
-
Start date:
2014-03-12
Due date:
% Done:

0%

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

Description

The function t3lib_extMgm::isLoaded only checks if the extListArray contains the extension name in the file LocalConfiguration.php.
But if an extension is present in the extListArray and if it does not exist on the filesystem inside of typo3conf/ext, then the result of "t3lib_extMgm::isLoaded" is still TRUE. This is wrong. A not existing extension can never be installed!

It should have checked the file "PackageStates.php" for an entry.

Actions #1

Updated by Georg Ringer over 10 years ago

  • Status changed from New to Needs Feedback

this is already implemented in that way

    static public function isLoaded($key, $exitOnError = FALSE) {
        $isLoaded = static::$packageManager->isPackageActive($key);
        if ($exitOnError && !$isLoaded) {
            throw new \BadFunctionCallException('TYPO3 Fatal Error: Extension "' . $key . '" is not loaded!', 1270853910);
        }
        return $isLoaded;
    }
Actions #2

Updated by Franz Holzinger over 10 years ago

This means that the bug is inside the method "isLoaded static::getLoadedExtensionListArray()".

Test case:
Do not install the extension 'taxajax'.

Enter the check for an installed 'taxajax' anywhere inside of TYPO3 or an extension.

debug ($tmp = t3lib_extMgm::isLoaded('taxajax'), 'taxajax installiert');

Deinstall any taxajax and remove also the taxajax folder from typo3conf/ext .

Open the file LocalConfiguration.php.
Add taxajax to the 'extListArray' => array( ... );

Do not have any entry for taxajax inside of the file PackageStates.php.

Then the function isLoaded will return TRUE. The extension "taxajax" does not exist on the filesystem and it is still reported to be installed. No error message is shown. The file PackageStates should have been searched for the extension.

Actions #3

Updated by Markus Klein over 10 years ago

  • Priority changed from Must have to Could have

Multiple questions:

  1. Is this really about 6.1? You're talking about PackageStates.php which is part of 6.2.
  2. Why are you modifying LocalConfiguration.php manually??
  3. Assuming you meant 6.2: Do not use 'extListArray' anymore.
Actions #4

Updated by Franz Holzinger over 10 years ago

the answers:

1. This is a TYPO3 6.1 website. TYPO3 6.2 has been installed before I had to switch it back to TYPO3 6.1 because of too many bugs in TYPO3 6.2 beta6.
2. I have modified the LocalConfiguration manually because I have seen that there are many extensions under the ExtList which are not present. It is necessary to edit the file LocalConfiguration because it often happens that the TYPO3 backend and install tool are not working.
3. It is a 6.1 website.

Actions #5

Updated by Alexander Opitz over 10 years ago

  • Status changed from Needs Feedback to New
Actions #6

Updated by Markus Klein about 10 years ago

  • Status changed from New to Needs Feedback

Is this still an issue?
The PackageStates.php does not matter (can be deleted) for a 6.1 site

Actions #7

Updated by Alexander Opitz almost 10 years ago

  • Status changed from Needs Feedback to Closed

No feedback within the last 90 days => closing this issue.

If you think that this is the wrong decision or experience this issue again, then please write to the mailing list typo3.teams.bugs with issue number and an explanation or open a new ticket and add a relation to this ticket number.

Actions

Also available in: Atom PDF