Hallo,
ich habe jetzt eine Contao-Installation, bei der das Löschen von der contao-manager.phar.php und das Löschen des contao-manager Ordner den Fehler nicht behebt.
Contao Version: 4.9.7
PHP: 7.4
Managed Server bei Hetzner
Beim Self-Update des Contao Managers von 1.3.0 auf 1.3.3 kommt ein "Error 200 - Unerwarteter API-Status" mit folgendem Code:
Code:
) Contao Association
*
* @license LGPL-3.0-or-later
*/
namespace Contao\ManagerApi\HttpKernel;
use Contao\ManagerApi\Exception\ApiProblemException;
use Crell\ApiProblem\ApiProblem;
use Crell\ApiProblem\JsonException;
use Symfony\Component\HttpFoundation\Response;
use Symfony\Component\HttpKernel\Exception\HttpExceptionInterface;
class ApiProblemResponse extends Response
{
/**
* Constructor.
*/
public function __construct(ApiProblem $problem, array $headers = [])
{
if (!$problem->getStatus()) {
$problem->setStatus(500);
}
if (!$problem->getTitle()) {
$code = $problem->getStatus();
$problem->setTitle(isset(Response::$statusTexts[$code]) ? Response::$statusTexts[$code] : 'unknown status');
}
try {
$content = $problem->asJson();
} catch (JsonException $exception) {
$problem = new ApiProblem($exception->getMessage());
$content = $problem->asJson();
}
parent::__construct(
$content,
$problem->getStatus(),
array_merge($headers, ['Content-Type' => 'application/problem+json'])
);
}
/**
* Creates a ApiProblemResponse from exception.
*/
public static function createFromException(\Throwable $exception, bool $debug = false): self
{
$headers = [];
if ($exception instanceof ApiProblemException) {
$problem = $exception->getApiProblem();
} else {
$problem = new ApiProblem($exception->getMessage());
if ($exception instanceof HttpExceptionInterface) {
$problem->setStatus($exception->getStatusCode());
}
if ($debug) {
$problem['debug'] = $exception->getTraceAsString();
}
}
if ($exception instanceof HttpExceptionInterface) {
$headers = $exception->getHeaders();
}
return new static($problem, $headers);
}
}
ate static $checkedClasses = [];
private static $final = [];
private static $finalMethods = [];
private static $deprecated = [];
private static $internal = [];
private static $internalMethods = [];
private static $annotatedParameters = [];
private static $darwinCache = ['/' => ['/', []]];
private static $method = [];
private static $returnTypes = [];
private static $methodTraits = [];
private static $fileOffsets = [];
public function __construct(callable $classLoader)
{
$this->classLoader = $classLoader;
$this->isFinder = \is_array($classLoader) && method_exists($classLoader[0], 'findFile');
parse_str(getenv('SYMFONY_PATCH_TYPE_DECLARATIONS') ?: '', $this->patchTypes);
$this->patchTypes += [
'force' => null,
'php' => null,
'deprecations' => false,
];
if (!isset(self::$caseCheck)) {
$file = file_exists(__FILE__) ? __FILE__ : rtrim(realpath('.'), \DIRECTORY_SEPARATOR);
$i = strrpos($file, \DIRECTORY_SEPARATOR);
$dir = substr($file, 0, 1 + $i);
$file = substr($file, 1 + $i);
$test = strtoupper($file) === $file ? strtolower($file) : strtoupper($file);
$test = realpath($dir.$test);
if (false === $test || false === $i) {
// filesystem is case sensitive
self::$caseCheck = 0;
} elseif (substr($test, -\strlen($file)) === $file) {
// filesystem is case insensitive and realpath() normalizes the case of characters
self::$caseCheck = 1;
} elseif (false !== stripos(\PHP_OS, 'darwin')) {
// on MacOSX, HFS+ is case insensitive but realpath() doesn't normalize the case of characters
self::$caseCheck = 2;
} else {
// filesystem case checks failed, fallback to disabling them
self::$caseCheck = 0;
}
}
}
/**
* Gets the wrapped class loader.
*
* @return callable The wrapped class loader
*/
public function getClassLoader(): callable
{
return $this->classLoader;
}
/**
* Wraps all autoloaders.
*/
public static function enable(): void
{
// Ensures we don't hit https://bugs.php.net/42098
class_exists('Symfony\Component\ErrorHandler\ErrorHandler');
class_exists('Psr\Log\LogLevel');
if (!\is_array($functions = spl_autoload_functions())) {
return;
}
foreach ($functions as $function) {
spl_autoload_unregister($function);
}
foreach ($functions as $function) {
if (!\is_array($function) || !$function[0] instanceof self) {
$function = [new
Ich habe dann die contao.manager.phar.php im Webverzeichnis gelöscht, auf contao.org. die phar neu runtergeladen. Der Fehler blieb. Verzeichnis contao-manager löschen hat auch nichts gebracht.
composer.json sieht so aus:
Code:
{
"type": "project",
"require": {
"contao-bootstrap/bundle": "^2.1",
"contao/calendar-bundle": "4.9.*",
"contao/comments-bundle": "4.9.*",
"contao/conflicts": "*@dev",
"contao/faq-bundle": "4.9.*",
"contao/listing-bundle": "4.9.*",
"contao/manager-bundle": "4.9.*",
"contao/news-bundle": "4.9.*",
"contao/newsletter-bundle": "4.9.*"
},
"extra": {
"contao-component-dir": "assets"
},
"scripts": {
"post-install-cmd": [
"Contao\\ManagerBundle\\Composer\\ScriptHandler::initializeApplication"
],
"post-update-cmd": [
"Contao\\ManagerBundle\\Composer\\ScriptHandler::initializeApplication"
]
}
}
Wie kriege ich den Manager wieder zum Laufen?
Danke und Gruß
Mathias
Lesezeichen