Page load error when attempting to enable module
tjmoyer - April 20, 2009 - 02:37
| Project: | Ubercart Option Images |
| Version: | 6.x-1.4 |
| Component: | Miscellaneous |
| Category: | bug report |
| Priority: | critical |
| Assigned: | Unassigned |
| Status: | needs review |
Description
I have been trying to simply enable the Ubercart Option Images module, but keep receiving the following page load error message:
Connection Interrupted
The connection to the server was reset while the page was loading.
The network link was interrupted while negotiating a connection. Please try again.
I can't figure out what the issue is. All the necessary Ubercart modules have been enabled, and this is the latest stable version of Drupal. Any help/suggestions would be much appreciated.

#1
Note: I am using Imagecache version 6.x-2.0-beta9. Not sure if that makes a difference.
#2
Check your error log. If there are any lines that have "uc_option_image" in them, copy them here; thanks.
#3
I believe this is a duplicate of #436024: Corrections for install file which is fixed by release 6.x-1.3.
#4
#5
Ok, so I made the updates with the patch from the other post you referenced. But I'm still getting the same problem. Here's entry from my Apache error log:
This is the exact same error before and after the patch.
#6
I removed the 6.x-1.2 files and attempted to install 6.x-1.3. I made the correction noted in post http://drupal.org/node/439804, but now I'm getting the following error:
There are no errors in my Apache error log. Any ideas?
#7
Sounds almost as though uc_option_image.module isn't available at installation time, for some reason. I'm afraid I don't know anything about WAMP, so I can't suggest how to debug this. It installs fine (with the install file patch) on Linux and OS X, FWIW.
#8
Yup. the .module file isn't available on first install; just on upgrades. Fixed in 1.4.
#9
When attempting to install uc_option_image 6.x-1.4 today I got a syntax error on line 11 of the file uc_option_image.install.
Cracked open the file and noticed the code looked like this for lines 8-19:
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);
}
Notice the semi-colon the end of line 11, I deleted that and changed it to a comma. After that the module installed properly.
Correct code for lines 8-19:
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);
}
#10
Committed to CVS.
#11
Thank you very much! It's working now. My only issue now is that when I have added a product and attribute options, the option that I selected as default does not show that default selected or the default image when you look at the product, only when you select an option.
#12
For historical sake, and for helping others you should not change the title :P
#13
Try un-checking the "required" check box for the attribute. If an attribute is set to required Ubercart ignores the default options making the user select an option.
#14
Automatically closed -- issue fixed for 2 weeks with no activity.
#15
I am still getting the error on line 11
Parse error: syntax error, unexpected ';', expecting ')' in /home/sawingl1/public_html/sites/all/modules/uc_option_image/uc_option_image.install on line 11
Downloaded on 6/30/09 to Drupal 6
#16
modules\ubercart\uc_option_image\uc_option_image.install
Line 11, syntax error, ending character in line should be a comma (,) instead of semi-colon (;)
#17
I'm having the same problem the images aren't showing up in the product page when I choose the select or radio buttons. The image shows up in the preview. It might be a url issues seems the image src is missing the project name befores sites/..../option-images folder. Any suggestions? I poked around in the code for a bit but couldn't figure it out still a newb at php and drupal.
#18
Here's my hack "/MYPROJECTNAME/" for fixing this issue. I hate hacks like this but I couldn't figure out why my project name was missing in the path and I dont' have time to figure it out in the .module or in drupal, have to get this site out. Hopefully this doesn't come back on me. If anyone knows why this is happening I'd love an email or response. I had to do a similar fix in the uc_radio_options module.
// Original without URL hack
UCOI.switchImageEffect = function(image, imagepath) {
switch(this.effect){
case 'fade':
$(image).fadeOut(200, function(){
$(this).attr('src', imagepath).fadeIn(200);
});
break;
default:
$(image).attr('src', imagepath);
}
};
// With URL hack
UCOI.switchImageEffect = function(image, imagepath) {
switch(this.effect){
case 'fade':
$(image).fadeOut(200, function(){
$(this).attr('src', '/MYPROJECTNAME/' + imagepath).fadeIn(200);
});
break;
default:
$(image).attr('src', '/MYPROJECTNAME/' + imagepath);
}
};
#19
I'm having the same problem. On install of 6.x-1.4 I get the error code:
Parse error: syntax error, unexpected ';', expecting ')' in /sites/all/modules/uc_option_image/uc_option_image.install on line 11.
#20
quick patch to remove the semicolon in 6.x-1.4.
Info on applying patches here: http://drupal.org/patch/apply
#21
Much thanks to those who have made patches.
Will try to review and apply tomorrow.
#22
Quick reminder, this patch still needs to be applied
#23
bump for the patch needing to be applied.
glad I found this thread though.
#24
Bumpin this too
#25
It's in the patch and full version in this thread: http://drupal.org/node/550344
I still can't get it to work in whole, but the installer problem is fixed. Every option shows me the text "no image".