Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Symfony, Liip Imagine bundle not working on server in prod environment #450

Closed
EnoahNetzach opened this issue Jun 24, 2014 · 5 comments
Closed

Comments

@EnoahNetzach
Copy link

I have a project where I keep my uploaded images in src/My/Bundle/Resources/uploads/images/full and use the twig filter imagine_filter to dynamically create thumbnails.

On my local machine it works flawlessly and so does on my server, but there only under the dev environment. When I delete the previously created thumbnails (leaving only the full directory), clear the prod cache and load any web page, the images are not created, their url always remains under media/cache, and the logger gives me the request.ERROR:

"No route found for "GET /uploads/images/avatar/354026c94b773b77ca945b4a6323e15c84102f6b.jpg"" at /<path>/app/cache/prod/classes.php line 1964 {"exception":"[object] (Symfony\\Component\\HttpKernel\\Exception\\NotFoundHttpException: No route found for \"GET /uploads/images/avatar/354026c94b773b77ca945b4a6323e15c84102f6b.jpg\" at /<path>/app/cache/prod/classes.php:1964, Symfony\\Component\\Routing\\Exception\\ResourceNotFoundException:  at /<path>/app/cache/prod/appProdUrlMatcher.php:1816

Some additional infos:

  • I have symlinked src/My/Bundle/Resources/uploads to web/uploads

  • my config is (thumbnail_min is a custom filter):

    liip_imagine:
        loaders:
            default:
                filesystem:
                    data_root: %kernel.root_dir%/../web%images_full.dir%
        resolvers:
            default:
                web_path: 
                    web_root: %kernel.root_dir%/../web
                    cache_prefix: %images.dir%
        cache: default
        filter_sets:
            avatar:
                quality: 90
                filters:
                    thumbnail_min: { size: 50, mode: inset }
            xsmall:
                quality: 90
                filters:
                    thumbnail_min: { size: 125, mode: inset }
            small:
                quality: 90
                filters:
                    thumbnail_min: { size: 250, mode: inset }
            medium:
                quality: 90
                filters:
                    thumbnail_min: { size: 500, mode: inset }
            large:
                quality: 90
                filters:
                    thumbnail_min: { size: 800, mode: inset }
            full:
                quality: 100
    
  • permissions are always at least group rw (that's what is needed on the server)

@jkabat
Copy link
Contributor

jkabat commented Jul 23, 2014

Can you check if you have _liip_imagine: section added in your routing.yml ?

@xeux
Copy link

xeux commented Oct 13, 2014

Mine is added but same issue, also only fail in production server..

@EnoahNetzach
Copy link
Author

@jkabat no, I think I have an old version, because I have only

_imagine:
    resource: .
    type: imagine

as required here, otherwise it wouldn't presumably work at all..

I found that this problem is (usually) present when a lot of "raw" images are added and requested together.

@xeux
Copy link

xeux commented Oct 14, 2014

@EnoahNetzach I believe you do, try to update or use the new settings, in my case I removed the cache manually and is working now.

@michellesanver
Copy link
Contributor

@EnoahNetzach I am going through all issues to sort and prioritise. Is this still an issue for you? It seems like it may be solved by xeus's comment. Since this is so old, please open a new issue if that is the case and we will prioritise accordingly. Thanks a lot! :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants