Hi all,

(I'm not sure if i should post this as an issue, so correct me if i'm wrong)

We use the Features module to put ImageCache presets in version control. I really really like it. But i stumbled upon what i think is an issue/bug.
We use the Aspect Switcher from Imagecache Canvas Actions 6.x-1.6 http://drupal.org/project/imagecache_actions , to decide on how to handle an image (portrait or landscape, both are defined as another preset).

After updating a working copy from version control, and we revert the imagecache presets, all the presets that are Aspect switchers are empty. To fix this, we manually override the preset and set the landscape/portrait to there corresponding presets. There is a message above which says:

You must create the two presets to use before enabling this process.

If i would guess i say that is why the aspect switcher presets are not saved correctly. At the time of import, the 2 preset that the aspect is referring to, are not available yet.
Has anyone experienced this also, and might have a solution?

I tried to change the names (alphabetically), so that the 2 presets are loaded before the aspect, but that doesn't do the trick.

Any thoughts on this issue?

Comments

gijza’s picture

Perhaps this can be resolved by putting the aspect switch presets in another feature and load/revert this as second?

If i have a spare moment i will give it a try and post the results.

mrfelton’s picture

damienmckenna’s picture

This boils down to the fact that Imagecache identifies presets differently depending on where it's stored:

  • "Normal", non-exported presets: use the presetid
  • "Default", exported presets: use the presetname
  • Overridden presets: use the presetid

When you're telling Aspect Switcher to use a preset it will pick the identifier using the above rules. As a result, when you create the Aspect Switcher preset using either Normal or Overridden presets it uses the presetid, then when they're exported it can't find them anymore.

I do suggest upgrading to the latest Imagecache and Features release to see if the problem is still there.

damienmckenna’s picture

mpotter’s picture

Status: Active » Closed (won't fix)

Closing this for lack of activity. Please re-open this issue if you can reproduce it in the latest version.