eZ Community » Forums » eZ Publish 5 Platform » Image variations parameters
expandshrink

Image variations parameters

Image variations parameters

Monday 23 February 2015 12:55:44 pm - 8 replies

Hi,

Before, when you change a parameter of image_variations and refresh the Frontend, we can see the new changes in the image.

Currently, this is not the case, we must remove the resized image file of the past filter parameter, or rename the filter to get the new resized image.

Do you have any idea please?

Modified on Monday 23 February 2015 1:04:28 pm by Soufian DAOUDI

Monday 23 February 2015 5:08:14 pm

Hello Soufian,

In the past with eZ Publish Legacy image.ini settings, to my knowledge, if you made a change to these settings you would have to clear ini caches (at least) to see a change in image alias images when you reload the page.

I would wonder if you did not need to do the same in new stack as well.

Can you clarify something for me? Which version of eZ Publish are you using and which stack (new stack or legacy) are you using? 

I hope this helps!

Cheers,
Heath

Monday 23 February 2015 7:28:02 pm

Hello Health,

Thanks for your reply.

I use the eZ Publish 2014.11 version, but I think that this is a regression, since this manipulation it worked with the 2014.03 version of eZ Publish.

I use the yml image_variations configuration.

What do you think?

Thanks.

Monday 23 February 2015 11:30:07 pm

Hello Soufian,

Well, I'm not sure how best to respond here ... First I'll cover the basics.

There was a massive change between eZ Publish 5.3 (2014.03 community build) and eZ Publish 5.4 (2014.11 community build). In that for new stack image aliases in 5.4 no longer depend or use image.ini settings configurations and now are entirely yaml based. See this documentation for more information:

https://doc.ez.no/display/EZP/Image+alias+generation

So since you now use the 2014.11 version (5.4 alpha1) you will need to use yaml only (for user siteaccess configuration of image aliases).

So since the subsystems in this subject have been replaced entirely. I do not think there is actually a regression. Note the messages in the above documentation link ... "Image variations are managed by the IOService and are completely independent from ezimage FieldType. They are generated only once and cleared on demand (e.g. content removal)."

Now I will agree that for the use case you describe which is not clearly documented, the behavior, without me testing myself, seems changed / different. It seems that this is unavoidable but more testing may be needed.

I followed the related pull request(s) daily with a lot of attention to detail and after re-reading today it seems this use case was brought up by crevillo but not properly discussed / addressed. Hint, read comments:

https://github.com/ezsystems/ezpublish-kernel/pull/952/files

I wish I could be of more help but it seems that for many legacy users needs, there is still much work to be done to improve the eZ Platform Kernel and it's features which support all edge use cases of image aliases. 

I would suggest creating a new stack command-line script based solution to use the available new stack apis to remove all image aliases and perhaps even recreate them. I've done this myself with bcimagealias which sadly would not help 5.4 new stack users with the recent api changes.

I hope this helps!

Cheers,
Heath 

Tuesday 24 February 2015 10:17:45 am

Hi Health,

Thanks for your reply and for your explanation.

That's it, I just saw it at the source code (Create the image alias only if it does not already exist, else is loading from cache).

https://github.com/ezsystems/ezpublish-kernel/blob/master/eZ/Bundle/EzPublishCoreBundle/Imagine/AliasGenerator.php#L112

I will try to create a command-line that will allow us to remove the all image variations cache.

Modified on Tuesday 24 February 2015 10:18:55 am by Soufian DAOUDI

Tuesday 24 February 2015 6:22:08 pm

Hello Soufian,

I'm pleased we have reached some understanding.

Would you consider sharing the command-line script to remove all the image variations via pull request your going to create? https://github.com/ezsystems/ezpublish-kernel/pulls

Your solution would really help a lot of other users!

Cheers,
Heath 

Wednesday 10 June 2015 6:38:40 am

Hello Soufian,

The feature you needed has been implemented recently in eZ Publish Platform kernel!

https://jira.ez.no/browse/EZP-23367

https://github.com/ezsystems/ezpublish-kernel/pull/1276

https://github.com/ezsystems/ezpublish-kernel/commit/cfe711057376cdfe2f6d3b0536f4e1eeb26c1623

I hope that eZ Systems will consider implementing support for a cli script to 're-generate' or 'pre-generate' image aliases at the command line before they are normally needed / requested / created via the browser as the next step in the kind of functionality bcimagealias solution provides for legacy into the new stack.

I hope this helps you!

Cheers,
Heath

Wednesday 10 June 2015 11:21:43 am

Hello Health,

Thank you for your reply.

I had created a simple command for this:

https://gist.github.com/sdaoudi/b87ac4757391f2eb4441

I will try now to test the new command.

Thanks a lot.

Wednesday 10 June 2015 12:54:20 pm

Hello Soufian,

Your very welcome! Thank you for sharing the solution you have created and used to solve this issue yourself. I hope your shared solution can help other users of older versions happy.gif Emoticon

Best wishes

Cheers,
Heath

expandshrink

You must be logged in to post messages in this topic!

36 542 Users on board!

Forums menu

Proudly Developed with from