Error 500 Internal Server Error

GET https://da.wdemo.net/media/1988/download/_DSC3271%20copia%20%28Copy%29.jpg?v=1

Exceptions

The file "/srv/www/dev.www/httpdocs/media/uploads/02/dsc3271-copia-copy.jpg" does not exist

Exception

Symfony\Component\HttpFoundation\File\Exception\ FileNotFoundException

  1.      * @throws FileNotFoundException If the given path is not a file
  2.      */
  3.     public function __construct(string $pathbool $checkPath true)
  4.     {
  5.         if ($checkPath && !is_file($path)) {
  6.             throw new FileNotFoundException($path);
  7.         }
  8.         parent::__construct($path);
  9.     }
  1.     {
  2.         if (!$file instanceof File) {
  3.             if ($file instanceof \SplFileInfo) {
  4.                 $file = new File($file->getPathname());
  5.             } else {
  6.                 $file = new File((string) $file);
  7.             }
  8.         }
  9.         if (!$file->isReadable()) {
  10.             throw new FileException('File must be readable.');
  1.      */
  2.     public function __construct(\SplFileInfo|string $fileint $status 200, array $headers = [], bool $public true, ?string $contentDisposition nullbool $autoEtag falsebool $autoLastModified true)
  3.     {
  4.         parent::__construct(null$status$headers);
  5.         $this->setFile($file$contentDisposition$autoEtag$autoLastModified);
  6.         if ($public) {
  7.             $this->setPublic();
  8.         }
  9.     }
  1.         $fileSize $fileVersion->getSize();
  2.         $storageOptions $fileVersion->getStorageOptions();
  3.         $mimeType $fileVersion->getMimeType();
  4.         $lastModified $fileVersion->getCreated(); // use created as file itself is not changed when entity is changed
  5.         $response = new BinaryFileResponse($storage->getPath($storageOptions));
  6.         // Prepare headers
  7.         $disposition $response->headers->makeDisposition(
  8.             $dispositionType,
  9.             $fileName,
  1.             $response = new RedirectResponse($this->storage->getPath($storageOptions), 302);
  2.             $response->setPrivate();
  3.             return $response;
  4.         } elseif (StorageInterface::TYPE_LOCAL === $storageType) {
  5.             return $this->createBinaryFileResponse($fileVersion$this->storage$locale$dispositionType);
  6.         }
  7.         throw new \RuntimeException(\sprintf('Storage type "%s" not supported.'$storageType));
  8.     }
  1.             if (!$noCount) {
  2.                 $this->mediaManager->increaseDownloadCounter($fileVersion->getId());
  3.             }
  4.             $response $this->getFileResponse($fileVersion$request->getLocale(), $dispositionType);
  5.             return $response;
  6.         } catch (MediaException $e) {
  7.             throw new NotFoundHttpException('File not found: ' $e->getCode() . ' ' $e->getMessage(), $e);
  8.         }
