[BUGFIX] Throw Exception if typo3 extension repository is not defined 28/19628/4
authorSascha Egerer <sascha.egerer@dkd.de>
Fri, 5 Apr 2013 20:20:17 +0000 (22:20 +0200)
committerChristian Kuhn <lolli@schwarzbu.ch>
Fri, 5 Apr 2013 20:49:52 +0000 (22:49 +0200)
When there is no repository with id 1 is defined
in tx_extensionmanager_domain_model_extension you get an exception if
you try to update the extension list

Resolves: #42849
Releases: 6.1, 6.0
Change-Id: Ia60aa2227ab3a801c9002d821295c6eb01043e3f
Reviewed-on: https://review.typo3.org/19628
Reviewed-by: Nicole Cordes
Tested-by: Nicole Cordes
Reviewed-by: Sascha Egerer
Tested-by: Sascha Egerer
Reviewed-by: Anja Leichsenring
Tested-by: Anja Leichsenring
Reviewed-by: Christian Kuhn
Tested-by: Christian Kuhn

index 1e8551e..580586c 100644 (file)
@@ -83,9 +83,12 @@ class Helper implements \TYPO3\CMS\Core\SingletonInterface {
                $repositoryRepository = $this->objectManager->get('TYPO3\\CMS\\Extensionmanager\\Domain\\Repository\\RepositoryRepository');
                $this->extensionRepository = $this->objectManager->get('TYPO3\\CMS\\Extensionmanager\\Domain\\Repository\\ExtensionRepository');
                $repository = $repositoryRepository->findByUid(1);
-               if (is_object($repository)) {
-                       $this->setRepository($repository);
+               if(!is_object($repository)) {
+                       throw new \TYPO3\CMS\Extensionmanager\Exception\ExtensionManagerException('The typo3.org extension repository was not found. Please go to the "Update Wizard" in the install tool and run the task "Add the default Extension Manager database tables".', 1365192900);
+               $this->setRepository($repository);
index 66a5602..a70083e 100644 (file)
                        <trans-unit id="report.status.mainRepository.notFound.message" xml:space="preserve">
-                               <source>The typo3.org extension repository was not found. Please import the main typo3.org extension repository in the install tool wizard.</source>
+                               <source>The typo3.org extension repository was not found. Please go to the "Update Wizard" in the install tool and run the task "Add the default Extension Manager database tables".</source>
                        <trans-unit id="report.status.mainRepository.notUpToDate.value" xml:space="preserve">
                                <source>Extension list is not up to date!</source>