Bug #87503

Epic #83968: PSR-11 Initiative

ErrorPageController relies on an available PackageManager

Added by Benjamin Franzke 8 months ago. Updated 2 months ago.

Status:
Closed
Priority:
Should have
Assignee:
-
Category:
System/Bootstrap/Configuration
Start date:
2019-01-21
Due date:
% Done:

100%

TYPO3 Version:
9
PHP Version:
Tags:
Complexity:
Is Regression:
Sprint Focus:

Description

When the ProductionExceptionHandler is used and an exception occures before the PackageManager has been initialized, the method ExtensionManagementUtility::extPath() can not be used, as it relies on the PackageManager to retrieve a packages path.
As ErrorPageController needs to be able to handle exception during early bootstrap it should bypass ExtensionManagementUtility/PackageManager to be always able to retrieve paths for required core extensions like core and backend.


Related issues

Related to TYPO3 Core - Bug #87175: activating SEO or Redirects core extension breaks the system Closed 2018-12-16

Associated revisions

Revision 90305f1b (diff)
Added by Benjamin Franzke 8 months ago

[BUGFIX] Prevent exception in early bootstrap exception handler

ErrorPageController which is used by the ProductionExceptionHandler
must not rely on PackageManager to be available. Rather use
paths derived from Environment::getFrameworkBasePath().

Releases: master, 9.5
Resolves: #87503
Related: #87175
Change-Id: I556b503e06962b338ec11f2e031eb941417d5944
Reviewed-on: https://review.typo3.org/59507
Tested-by: TYPO3com <>
Reviewed-by: Benni Mack <>
Tested-by: Benni Mack <>
Reviewed-by: Georg Ringer <>
Tested-by: Georg Ringer <>

Revision 1738a8cf (diff)
Added by Benjamin Franzke 8 months ago

[BUGFIX] Prevent exception in early bootstrap exception handler

ErrorPageController which is used by the ProductionExceptionHandler
must not rely on PackageManager to be available. Rather use
paths derived from Environment::getFrameworkBasePath().

Releases: master, 9.5
Resolves: #87503
Related: #87175
Change-Id: I556b503e06962b338ec11f2e031eb941417d5944
Reviewed-on: https://review.typo3.org/59518
Tested-by: TYPO3com <>
Reviewed-by: Benni Mack <>
Tested-by: Benni Mack <>

History

#1 Updated by Benjamin Franzke 8 months ago

  • Related to Bug #87175: activating SEO or Redirects core extension breaks the system added

#2 Updated by Gerrit Code Review 8 months ago

  • Status changed from New to Under Review

Patch set 1 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/59507

#3 Updated by Gerrit Code Review 8 months ago

Patch set 1 for branch 9.5 of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/59518

#4 Updated by Benjamin Franzke 8 months ago

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

#5 Updated by Ronald Wopereis 8 months ago

I get the error when a syntax error occurs in typo3conf/PackageStates.php

After adding couple of lines i could see that packageManager is EMPTY for key 'core'

Debug:
/usr/share/typo3/typo3_src-9.5.3/typo3/sysext/core/Classes/Utility/ExtensionManagementUtility.php
added three lines at beginning of public static function extPath($key, $script = '')

if (empty(static::$packageManager)) {
throw new \BadFunctionCallException('TYPO3 Fatal Error: packageManager is EMPTY for key '.$key, 1234567890);
}

#6 Updated by Benni Mack 5 months ago

  • Status changed from Resolved to Closed

#7 Updated by Benjamin Franzke 2 months ago

  • Parent task set to #83968

Also available in: Atom PDF