Exceptions
Exceptions 2
Symfony\Component\HttpKernel\Exception\ NotFoundHttpException
} catch (NotLoadableException $exception) {
if (null !== $this->dataManager->getDefaultImageUrl($filter)) {
return new RedirectResponse($this->dataManager->getDefaultImageUrl($filter));
}
throw new NotFoundHttpException(sprintf('Source image for path "%s" could not be found', $path), $exception);
} catch (NonExistingFilterException $exception) {
throw new NotFoundHttpException(sprintf('Requested non-existing filter "%s"', $filter), $exception);
} catch (RuntimeException $exception) {
throw new \RuntimeException(vsprintf('Unable to create image for path "%s" and filter "%s". Message was "%s"', [$hash ? sprintf('%s/%s', $hash, $path) : $path, $filter, $exception->getMessage()]), 0, $exception);
}
in
vendor/liip/imagine-bundle/Controller/ImagineController.php
->
createRedirectResponse
(line 88)
public function filterAction(Request $request, $path, $filter)
{
$path = PathHelper::urlPathToFilePath($path);
$resolver = $request->get('resolver');
return $this->createRedirectResponse(function () use ($path, $filter, $resolver, $request) {
return $this->filterService->getUrlOfFilteredImage(
$path,
$filter,
$resolver,
$this->isWebpSupported($request)
in
vendor/symfony/http-kernel/HttpKernel.php
->
filterAction
(line 163)
$this->dispatcher->dispatch($event, KernelEvents::CONTROLLER_ARGUMENTS);
$controller = $event->getController();
$arguments = $event->getArguments();
// call controller
$response = $controller(...$arguments);
// view
if (!$response instanceof Response) {
$event = new ViewEvent($this, $request, $type, $response);
$this->dispatcher->dispatch($event, KernelEvents::VIEW);
in
vendor/symfony/http-kernel/HttpKernel.php
->
handleRaw
(line 75)
{
$request->headers->set('X-Php-Ob-Level', (string) ob_get_level());
$this->requestStack->push($request);
try {
return $this->handleRaw($request, $type);
} catch (\Exception $e) {
if ($e instanceof RequestExceptionInterface) {
$e = new BadRequestHttpException($e->getMessage(), $e);
}
if (false === $catch) {
in
vendor/symfony/http-kernel/Kernel.php
->
handle
(line 202)
$this->boot();
++$this->requestStackSize;
$this->resetServices = true;
try {
return $this->getHttpKernel()->handle($request, $type, $catch);
} finally {
--$this->requestStackSize;
}
}
$_SERVER['HTTPS'] = 'on';
$kernel = new Kernel($_SERVER['APP_ENV'], (bool) $_SERVER['APP_DEBUG']);
$request = Request::createFromGlobals();
$response = $kernel->handle($request);
$response->send();
$kernel->terminate($request, $response);
Liip\ImagineBundle\Exception\Binary\Loader\ NotLoadableException
if (null !== $absolute = $this->locateUsingRootPathsSearch($path)) {
return $this->sanitizeAbsolutePath($absolute);
}
throw new NotLoadableException(sprintf('Source image not resolvable "%s" in root path(s) "%s"', $path, implode(':', $this->roots)));
}
protected function generateAbsolutePath(string $root, string $path): ?string
{
if (false !== $absolute = realpath($root.DIRECTORY_SEPARATOR.$path)) {
in
vendor/liip/imagine-bundle/Binary/Loader/FileSystemLoader.php
->
locate
(line 74)
/**
* {@inheritdoc}
*/
public function find($path)
{
$path = $this->locator->locate($path);
$mimeType = $this->mimeTypeGuesser instanceof DeprecatedMimeTypeGuesserInterface ? $this->mimeTypeGuesser->guess($path) : $this->mimeTypeGuesser->guessMimeType($path);
$extension = $this->getExtension($mimeType);
return new FileBinary($path, $mimeType, $extension);
}
in
vendor/liip/imagine-bundle/Imagine/Data/DataManager.php
->
find
(line 129)
*/
public function find($filter, $path)
{
$loader = $this->getLoader($filter);
$binary = $loader->find($path);
if (!$binary instanceof BinaryInterface) {
$mimeType = $this->mimeTypeGuesser->guess($binary);
$extension = $this->getExtension($mimeType);
$binary = new Binary(
in
vendor/liip/imagine-bundle/Service/FilterService.php
->
find
(line 162)
/**
* @throws NonExistingFilterException
*/
private function createFilteredBinary(FilterPathContainer $filterPathContainer, string $filter): BinaryInterface
{
$binary = $this->dataManager->find($filter, $filterPathContainer->getSource());
try {
return $this->filterManager->applyFilter($binary, $filter, $filterPathContainer->getOptions());
} catch (NonExistingFilterException $e) {
$this->logger->debug(sprintf(
in
vendor/liip/imagine-bundle/Service/FilterService.php
->
createFilteredBinary
(line 142)
}
foreach ($filterPathContainers as $filterPathContainer) {
if (!$this->cacheManager->isStored($filterPathContainer->getTarget(), $filter, $resolver)) {
$this->cacheManager->store(
$this->createFilteredBinary($filterPathContainer, $filter),
$filterPathContainer->getTarget(),
$filter,
$resolver
);
}
in
vendor/liip/imagine-bundle/Service/FilterService.php
->
getUrlOfFilteredImageByContainer
(line 101)
*/
public function getUrlOfFilteredImage($path, $filter, $resolver = null, bool $webpSupported = false)
{
$basePathContainer = new FilterPathContainer($path);
return $this->getUrlOfFilteredImageByContainer($basePathContainer, $filter, $resolver, $webpSupported);
}
/**
* @param string $path
* @param string $filter
in
vendor/liip/imagine-bundle/Controller/ImagineController.php
->
getUrlOfFilteredImage
(line 93)
return $this->createRedirectResponse(function () use ($path, $filter, $resolver, $request) {
return $this->filterService->getUrlOfFilteredImage(
$path,
$filter,
$resolver,
$this->isWebpSupported($request)
);
}, $path, $filter);
}
/**
in
vendor/liip/imagine-bundle/Controller/ImagineController.php
->
Liip\ImagineBundle\Controller\{closure}
(line 143)
}
private function createRedirectResponse(\Closure $url, string $path, string $filter, ?string $hash = null): RedirectResponse
{
try {
return new RedirectResponse($url(), $this->controllerConfig->getRedirectResponseCode());
} catch (NotLoadableException $exception) {
if (null !== $this->dataManager->getDefaultImageUrl($filter)) {
return new RedirectResponse($this->dataManager->getDefaultImageUrl($filter));
}
in
vendor/liip/imagine-bundle/Controller/ImagineController.php
->
createRedirectResponse
(line 88)
public function filterAction(Request $request, $path, $filter)
{
$path = PathHelper::urlPathToFilePath($path);
$resolver = $request->get('resolver');
return $this->createRedirectResponse(function () use ($path, $filter, $resolver, $request) {
return $this->filterService->getUrlOfFilteredImage(
$path,
$filter,
$resolver,
$this->isWebpSupported($request)
in
vendor/symfony/http-kernel/HttpKernel.php
->
filterAction
(line 163)
$this->dispatcher->dispatch($event, KernelEvents::CONTROLLER_ARGUMENTS);
$controller = $event->getController();
$arguments = $event->getArguments();
// call controller
$response = $controller(...$arguments);
// view
if (!$response instanceof Response) {
$event = new ViewEvent($this, $request, $type, $response);
$this->dispatcher->dispatch($event, KernelEvents::VIEW);
in
vendor/symfony/http-kernel/HttpKernel.php
->
handleRaw
(line 75)
{
$request->headers->set('X-Php-Ob-Level', (string) ob_get_level());
$this->requestStack->push($request);
try {
return $this->handleRaw($request, $type);
} catch (\Exception $e) {
if ($e instanceof RequestExceptionInterface) {
$e = new BadRequestHttpException($e->getMessage(), $e);
}
if (false === $catch) {
in
vendor/symfony/http-kernel/Kernel.php
->
handle
(line 202)
$this->boot();
++$this->requestStackSize;
$this->resetServices = true;
try {
return $this->getHttpKernel()->handle($request, $type, $catch);
} finally {
--$this->requestStackSize;
}
}
$_SERVER['HTTPS'] = 'on';
$kernel = new Kernel($_SERVER['APP_ENV'], (bool) $_SERVER['APP_DEBUG']);
$request = Request::createFromGlobals();
$response = $kernel->handle($request);
$response->send();
$kernel->terminate($request, $response);
Logs
No log messages
Stack Traces 2
[2/2]
NotFoundHttpException
|
---|
Symfony\Component\HttpKernel\Exception\NotFoundHttpException: Source image for path "de/fa/0879419124db08d5191bb3dae58e.jpg&&" could not be found at vendor/liip/imagine-bundle/Controller/ImagineController.php:149 at Liip\ImagineBundle\Controller\ImagineController->createRedirectResponse() (vendor/liip/imagine-bundle/Controller/ImagineController.php:88) at Liip\ImagineBundle\Controller\ImagineController->filterAction() (vendor/symfony/http-kernel/HttpKernel.php:163) at Symfony\Component\HttpKernel\HttpKernel->handleRaw() (vendor/symfony/http-kernel/HttpKernel.php:75) at Symfony\Component\HttpKernel\HttpKernel->handle() (vendor/symfony/http-kernel/Kernel.php:202) at Symfony\Component\HttpKernel\Kernel->handle() (public/index.php:31) |
[1/2]
NotLoadableException
|
---|
Liip\ImagineBundle\Exception\Binary\Loader\NotLoadableException: Source image not resolvable "de/fa/0879419124db08d5191bb3dae58e.jpg&&" in root path(s) "/home/ppmcdev/public/media/image:/home/ppmcdev/public:/home/ppmcdev/public/media/image:/home/ppmcdev/public/taxon-ctas:/home/ppmcdev/public/articles" at vendor/liip/imagine-bundle/Binary/Locator/FileSystemLocator.php:47 at Liip\ImagineBundle\Binary\Locator\FileSystemLocator->locate() (vendor/liip/imagine-bundle/Binary/Loader/FileSystemLoader.php:74) at Liip\ImagineBundle\Binary\Loader\FileSystemLoader->find() (vendor/liip/imagine-bundle/Imagine/Data/DataManager.php:129) at Liip\ImagineBundle\Imagine\Data\DataManager->find() (vendor/liip/imagine-bundle/Service/FilterService.php:162) at Liip\ImagineBundle\Service\FilterService->createFilteredBinary() (vendor/liip/imagine-bundle/Service/FilterService.php:142) at Liip\ImagineBundle\Service\FilterService->getUrlOfFilteredImageByContainer() (vendor/liip/imagine-bundle/Service/FilterService.php:101) at Liip\ImagineBundle\Service\FilterService->getUrlOfFilteredImage() (vendor/liip/imagine-bundle/Controller/ImagineController.php:93) at Liip\ImagineBundle\Controller\ImagineController->Liip\ImagineBundle\Controller\{closure}() (vendor/liip/imagine-bundle/Controller/ImagineController.php:143) at Liip\ImagineBundle\Controller\ImagineController->createRedirectResponse() (vendor/liip/imagine-bundle/Controller/ImagineController.php:88) at Liip\ImagineBundle\Controller\ImagineController->filterAction() (vendor/symfony/http-kernel/HttpKernel.php:163) at Symfony\Component\HttpKernel\HttpKernel->handleRaw() (vendor/symfony/http-kernel/HttpKernel.php:75) at Symfony\Component\HttpKernel\HttpKernel->handle() (vendor/symfony/http-kernel/Kernel.php:202) at Symfony\Component\HttpKernel\Kernel->handle() (public/index.php:31) |