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
Comments
Comment #1
minneapolisdan commentedThanks, that helped. I'm trying this module out and reading up on the bugs.
Comment #2
philbar commentedConfirmed the bug and reviewed the change.
Now the fix just needs to be committed.
Comment #3
1kenthomas commentedDitto-ing comment elsewhere (mainly to get this on my issues list): do we have active maintenance?
Comment #4
greg.harvey+1, this fixed it for me.
Comment #5
webmystery commentedI'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?
Comment #6
webmystery commentedFor 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.
Comment #7
SoCalCreations commentedI 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
Comment #8
greg.harveyRe: #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.
Comment #9
rolandk commentedThis patch worked for me. thanks.
Comment #10
ragavendra_bn commentedIt worked as I myself found it also. Please commit............
Comment #11
grub3 commentedI can confirm this very simple fix works! Please commit.
Attached is a patch to ease maintenance...
Comment #12
acouch commentedThis has been fixed in the dev version. New release soon.
Comment #14
plato1123 commentedAh the world of Drupal. Popular module has obvious bug that completely brings down the whole install--nobody is authorized to fix it