Project

General

Profile

Actions

Bug #51061

closed

Extension manager uninstall extension when suggestions are not installed

Added by Matthias Toscanelli over 11 years ago. Updated about 10 years ago.

Status:
Closed
Priority:
Should have
Assignee:
-
Category:
Extension Manager
Target version:
-
Start date:
2013-08-13
Due date:
% Done:

0%

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

Description

When an extension is updated from TER or uploaded file and some suggestions are defined but not installed, extensions manager remove it.

This is defined on line 669 in file typo3/sysext/em/classes/install/class.tx_em_install.php :

} elseif ($this->parentObject instanceof tx_em_Connection_ExtDirectServer) {
        // with ExtDirect, we are in a context, where we cannot ask the user for feedback
        // thus we silently uninstall the newly uploaded extension
        $this->parentObject->disableExtension($extKey);
}

  • One big problem with this is that if an extension depends on the updated extension, the manager can't handle it and trow this exception:
    PHP Fatal error:  Call to a member function section() on a non-object in typo3/sysext/em/classes/extensions/class.tx_em_extensions_list.php on line 922, referer: http://typo3package.localhost/typo3/mod.php?M=tools_em
    

    (This is a bug that has been closed because "Fixing this in 4.5 is IMO not needed") [[http://forge.typo3.org/issues/37905]]
  • The second problem is that this extension is certainly used to render some content on website and will no render it until we re-install it.
  • The third problem (not fully verified) is that it seems that static templates from the extension are removed from inclusion on uninstallation, so after re-installing it we have to set back all inclusions.

If we refer to documentation, suggestions are not required: [[http://docs.typo3.org/typo3cms/CoreApiReference/ExtensionArchitecture/DeclarationFile/Index.html]] (Section constraints)
So there is no reason to remove an extension that have his suggestions not installed.

I checked it on version 6.x and it seems the problem still exists, because "suggests" is defined as dependency and is handle as "depends" or "conflicts".

typo3/sysext/extensionmanager/Classes/Domain/Model/Dependency.php

Actions

Also available in: Atom PDF