Hello!

Recently I've been working quite a bit with the Features module, and in the process I ran into a rather curious problem; my original issue describes it in some detail, but the summary goes like this: when you export a view that uses one of the imagecache preset formatters (see imagecache_field_formatter_info()), the resulting export code references the preset by its numeric ID rather than its machine-readable name. However (and this is a good thing), exported imagecache presets only include the machine name, not the ID, since it's assumed that the ID will vary when imported based on how many presets the importing site already has. The net result of this is that exported views sometimes don't get associated with the correct imagecache presets when imported onto sites that already have some presets defined.

The solution, of course, would be to adjust the exported view code to point at the preset's machine-readable name instead of its ID. However, I'm having a hard time figuring out exactly where that code is produced. Do you have any suggestions? If I can find the relevant functions I'd be happy to roll out a patch that takes care of this.

Thanks!
Adam

Comments

jazzslider’s picture

Status: Active » Closed (fixed)

Hello!

Spent some more time looking into the code, and realized on further examination that imagecache/imagefield aren't actually having this problem…I must have been looking at something else in my exported view. In actuality, my exported view has…

'format' => 'thumbnail_linked',

…which should be more than sufficient to correctly associate the imported view with the imported preset. Sorry for the mix-up!

Thanks!
Adam