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?

Comments

wmostrey’s picture

Hey 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?

ugerhard’s picture

StatusFileSize
new58.25 KB
new45.25 KB

I 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.

wmostrey’s picture

Did 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).

ugerhard’s picture

StatusFileSize
new44.96 KB

Yes, I did. The attached screenshot shows my configuration at /admin/settings/asset/defaults.

ugerhard’s picture

Category: support » bug

OK, I've been digging around a bit in the code. One of the problems seems to be the following line (#358) in asset.module

if (function_exists('theme_imagecache') && variable_get('asset_imagecache', '')) {

There is no variable 'asset_imagecache', so this if bails 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.

wmostrey’s picture

Assigned: Unassigned » wmostrey
Priority: Normal » Critical

Thanks a lot for the info Udo, this helps a lot. I get working on it.

wmostrey’s picture

Status: Active » Needs review
StatusFileSize
new1.06 KB

Here is the patch, works as advertised on my sandbox. Just select the default imagecaches in admin/settings/asset/defaults and it works.

ugerhard’s picture

Status: Needs review » Reviewed & tested by the community

Looks 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.

wmostrey’s picture

Status: Reviewed & tested by the community » Fixed

Committed to dev. Thanks to CivicActions for sponsoring the bugfix and Udo for reviewing!

true-pal’s picture

Status: Fixed » Reviewed & tested by the community

ugerhard 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?

wmostrey’s picture

Status: Reviewed & tested by the community » Fixed

Juergen, I'll do that. Let's continue discussion on this subject on http://drupal.org/node/208027

Anonymous’s picture

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for two weeks with no activity.