in vendor/symfony/http-kernel/HttpKernel.php -> downloadAction (line 181)
  1.         $this->dispatcher->dispatch($eventKernelEvents::CONTROLLER_ARGUMENTS);
  2.         $controller $event->getController();
  3.         $arguments $event->getArguments();
  4.         // call controller
  5.         $response $controller(...$arguments);
  6.         // view
  7.         if (!$response instanceof Response) {
  8.             $event = new ViewEvent($this$request$type$response$event);
  9.             $this->dispatcher->dispatch($eventKernelEvents::VIEW);
  1.         $request->headers->set('X-Php-Ob-Level', (string) ob_get_level());
  2.         $this->requestStack->push($request);
  3.         $response null;
  4.         try {
  5.             return $response $this->handleRaw($request$type);
  6.         } catch (\Throwable $e) {
  7.             if ($e instanceof \Error && !$this->handleAllThrowables) {
  8.                 throw $e;
  9.             }
  1.         $this->boot();
  2.         ++$this->requestStackSize;
  3.         $this->resetServices true;
  4.         try {
  5.             return $this->getHttpKernel()->handle($request$type$catch);
  6.         } finally {
  7.             --$this->requestStackSize;
  8.         }
  9.     }
Kernel->handle() in public/index.php (line 66)
  1. // When using the HttpCache, you need to call the method in your front controller
  2. // instead of relying on the configuration parameter
  3. // https://symfony.com/doc/3.4/reference/configuration/framework.html#http-method-override
  4. Request::enableHttpMethodParameterOverride();
  5. $request Request::createFromGlobals();
  6. $response $kernel->handle($request);
  7. $response->send();
  8. $kernel->terminate($request$response);

Logs

Level Channel Message
INFO 06:16:03 deprecation User Deprecated: Short namespace aliases such as "SuluMediaBundle:Collection" are deprecated and will be removed in Doctrine ORM 3.0. (EntityManager.php:824 called by App_KernelDevDebugContainer.php:2574, https://github.com/doctrine/orm/issues/8818, package doctrine/orm)
{
    "exception": {}
}
INFO 06:16:03 deprecation User Deprecated: In ORM 3.0, the AttributeDriver will report fields for the classes where they are declared. This may uncover invalid mapping configurations. To opt into the new mode today, set the "reportFieldsWhereDeclared" constructor parameter to true. (AttributeDriver.php:77 called by App_KernelDevDebugContainer.php:1395, https://github.com/doctrine/orm/pull/10455, package doctrine/orm)
{
    "exception": {}
}
INFO 06:16:03 deprecation User Deprecated: Not enabling lazy ghost objects is deprecated and will not be supported in Doctrine ORM 3.0. Ensure Doctrine\ORM\Configuration::setLazyGhostObjectEnabled(true) is called to enable them. (ProxyFactory.php:166 called by EntityManager.php:177, https://github.com/doctrine/orm/pull/10837/, package doctrine/orm)
{
    "exception": {}
}
INFO 06:16:03 deprecation User Deprecated: Short namespace aliases such as "SuluMediaBundle:Collection" are deprecated, use ::class constant instead. (AbstractClassMetadataFactory.php:250 called by EntityManager.php:329, https://github.com/doctrine/persistence/issues/204, package doctrine/persistence)
{
    "exception": {}
}
INFO 06:16:03 deprecation User Deprecated: Since symfony/doctrine-bridge 6.3: Registering "Sulu\Component\Persistence\EventSubscriber\ORM\MetadataSubscriber" as a Doctrine subscriber is deprecated. Register it as a listener instead, using e.g. the #[AsDoctrineListener] or #[AsDocumentListener] attribute.
{
    "exception": {}
}
INFO 06:16:03 deprecation User Deprecated: Since symfony/doctrine-bridge 6.3: Registering "Sulu\Component\Persistence\EventSubscriber\ORM\UserBlameSubscriber" as a Doctrine subscriber is deprecated. Register it as a listener instead, using e.g. the #[AsDoctrineListener] or #[AsDocumentListener] attribute.
{
    "exception": {}
}
INFO 06:16:03 deprecation User Deprecated: Since symfony/doctrine-bridge 6.3: Registering "Sulu\Component\Doctrine\ReferencesOption" as a Doctrine subscriber is deprecated. Register it as a listener instead, using e.g. the #[AsDoctrineListener] or #[AsDocumentListener] attribute.
{
    "exception": {}
}
INFO 06:16:03 deprecation User Deprecated: Since symfony/doctrine-bridge 6.3: Registering "Doctrine\ORM\Tools\ResolveTargetEntityListener" as a Doctrine subscriber is deprecated. Register it as a listener instead, using e.g. the #[AsDoctrineListener] or #[AsDocumentListener] attribute.
{
    "exception": {}
}
INFO 06:16:03 deprecation User Deprecated: Since symfony/doctrine-bridge 6.3: The "Symfony\Bridge\Doctrine\SchemaListener\DoctrineDbalCacheAdapterSchemaSubscriber" class is deprecated. Use "Symfony\Bridge\Doctrine\SchemaListener\DoctrineDbalCacheAdapterSchemaListener" instead.
{
    "exception": {}
}
INFO 06:16:03 deprecation User Deprecated: Since symfony/doctrine-bridge 6.3: Registering "Symfony\Bridge\Doctrine\SchemaListener\DoctrineDbalCacheAdapterSchemaSubscriber" as a Doctrine subscriber is deprecated. Register it as a listener instead, using e.g. the #[AsDoctrineListener] or #[AsDocumentListener] attribute.
{
    "exception": {}
}
INFO 06:16:03 deprecation User Deprecated: Since symfony/doctrine-bridge 6.3: The "Symfony\Bridge\Doctrine\SchemaListener\RememberMeTokenProviderDoctrineSchemaSubscriber" class is deprecated. Use "Symfony\Bridge\Doctrine\SchemaListener\RememberMeTokenProviderDoctrineSchemaListener" instead.
{
    "exception": {}
}
INFO 06:16:03 deprecation User Deprecated: Since symfony/doctrine-bridge 6.3: Registering "Symfony\Bridge\Doctrine\SchemaListener\RememberMeTokenProviderDoctrineSchemaSubscriber" as a Doctrine subscriber is deprecated. Register it as a listener instead, using e.g. the #[AsDoctrineListener] or #[AsDocumentListener] attribute.
{
    "exception": {}
}
INFO 06:16:03 deprecation User Deprecated: Since symfony/doctrine-bridge 6.3: Registering "Massive\Bundle\SearchBundle\Search\EventSubscriber\DoctrineOrmSubscriber" as a Doctrine subscriber is deprecated. Register it as a listener instead, using e.g. the #[AsDoctrineListener] or #[AsDocumentListener] attribute.
{
    "exception": {}
}
INFO 06:16:03 deprecation User Deprecated: Since symfony/doctrine-bridge 6.3: Registering "Sulu\Component\Persistence\EventSubscriber\ORM\TimestampableSubscriber" as a Doctrine subscriber is deprecated. Register it as a listener instead, using e.g. the #[AsDoctrineListener] or #[AsDocumentListener] attribute.
{
    "exception": {}
}
INFO 06:16:03 deprecation User Deprecated: Since symfony/doctrine-bridge 6.3: Registering "Sulu\Bundle\SecurityBundle\EventListener\PermissionInheritanceSubscriber" as a Doctrine subscriber is deprecated. Register it as a listener instead, using e.g. the #[AsDoctrineListener] or #[AsDocumentListener] attribute.
{
    "exception": {}
}
INFO 06:16:03 deprecation User Deprecated: Since symfony/doctrine-bridge 6.3: Registering "Sulu\Bundle\ActivityBundle\Infrastructure\Doctrine\Subscriber\DomainEventCollectorSubscriber" as a Doctrine subscriber is deprecated. Register it as a listener instead, using e.g. the #[AsDoctrineListener] or #[AsDocumentListener] attribute.
{
    "exception": {}
}
INFO 06:16:03 deprecation User Deprecated: Since sulu/sulu 2.3: The "Sulu\Component\Localization\Localization::setXDefault" method is deprecated on "Sulu\Component\Localization\Localization" use "setDefault" instead.
{
    "exception": {}
}
INFO 06:16:03 deprecation User Deprecated: Since sulu/sulu 2.3: The "Sulu\Component\Localization\Localization::setXDefault" method is deprecated on "Sulu\Component\Localization\Localization" use "setDefault" instead.
{
    "exception": {}
}
INFO 06:16:03 deprecation User Deprecated: Since sulu/sulu 2.3: The "Sulu\Component\Localization\Localization::setXDefault" method is deprecated on "Sulu\Component\Localization\Localization" use "setDefault" instead.
{
    "exception": {}
}
INFO 06:16:03 deprecation User Deprecated: Since sulu/sulu 2.3: The "Sulu\Component\Localization\Localization::setXDefault" method is deprecated on "Sulu\Component\Localization\Localization" use "setDefault" instead.
{
    "exception": {}
}
INFO 06:16:03 deprecation User Deprecated: Since sulu/sulu 2.3: The "Sulu\Component\Webspace\Portal::getXDefaultLocalization" method is deprecated on "Sulu\Component\Webspace\Portal" use "getDefaultLocalization" instead.
{
    "exception": {}
}
INFO 06:16:03 deprecation User Deprecated: Since sulu/sulu 2.3: The "Sulu\Component\Webspace\Portal::setXDefaultLocalization" method is deprecated on "Sulu\Component\Webspace\Portal" use "setDefaultLocalization" instead.
{
    "exception": {}
}
INFO 06:16:03 request Matched route "_profiler".
{
    "route": "_profiler",
    "route_parameters": {
        "_route": "_profiler",
        "_controller": "web_profiler.controller.profiler::panelAction",
        "token": "7764e1"
    },
    "request_uri": "https://da.wdemo.net/_profiler/7764e1",
    "method": "GET"
}
INFO 06:16:03 deprecation User Deprecated: Since sulu/sulu 2.3: Enabling the "path" parameter is deprecated.
{
    "exception": {}
}
INFO 06:16:03 deprecation User Deprecated: Since sulu/sulu 2.3: Enabling the "path" parameter is deprecated.
{
    "exception": {}
}
INFO 06:16:03 deprecation User Deprecated: Class "Nyholm\Psr7\Factory\HttplugFactory" is deprecated since version 1.8, use "Nyholm\Psr7\Factory\Psr17Factory" instead.
{
    "exception": {}
}

Stack Trace

FileNotFoundException
Symfony\Component\HttpFoundation\File\Exception\FileNotFoundException:
The file "/srv/www/dev.www/httpdocs/media/uploads/02/dsc3271-copia-copy.jpg" does not exist

  at vendor/symfony/http-foundation/File/File.php:36
  at Symfony\Component\HttpFoundation\File\File->__construct()
     (vendor/symfony/http-foundation/BinaryFileResponse.php:72)
  at Symfony\Component\HttpFoundation\BinaryFileResponse->setFile()
     (vendor/symfony/http-foundation/BinaryFileResponse.php:52)
  at Symfony\Component\HttpFoundation\BinaryFileResponse->__construct()
     (vendor/sulu/sulu/src/Sulu/Bundle/MediaBundle/Controller/MediaStreamController.php:173)
  at Sulu\Bundle\MediaBundle\Controller\MediaStreamController->createBinaryFileResponse()
     (vendor/sulu/sulu/src/Sulu/Bundle/MediaBundle/Controller/MediaStreamController.php:155)
  at Sulu\Bundle\MediaBundle\Controller\MediaStreamController->getFileResponse()
     (vendor/sulu/sulu/src/Sulu/Bundle/MediaBundle/Controller/MediaStreamController.php:132)
  at Sulu\Bundle\MediaBundle\Controller\MediaStreamController->downloadAction()
     (vendor/symfony/http-kernel/HttpKernel.php:181)
  at Symfony\Component\HttpKernel\HttpKernel->handleRaw()
     (vendor/symfony/http-kernel/HttpKernel.php:76)
  at Symfony\Component\HttpKernel\HttpKernel->handle()
     (vendor/symfony/http-kernel/Kernel.php:197)
  at Symfony\Component\HttpKernel\Kernel->handle()
     (public/index.php:66)