Using the latest versions of everything, I received the following error when selecting "Configure automatic image support" from Store Administration -> Status Messages.

Fatal error: Call to undefined function uc_product_add_imagecache_presets() in /home/check/public_html/sandbox/sites/all/modules/ubercart/uc_product/uc_product.admin.inc on line 533

However, the status message currently reports Product image support has been automatically configured by Ubercart, but I'm not sure whether I believe it in light of the nasty looking error message.

Comments

gcann’s picture

Mistake has been made into :

function uc_product_image_defaults() {
  uc_product_add_default_image_field();
  <b>// uc_product_add_imagecache_presets();
  <i>// Should be replaced with this call :</i>
      uc_product_imagecache_default_presets();</b>

  drupal_set_message(t('Default image support configured for Ubercart products using CCK and ImageCache.'));

  drupal_goto('admin/store');
}

You should recall automatic configuration like this :
http:///admin/store/settings/products/defaults

Island Usurper’s picture

Priority: Critical » Normal
Status: Active » Fixed

Because the latest version of Imagecache includes support for hook_imagecache_default_presets(), uc_product_image_defaults() doesn't have to add any imagecache presets any more. So while the error occurred because it tried to call a function that doesn't exist, it doesn't actually need to do that any more. Fortunately, it sets up the CCK image field before the error happens, so image support has indeed been set up correctly.

ShaunDychko’s picture

Status: Fixed » Closed (fixed)

Thank you for the help!

sistegraf’s picture

Can you please help me with this answer? I have exactly the same error.
I really don´t understand how to fix it.

Should I copy this somewhere?:

function uc_product_image_defaults() {
uc_product_add_default_image_field();
// uc_product_add_imagecache_presets();
// Should be replaced with this call :
uc_product_imagecache_default_presets();

drupal_set_message(t('Default image support configured for Ubercart products using CCK and ImageCache.'));

drupal_goto('admin/store');
}

Thank you

Island Usurper’s picture

The error doesn't prevent images from being set up, so you shouldn't have to actually fix anything. The next release of Ubercart will keep the error from actually happening, though.