When activating the module the following error message is thrown:
Parse error: syntax error, unexpected ';', expecting ')' in /www/htdocs/v143599/christianmenz/shop/modules/contrib/uc_option_image/uc_option_image.install on line 11

I changed the code in the .install file to

<?php

function uc_option_image_install($no_image=NULL) {
  if (empty($no_image)) {
    return uc_option_image_install(drupal_get_path('module', 'uc_option_image') .'/no_image.png');
  }
  $info = image_get_info($no_image);
  if ($info) {
    $file = (object) array(
      'uid' => 1,
      'filename' => 'option_image_0_0_0',
      'filepath' => $no_image,
      'filemime' => $info['file_mime'],
      'filesize' => $info['file_size'],
      'status' => FILE_STATUS_PERMANENT
    );
    db_query("DELETE FROM {files} WHERE filename = 'option_image_0_0_0'");
    drupal_write_record('files', $file);
  }
}

with an ',' instead of an ';' at the end of line 11 ('filename'...) and then it worked.

Thanks for having a look, cheers,
Boro

CommentFileSizeAuthor
#11 uc_option_image-install-patch.diff471 bytesgrub3

Comments

minneapolisdan’s picture

Thanks, that helped. I'm trying this module out and reading up on the bugs.

philbar’s picture

Status: Active » Reviewed & tested by the community

Confirmed the bug and reviewed the change.

Now the fix just needs to be committed.

1kenthomas’s picture

Ditto-ing comment elsewhere (mainly to get this on my issues list): do we have active maintenance?

greg.harvey’s picture

+1, this fixed it for me.

webmystery’s picture

I'm a newb - but I managed to find my error log, search on the error and find this post. The file I edited was dated April 20 2009. That's over 6 months old! Why hasn't a simple bug like this been fixed already? It may seem trivial to experienced drupal folk to have to deal with nuisances like this, but for me it seems like I have to spend a lot of time tracking down little hassles like this just to get a Drupal site configured. I worry that this module (exactly what I need - thanks) is not supported. This kind of thing makes learning Drupal feel all the more daunting. Is this like a deliberate kind of hazing to keep lightweights from using Drupal?

webmystery’s picture

Priority: Normal » Critical

For me and some others the incomplete install generates a new problem with imageCache described here: http://drupal.org/node/438714.

I not only got a blank page on the module conformation page. but it hosed my entire Drupal installation until I removed the Option Images folder. I had to start over with a fresh install and the OI installer edit implemented BEFORE I enabled it to get it to work.

SoCalCreations’s picture

I will also CONFIRM this patch fix, HOWEVER according to this POST [http://drupal.org/node/438714#comment-1931464] This patch was supposed to ALREADY be in the download and as of today's date it is NOT. Please update.

Thanks

greg.harvey’s picture

Re: #3, we don't seem to have active maintainance. No response from either maintainer, no commits for 40 weeks. If someone's interested they should see about becoming co-maintainer in a separate issue.

rolandk’s picture

This patch worked for me. thanks.

ragavendra_bn’s picture

It worked as I myself found it also. Please commit............

grub3’s picture

StatusFileSize
new471 bytes

I can confirm this very simple fix works! Please commit.

Attached is a patch to ease maintenance...

acouch’s picture

Version: 6.x-1.4 » 6.x-1.x-dev
Status: Reviewed & tested by the community » Fixed

This has been fixed in the dev version. New release soon.

Status: Fixed » Closed (fixed)

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

plato1123’s picture

Ah the world of Drupal. Popular module has obvious bug that completely brings down the whole install--nobody is authorized to fix it