Project

General

Profile

Bug #90732 ยป stacktrace_FileIndexRepositry_construct_error.txt

Christian Richter, 2020-03-11 13:52

 

Whoops, looks like something went wrong.
(1/1) ArgumentCountError

Too few arguments to function TYPO3\CMS\Core\Resource\Index\FileIndexRepository::__construct(), 0 passed in /var/www/html/app/public/typo3/sysext/core/Classes/Utility/GeneralUtility.php on line 3452 and exactly 1 expected
in /var/www/html/app/public/typo3/sysext/core/Classes/Resource/Index/FileIndexRepository.php line 85

{
return GeneralUtility::makeInstance(self::class);
}

public function __construct(EventDispatcherInterface $eventDispatcher)
{
$this->eventDispatcher = $eventDispatcher;
}

at TYPO3\CMS\Core\Resource\Index\FileIndexRepository->__construct()
in /var/www/html/app/public/typo3/sysext/core/Classes/Utility/GeneralUtility.php line 3452

return self::$container->get($className);
}

// Create new instance and call constructor with parameters
$instance = new $finalClassName(...$constructorArguments);
// Register new singleton instance, but only if it is not a known PSR-11 container service
if ($instance instanceof SingletonInterface && !(self::$container !== null && self::$container->has($className))) {
self::$singletonInstances[$finalClassName] = $instance;
}

at TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance('TYPO3\\CMS\\Core\\Resource\\Index\\FileIndexRepository')
in /var/www/html/app/public/typo3/sysext/core/Classes/Resource/Index/FileIndexRepository.php line 82

* @return FileIndexRepository
*/
public static function getInstance()
{
return GeneralUtility::makeInstance(self::class);
}

public function __construct(EventDispatcherInterface $eventDispatcher)
{

at TYPO3\CMS\Core\Resource\Index\FileIndexRepository::getInstance()
in /var/www/html/app/public/typo3/sysext/core/Classes/Resource/ResourceFactory.php line 669

* @return FileIndexRepository
*/
protected function getFileIndexRepository()
{
return FileIndexRepository::getInstance();
}

/**
* Returns an instance of the ProcessedFileRepository

at TYPO3\CMS\Core\Resource\ResourceFactory->getFileIndexRepository(object(TYPO3\CMS\Core\EventDispatcher\EventDispatcher))
in /var/www/html/app/public/typo3/sysext/core/Classes/Resource/ResourceFactory.php line 367

if (empty($this->fileInstances[$uid])) {
// Fetches data in case $fileData is empty
if (empty($fileData)) {
if($uid == 2189){
\TYPO3\CMS\Extbase\Utility\DebuggerUtility::var_dump($this->getFileIndexRepository($this->eventDispatcher), "$this->getFileIndexRepository()");
die();
}
$fileData = $this->getFileIndexRepository()->findOneByUid($uid);

at TYPO3\CMS\Core\Resource\ResourceFactory->getFileObject(2189)
in /var/www/html/app/public/typo3/sysext/core/Classes/Resource/ProcessedFileRepository.php line 87

* @return ProcessedFile
*/
protected function createDomainObject(array $databaseRow)
{
$originalFile = $this->factory->getFileObject((int)$databaseRow['original']);
$originalFile->setStorage($this->factory->getStorageObject($originalFile->getProperty('storage')));
$taskType = $databaseRow['task_type'];
$configuration = unserialize($databaseRow['configuration']);

at TYPO3\CMS\Core\Resource\ProcessedFileRepository->createDomainObject(array('uid' => 30419, 'tstamp' => 1579085338, 'crdate' => 1579085338, 'storage' => 2, 'original' => 2189, 'identifier' => '/_processed_/0/0/csm_1988_89_3264a03ede.jpg', 'name' => 'csm_1988_89_3264a03ede.jpg', 'configuration' => 'a:7:{s:5:"width";N;s:6:"height";N;s:8:"minWidth";N;s:9:"minHeight";N;s:8:"maxWidth";i:300;s:9:"maxHeight";i:600;s:4:"crop";N;}', 'configurationsha1' => '057fd844c8cbef546f41236b30eabcb0f28caf90', 'originalfilesha1' => '4ee472217c755bb8f185b92fdba3acffd071fa2a', 'task_type' => 'Image.CropScaleMask', 'checksum' => '3264a03ede', 'width' => 300, 'height' => 427))
in /var/www/html/app/public/typo3/sysext/core/Classes/Resource/ProcessedFileRepository.php line 308

if ($storageUid && (int)$storageUid !== (int)$row['storage']) {
continue;
}
try {
$file = $this->createDomainObject($row);
$file->getStorage()->setEvaluatePermissions(false);
$file->delete(true);
} catch (\Exception $e) {
$this->logger->error(

at TYPO3\CMS\Core\Resource\ProcessedFileRepository->removeAll(2)
in /var/www/html/app/public/typo3/sysext/install/Classes/Service/Typo3tempFileService.php line 113

*/
public function clearProcessedFiles(int $storageUid): int
{
$repository = GeneralUtility::makeInstance(ProcessedFileRepository::class);
return $repository->removeAll($storageUid);
}

/**
* Clears files and folders in a typo3temp/assets/ folder (not _processed_!)

at TYPO3\CMS\Install\Service\Typo3tempFileService->clearProcessedFiles(2)
in /var/www/html/app/public/typo3/sysext/install/Classes/Controller/MaintenanceController.php line 128

$typo3tempFileService->clearAssetsFolder($folder);
$messageQueue->enqueue(new FlashMessage('Cleared files in "' . $folder . '" folder'));
} else {
$storageUid = (int)$storageUid;
$failedDeletions = $typo3tempFileService->clearProcessedFiles($storageUid);
if ($failedDeletions) {
$messageQueue->enqueue(new FlashMessage(
'Failed to delete ' . $failedDeletions . ' processed files. See TYPO3 log (by default typo3temp/var/log/typo3_*.log)',
'',

at TYPO3\CMS\Install\Controller\MaintenanceController->clearTypo3tempFilesAction(object(TYPO3\CMS\Core\Http\ServerRequest))
in /var/www/html/app/public/typo3/sysext/install/Classes/Middleware/Maintenance.php line 224

'Unknown action method ' . $action . ' in controller ' . $controllerName,
1505216027
);
}
$response = $controller->$action($request);
}

return $response;
}

at TYPO3\CMS\Install\Middleware\Maintenance->process(object(TYPO3\CMS\Core\Http\ServerRequest), object(class@anonymous/var/www/html/app/public/typo3/sysext/core/Classes/Http/MiddlewareDispatcher.php0x7fd1783962b2))
in /var/www/html/app/public/typo3/sysext/core/Classes/Http/MiddlewareDispatcher.php line 113

}

public function handle(ServerRequestInterface $request): ResponseInterface
{
return $this->middleware->process($request, $this->next);
}
};
}

at class@anonymous/var/www/html/app/public/typo3/sysext/core/Classes/Http/MiddlewareDispatcher.php0x7fd178395c82->handle(object(TYPO3\CMS\Core\Http\ServerRequest))
in /var/www/html/app/public/typo3/sysext/core/Classes/Middleware/NormalizedParamsAttribute.php line 43

*/
public function process(ServerRequestInterface $request, RequestHandlerInterface $handler): ResponseInterface
{
$request = $request->withAttribute('normalizedParams', NormalizedParams::createFromRequest($request));
return $handler->handle($request);
}
}

at TYPO3\CMS\Core\Middleware\NormalizedParamsAttribute->process(object(TYPO3\CMS\Core\Http\ServerRequest), object(class@anonymous/var/www/html/app/public/typo3/sysext/core/Classes/Http/MiddlewareDispatcher.php0x7fd178395c82))
in /var/www/html/app/public/typo3/sysext/core/Classes/Http/MiddlewareDispatcher.php line 153


if (!$middleware instanceof MiddlewareInterface) {
throw new \InvalidArgumentException(get_class($middleware) . ' does not implement ' . MiddlewareInterface::class, 1516821342);
}
return $middleware->process($request, $this->next);
}
};
}
}

