eltrino / diamantedesk-application

DiamanteDesk
http://diamantedesk.com/
Other
118 stars 42 forks source link

Default images not working. #79

Open lghamie opened 6 years ago

lghamie commented 6 years ago

I was getting the following error on a freshly installed diamantedesk with docker.:

[2018-05-30 20:50:27] request.ERROR: Uncaught PHP Exception Symfony\Component\HttpKernel\Exception\NotFoundHttpException: "Source image could not be found" at /var/www/diamante/vendor/liip/imagine-bundle/Controller/ImagineController.php line 101 {"exception":"[object] (Symfony\Component\HttpKernel\Exception\NotFoundHttpException(code: 0): Source image could not be found at /var/www/diamante/vendor/liip/imagine-bundle/Controller/ImagineController.php:101, Liip\ImagineBundle\Exception\Binary\Loader\NotLoadableException(code: 0): Source image invalid \"/var/www/diamante/src/Diamante/DeskBundle/Resources/public/img/branch-placeholder.png\" as it is outside of the defined root path(s) \"/var/www/diamante/web\" at /var/www/diamante/vendor/liip/imagine-bundle/Binary/Locator/FileSystemLocator.php:141)"} []

So i found this related link: https://github.com/maximecolin/technical/issues/13

I tried that solution and it worked: I added

liip_imagine:
  loaders:
    default:
      filesystem:
        data_root: 
                - "%kernel.root_dir%/../web"
                - "/var/www/diamante/src/Diamante/DeskBundle/Resources/public/img/"

At the end of the config.yml and deleted the cache and restarted the container.

You might wanna add that to master because the current code is failing since liip_imagine v 1.7.1

If you need me to create a pull request please let me know.