File manager not working

Hi there
I get the following error trying to use filemanager (using v2022.10) Projects made with earlier version working fine. Any ideas ??Server error.
Fatal error: Uncaught Error: Class ‘Symfony\Component\EventDispatcher\Event’ not found in /var/www/geriatri.dk/public_html/geriatri/vendor/hkvstore/richfilemanager-php/src/Event/Api/AfterFolderReadEvent.php:11 Stack trace: #0 /var/www/geriatri.dk/public_html/geriatri/vendor/composer/ClassLoader.php(571): include() #1 /var/www/geriatri.dk/public_html/geriatri/vendor/composer/ClassLoader.php(428): Composer\Autoload\includeFile(‘/var/www/geriat…’) #2 [internal function]: Composer\Autoload\ClassLoader->loadClass(‘RFM\Event\Api\A…’) #3 /var/www/geriatri.dk/public_html/geriatri/vendor/hkvstore/richfilemanager-php/src/Api/LocalApi.php(110): spl_autoload_call(‘RFM\Event\Api\A…’) #4 /var/www/geriatri.dk/public_html/geriatri/vendor/hkvstore/richfilemanager-php/src/Application.php(289): RFM\Api\LocalApi->actionReadFolder() #5 /var/www/geriatri.dk/public_html/geriatri/api/filemanager.php(151): RFM\Application->run() #6 {main} thrown in /var/www/geriatri.dk/public_html/geriatri/vendor/hkvstore/richfilemanager-php/src/Event/Api/AfterFolderReadEvent.php on line 11many regardsStig Hansen

stighans wrote:

Fatal error: Uncaught Error: Class ‘Symfony\Component\EventDispatcher\Event’ not found

Make sure you have run Composer Update to download the required Composer packages after enabling Filemanager.

Hi
I already have updated Composer - trying again I get another error-message. :
Fatal error: Uncaught Error: Interface ‘Psr\Http\Message\RequestFactoryInterface’ not found in /var/www/geriatri.dk/public_html/test/vendor/nyholm/psr7/src/Factory/Psr17Factory.php:16 Stack trace: #0 /var/www/geriatri.dk/public_html/test/vendor/composer/ClassLoader.php(571): include() #1 /var/www/geriatri.dk/public_html/test/vendor/composer/ClassLoader.php(428): Composer\Autoload\includeFile(‘/var/www/geriat…’) #2 [internal function]: Composer\Autoload\ClassLoader->loadClass(‘Nyholm\Psr7\Fac…’) #3 [internal function]: spl_autoload_call(‘Nyholm\Psr7\Fac…’) #4 /var/www/geriatri.dk/public_html/test/vendor/slim/slim/Slim/Factory/Psr17/Psr17Factory.php(85): class_exists(‘Nyholm\Psr7\Fac…’) #5 /var/www/geriatri.dk/public_html/test/vendor/slim/slim/Slim/Factory/AppFactory.php(155): Slim\Factory\Psr17\Psr17Factory::isResponseFactoryAvailable() #6 /var/www/geriatri.dk/public_html/test/vendor/slim/slim/Slim/Factory/AppFactory.php(93): Slim\Factory\AppFactory::determineResponseFactory() #7 /var/www/geriatri.dk/public_h in /var/www/geriatri.dk/public_html/test/vendor/nyholm/psr7/src/Factory/Psr17Factory.php on line 16So it obvious that Composer is the problem - I just cannot figure out how to solve it

stighans wrote:

Fatal error: Uncaught Error: Interface ‘Psr\Http\Message\RequestFactoryInterface’ not found

You may simply search “RequestFactoryInterface” in this forum.

Hi
Now I have tried all the suggested solutions but still gets the first error message:
Server error.
Server error.
Fatal error: Uncaught Error: Class ‘Symfony\Component\EventDispatcher\Event’ not found in /var/www/geriatri.dk/public_html/senest/vendor/hkvstore/richfilemanager-php/src/Event/Api/AfterFolderReadEvent.php:11 Stack trace: #0 /var/www/geriatri.dk/public_html/senest/vendor/composer/ClassLoader.php(571): include() #1 /var/www/geriatri.dk/public_html/senest/vendor/composer/ClassLoader.php(428): Composer\Autoload\includeFile(‘/var/www/geriat…’) #2 [internal function]: Composer\Autoload\ClassLoader->loadClass(‘RFM\Event\Api\A…’) #3 /var/www/geriatri.dk/public_html/senest/vendor/hkvstore/richfilemanager-php/src/Api/LocalApi.php(110): spl_autoload_call(‘RFM\Event\Api\A…’) #4 /var/www/geriatri.dk/public_html/senest/vendor/hkvstore/richfilemanager-php/src/Application.php(289): RFM\Api\LocalApi->actionReadFolder() #5 /var/www/geriatri.dk/public_html/senest/api/filemanager.php(151): RFM\Application->run() #6 {main} thrown in /var/www/geriatri.dk/public_html/senest/vendor/hkvstore/richfilemanager-php/src/Event/Api/AfterFolderReadEvent.php on line 11Strange enough is there one project running on the same website without any trouble.As the error says: Uncaught Error: Class ‘Symfony\Component\EventDispatcher\Event’ not found in /vendor/hkvstore/richfilemanager-php/src/Event/Api/AfterFolderReadEvent.php - I had the idea of copying the hkvstore from the working project to the not-working project - but no - same resultUsing v2022.11More ideas anyone ???

You may try to open a command prompt or PowerShell at the project folder and

  • delete composer.json, composer.lock and the “vendor” folder in your project folder
  • run “composer update” manually

Make sure there is no errors from Composer, do not ignore any error message.

Now when updating I get following[RuntimeException]
Could not scan for classes inside “src/UploadHandler.php” which does not appear to be a file nor a folder

I run composer update from the project directory it dont show the error, but when running update from root the error still shows.Likewise there are no errors in PHPMaker when regenerating the project, but the filemanager still doesn’t work ???

  1. Make sure you are checking the correct upload handler. The “\src\UploadHandler.php” is for the PHP web application. File manager uses its own upload handler in the richfilemanager-php package (i.e. \vendor\hkvstore\richfilemanager-php\src\Repository\Local\UploadHandler.php), if you don’t find it, you better delete the vendor folder and run composer update again.
  2. Debug by:
    https://www.hkvforums.com/viewtopic.php?f=18&t=49192
    https://discourse.hkvstore.com/t/check-http-response/3213/1

Thank you for alle suggestions - nothing of them helped, but…Everything is working again. I started all over: Deleted and reinstalled PHP to an older version (7.4) deleted and reinstalled PHPMaker (and let PHPMaker make the installation of Composer)
and after a bit of trouble with the ext-intl in php.ini everything was working without any errors !!