preg_match() error

Posts: 9
Joined: 04/03/2008

Hello,
Using Drupal 5.7, I'm trying to set up a Ubercart store according to the User's Guide (very helpful, btw). When I got to the part about uploading images, things started to go awry. The User's Guide doesnt go into great detail on Images for Products, but it does have the handy reminder on the 'Store Administration' page, under 'status messages.'
I installed/enabled cck, imagefield, imagecache & imageAPI. I enabled Imagecache UI and Thickbox - just because. Once everything was enabled, I clicked the 'automatically configure' link, and I get the message that everything was configured OK.

The imagecache README says to configure at Administer -> Site Configuration -> Image cache, Create a preset, Add some actions to your preset. Possible actions include scale, resize, and crop. Multiple actions can be applied to one ruleset.

Strangely, after enabling (and double checking), imagecache 5.x-2.0 does not appear in Administer -> Site Configuration (??). Its like its not enabled...but it is.

I went back to the 1st product and uploaded a picture. That's when I started noticing issues. (1) The image link is broken, so it doesnt appear next to the product, as I'd expect (like the Uber Beanie) The error log says: "Failed generating an image from Product3.jpg using imagecache preset". (2) I get a preg_match() warning on almost all admin pages (exact error below). This seems to be a common problem on the DO forums.

I'm hoping the two issues are related and easily solved (where the heck is Imagecache config?). Any help would be greatly appreciated.

Thanks,
Kelly

warning: preg_match() expects parameter 2 to be string, array given in /home/content/p/h/a/phatrascal/html/includes/bootstrap.inc on line 670.

--

Dr. Goose - no ordinary genius.

Posts: 2008
Joined: 08/07/2007
AdministratoreLiTe!

I had a problem with finding the admin page for imagecache 2.0 as well. Eventually I emptied my cache_menu table. I want to remind you that Ubercart hasn't been updated for imagecache 2.0, so there's probably some problems with the way it automatically adds presets. Once they are set up right, though, I expect the pictures to show up.

Last I checked, Thickbox hadn't been updated for IC 2.0 either. Has that happened already?

Posts: 4368
Joined: 08/07/2007
AdministratorHead Code Monkey - I eat bugs.

The problems may be related to the version of Image Cache you're using. We're really only tested for compatibility with the latest 1.x version of Image Cache. Also, I think from personal experience I found that the Image Cache configuration moved for its 2.0 version to the Site Building menu. I'll ping the author about it so he can update. Smiling

Posts: 57
Joined: 01/23/2008
Bug Finder

Hi Ryan

I am getting this error due to updating the imagecache module to version 2.0.

Do you know if there is any update on this? Did you open a issue or anything to imagecache project?

Thanks!

Posts: 4368
Joined: 08/07/2007
AdministratorHead Code Monkey - I eat bugs.

Not sure about the error... I did get a patch in that rewrote the README for the new menu locations.

Posts: 57
Joined: 01/23/2008
Bug Finder

Do you know if there will be imagecache 2.x support in future versions of Ubercart?

(http://drupal.org/node/273726)

thanks!!

Posts: 4368
Joined: 08/07/2007
AdministratorHead Code Monkey - I eat bugs.

I dunno... I don't even see any preg_match()'s in that file. Sticking out tongue

I'd expect us to pick up support for Imagecache 2.x in the move to Drupal 6. The 1.x branch of Ubercart is closed for features like this.

Posts: 57
Joined: 01/23/2008
Bug Finder

Found it!

It was a imagecache2 bug:
http://drupal.org/node/275605

And preg_match() is "new" in the bootstrap.inc since drupal 5.7

Thanks Ryan Smiling