at class@anonymous/var/www/html/app/public/typo3/sysext/core/Classes/Http/MiddlewareDispatcher.php0x7fd1783962b2->handle(object(TYPO3\CMS\Core\Http\ServerRequest))
in /var/www/html/app/public/typo3/sysext/core/Classes/Http/MiddlewareDispatcher.php line 76

* @return ResponseInterface
*/
public function handle(ServerRequestInterface $request): ResponseInterface
{
return $this->tip->handle($request);
}

/**
* Seed the middleware stack with the inner request handler

at TYPO3\CMS\Core\Http\MiddlewareDispatcher->handle(object(TYPO3\CMS\Core\Http\ServerRequest))
in /var/www/html/app/public/typo3/sysext/core/Classes/Http/AbstractApplication.php line 83

* @return ResponseInterface
*/
protected function handle(ServerRequestInterface $request): ResponseInterface
{
return $this->requestHandler->handle($request);
}

/**
* Set up the application and shut it down afterwards

at TYPO3\CMS\Core\Http\AbstractApplication->handle(object(TYPO3\CMS\Core\Http\ServerRequest))
in /var/www/html/app/public/typo3/sysext/install/Classes/Http/Application.php line 49


protected function handle(ServerRequestInterface $request): ResponseInterface
{
$this->initializeContext();
return parent::handle($request);
}

/**
* Initializes the Context used for accessing data and finding out the current state of the application

at TYPO3\CMS\Install\Http\Application->handle(object(TYPO3\CMS\Core\Http\ServerRequest))
in /var/www/html/app/public/typo3/sysext/core/Classes/Http/AbstractApplication.php line 95

final public function run(callable $execute = null)
{
try {
$response = $this->handle(
\TYPO3\CMS\Core\Http\ServerRequestFactory::fromGlobals()
);
if ($execute !== null) {
call_user_func($execute);
}

at TYPO3\CMS\Core\Http\AbstractApplication->run()
in /var/www/html/app/public/typo3/install.php line 104


call_user_func(function () {
$classLoader = require dirname(dirname(__DIR__)).'/vendor/autoload.php';
\TYPO3\CMS\Core\Core\SystemEnvironmentBuilder::run(1, \TYPO3\CMS\Core\Core\SystemEnvironmentBuilder::REQUESTTYPE_INSTALL);
\TYPO3\CMS\Core\Core\Bootstrap::init($classLoader, true)->get(\TYPO3\CMS\Install\Http\Application::class)->run();
});

at {closure}()
in /var/www/html/app/public/typo3/install.php line 105

call_user_func(function () {
$classLoader = require dirname(dirname(__DIR__)).'/vendor/autoload.php';
\TYPO3\CMS\Core\Core\SystemEnvironmentBuilder::run(1, \TYPO3\CMS\Core\Core\SystemEnvironmentBuilder::REQUESTTYPE_INSTALL);
\TYPO3\CMS\Core\Core\Bootstrap::init($classLoader, true)->get(\TYPO3\CMS\Install\Http\Application::class)->run();
});

    (1-1/1)