{"action":"created","issue":{"url":"https://api.github.com/repos/ezsystems/ezpublish-kernel/issues/1225","labels_url":"https://api.github.com/repos/ezsystems/ezpublish-kernel/issues/1225/labels{/name}","comments_url":"https://api.github.com/repos/ezsystems/ezpublish-kernel/issues/1225/comments","events_url":"https://api.github.com/repos/ezsystems/ezpublish-kernel/issues/1225/events","html_url":"https://github.com/ezsystems/ezpublish-kernel/pull/1225","id":67699595,"number":1225,"title":"Fix EZP-24241: Aliases/Variations clearing and purging is impossible","user":{"login":"Plopix","id":313532,"avatar_url":"https://avatars.githubusercontent.com/u/313532?v=3","gravatar_id":"","url":"https://api.github.com/users/Plopix","html_url":"https://github.com/Plopix","followers_url":"https://api.github.com/users/Plopix/followers","following_url":"https://api.github.com/users/Plopix/following{/other_user}","gists_url":"https://api.github.com/users/Plopix/gists{/gist_id}","starred_url":"https://api.github.com/users/Plopix/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Plopix/subscriptions","organizations_url":"https://api.github.com/users/Plopix/orgs","repos_url":"https://api.github.com/users/Plopix/repos","events_url":"https://api.github.com/users/Plopix/events{/privacy}","received_events_url":"https://api.github.com/users/Plopix/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2015-04-10T22:58:14Z","updated_at":"2015-04-11T08:50:15Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/ezsystems/ezpublish-kernel/pulls/1225","html_url":"https://github.com/ezsystems/ezpublish-kernel/pull/1225","diff_url":"https://github.com/ezsystems/ezpublish-kernel/pull/1225.diff","patch_url":"https://github.com/ezsystems/ezpublish-kernel/pull/1225.patch"},"body":"Hi,\r\n\r\nIt's not possible to clear (or purge) the variation/alias of images. ( probably since LiipImagine Bundle )\r\nThere was this Issue: https://jira.ez.no/browse/EZP-23518 and this PR: https://github.com/ezsystems/ezpublish-kernel/pull/1141\r\n\r\nThen, after the fix the warnings are gone but the Aliases/Variations are not deleted, the feature itself was not tested.\r\n\r\nThen :\r\n1/ the clearing doesn't work because it was based on the legacy expiry\r\n2/ the purge doesn't work because of a bug in the source code.\r\n\r\nI've already talked about this issue with Bertrand D. he confirmed there is work to do on this topic \r\nThen I know my solution is a workaround... but it opens the discussion and gives a solution for those who wants to clear the aliases ;-)\r\n\r\nAnd last subject, the liip:imagine:cache:remove command doesn't seem to work either with eZ, probably because image paths are different for each contents ( I didn't dig this last behavior)\r\n\r\nIssue: https://jira.ez.no/browse/EZP-24241\r\n\r\n- [x] Find a workaround\r\n- [ ] Fix the variation purge\r\n- [ ] Give a way to expire/clear the variations\r\n- [ ] Find a way to be able to use the LiipImagine command\r\n\r\nThanks!\r\n\r\nping @bdunogier @lolautruche "},"comment":{"url":"https://api.github.com/repos/ezsystems/ezpublish-kernel/issues/comments/91795666","html_url":"https://github.com/ezsystems/ezpublish-kernel/pull/1225#issuecomment-91795666","issue_url":"https://api.github.com/repos/ezsystems/ezpublish-kernel/issues/1225","id":91795666,"user":{"login":"bdunogier","id":235928,"avatar_url":"https://avatars.githubusercontent.com/u/235928?v=3","gravatar_id":"","url":"https://api.github.com/users/bdunogier","html_url":"https://github.com/bdunogier","followers_url":"https://api.github.com/users/bdunogier/followers","following_url":"https://api.github.com/users/bdunogier/following{/other_user}","gists_url":"https://api.github.com/users/bdunogier/gists{/gist_id}","starred_url":"https://api.github.com/users/bdunogier/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bdunogier/subscriptions","organizations_url":"https://api.github.com/users/bdunogier/orgs","repos_url":"https://api.github.com/users/bdunogier/repos","events_url":"https://api.github.com/users/bdunogier/events{/privacy}","received_events_url":"https://api.github.com/users/bdunogier/received_events","type":"User","site_admin":false},"created_at":"2015-04-11T08:50:15Z","updated_at":"2015-04-11T08:50:15Z","body":"In a nutshell, the problem is that the path we get from imagine is the URI : `var/ezdemo_site/storage/images/media/images/mount-etna/547-1-eng-GB/Mount-etna_large.png`.\r\n\r\nEach IO Service mainly works within its own prefix, with an id like `mount-etna/547-1-eng-GB/Mount-etna_large.png`. That's why we must use `loadByUri()`. But there is no \"existsByUri()`, and it kind of doesn't make sense.\r\n\r\nI'm kind of thinking that we are missing something between IO & Imagine. I think we could look into using the URL Decorator here, as long as imagine does return the URI. I've looked into the code a bit, but I'm not 100% sure what to expect out of the getFilePath() call in IORepositoryResolver, depending on how the system is configured.\r\n\r\nIf we are able to convert the URI back to an image ID, things will be much cleaner."}}