I'm not sure if I'm overlooking anything so I'm marking this as a support question first: The Asset CCK field does not seem to offer imagecache presets for image assets. Is this by design or - as I said - have I overlooked a configuration somewhere?
| Comment | File | Size | Author |
|---|---|---|---|
| #7 | asset-imagecache-cck.patch | 1.06 KB | wmostrey |
| #4 | asset-presets.png | 44.96 KB | ugerhard |
| #2 | cck-image-asset-screenshot.png | 45.25 KB | ugerhard |
| #2 | inline-image-asset.screenhot.png | 58.25 KB | ugerhard |
Comments
Comment #1
wmostrey commentedHey Udo,
You need to set which imagecache presets asset is allowed to use in the asset configuration at
/admin/settings/asset/imagecache. Does this answer your question?Comment #2
ugerhard commentedI had done so already, and for example in the Asset wizard via the TinyMCE plugin the imagecache presets are present and do work beautifully :-)
But in the CCK asset wizard there is no "next" option after choosing the asset, which would lead to the imagecache preset selection, but just a select button which puts the "raw" image into the asset field. See also the attached screenshots.
Comment #3
wmostrey commentedDid you set the defaults at
/admin/settings/asset/defaults? There you can set which image types should use which preset under what conditions (teaser, full page).Comment #4
ugerhard commentedYes, I did. The attached screenshot shows my configuration at
/admin/settings/asset/defaults.Comment #5
ugerhard commentedOK, I've been digging around a bit in the code. One of the problems seems to be the following line (#358) in
asset.moduleThere is no variable 'asset_imagecache', so this
ifbails out. In my {variable} table there are two variables "asset_imagecache_preset_1" and "asset_imagecache_preset_2" instead, probably for the two imagecache presets that I've exposed to Asset.Comment #6
wmostrey commentedThanks a lot for the info Udo, this helps a lot. I get working on it.
Comment #7
wmostrey commentedHere is the patch, works as advertised on my sandbox. Just select the default imagecaches in
admin/settings/asset/defaultsand it works.Comment #8
ugerhard commentedLooks good. I've applied the patch and tested it with two separate imagecache preset defaults. The CCK asset image is displayed with the imagecache formatting applied and linked to the full size image.
So this fixes the bug (Thanks, Wim!), but it does not address another part of the original issue: That it is not currently possible to have the user select which imagecache preset to use with a CCK asset instead of "just" using the defaults. But as this is a feature request I'd say this issue here should be marked as fixed when the patch has been included, and I'll create a separate feature request issue for the above functionality.
Comment #9
wmostrey commentedCommitted to dev. Thanks to CivicActions for sponsoring the bugfix and Udo for reviewing!
Comment #10
true-pal commentedugerhard wrote: "That it is not currently possible to have the user select which imagecache preset to use with a CCK asset instead of "just" using the defaults."
This exactly is what I have released in this issue: http://drupal.org/node/208027
beta testing the patch is very welcome :-)
Note: sh..t with this bug-fix the mentioned patch (http://drupal.org/node/208027) will not further work with the fixed IF- clause
@wmostrey: what do you think about a merge of this two patches?
Comment #11
wmostrey commentedJuergen, I'll do that. Let's continue discussion on this subject on http://drupal.org/node/208027
Comment #12
Anonymous (not verified) commentedAutomatically closed -- issue fixed for two weeks with no activity.