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.

CommentFileSizeAuthor
#20 uc_option_image_438714_20.patch693 bytesscottrigby

Comments

tjmoyer’s picture

Note: I am using Imagecache version 6.x-2.0-beta9. Not sure if that makes a difference.

pillarsdotnet’s picture

Status: Active » Postponed (maintainer needs more info)

Check your error log. If there are any lines that have "uc_option_image" in them, copy them here; thanks.

pillarsdotnet’s picture

Status: Postponed (maintainer needs more info) » Closed (duplicate)

I believe this is a duplicate of #436024: Corrections for install file which is fixed by release 6.x-1.3.

pillarsdotnet’s picture

Version: 6.x-1.2 » 6.x-1.3
Status: Closed (duplicate) » Fixed
tjmoyer’s picture

Version: 6.x-1.3 » 6.x-1.2
Status: Fixed » Active

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:

[Mon Apr 20 20:45:27 2009] [notice] Parent: child process exited with status 3221225477 -- Restarting.
[Mon Apr 20 20:45:32 2009] [notice] Apache/2.2.11 (Win32) PHP/5.2.9-1 configured -- resuming normal operations
[Mon Apr 20 20:45:32 2009] [notice] Server built: Dec 10 2008 00:10:06
[Mon Apr 20 20:45:33 2009] [notice] Parent: Created child process 7148
[Mon Apr 20 20:45:34 2009] [notice] Child 7148: Child process is running
[Mon Apr 20 20:45:34 2009] [notice] Child 7148: Acquired the start mutex.
[Mon Apr 20 20:45:34 2009] [notice] Child 7148: Starting 64 worker threads.
[Mon Apr 20 20:45:34 2009] [notice] Child 7148: Starting thread to listen on port 80.

This is the exact same error before and after the patch.

tjmoyer’s picture

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:

Fatal error: Call to undefined function uc_option_image_delete() in C:\wamp\www\drupal\sites\all\modules\uc_option_image\uc_option_image.install on line 17

There are no errors in my Apache error log. Any ideas?

jerry’s picture

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.

pillarsdotnet’s picture

Version: 6.x-1.2 » 6.x-1.4
Status: Active » Fixed

Yup. the .module file isn't available on first install; just on upgrades. Fixed in 1.4.

SethM’s picture

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);
  }
pillarsdotnet’s picture

Committed to CVS.

tjmoyer’s picture

Title: Page load error when attempting to enable module » Thanks for v.1.4 -- it's working!

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.

tjholowaychuk’s picture

Title: Thanks for v.1.4 -- it's working! » Page load error when attempting to enable module

For historical sake, and for helping others you should not change the title :P

SethM’s picture

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.

Status: Fixed » Closed (fixed)

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

slipsey1’s picture

Status: Closed (fixed) » Needs work

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

ianc60’s picture

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 (;)

mtpultz’s picture

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.

mtpultz’s picture

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);
  }
};
jponch’s picture

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.

scottrigby’s picture

Status: Needs work » Needs review
StatusFileSize
new693 bytes

quick patch to remove the semicolon in 6.x-1.4.

Info on applying patches here: http://drupal.org/patch/apply

pillarsdotnet’s picture

Much thanks to those who have made patches.

Will try to review and apply tomorrow.

Michael Phipps’s picture

Quick reminder, this patch still needs to be applied

JakobMetzger’s picture

bump for the patch needing to be applied.

glad I found this thread though.

zapscribbles’s picture

Bumpin this too

SeanK’s picture

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".

CarbonPig’s picture

Hi,

I'm having a slightly different issue, but it falls within the general category of this thread.

I did the same thing that SethM did in #9, but afterwards I ran into this:

Fatal error: Cannot redeclare imagecache_create_url() (previously declared in .../html/modules/uc_option_image/uc_option_image.module:305) in .../html/sites/all/modules/imagecache/imagecache.module on line 325

It appears that something is being "redeclared" anyone else run into this issue? Any thoughts on how to troubleshoot. Any suggestions would be greatly appreciated.

Here's what I did so far:

I removed the ; and put a , like post #9.

I deleted the module from my directories and cleared it from my database under the system table.

I tried reinstalling, but ran into the same error.

Thanks ahead of time for any help,

CarbonPig

1kenthomas’s picture

Ditto comment on previous thread-- @pillarsdotnet-- is this project being actively maintained?

webmystery’s picture

Ditto CarbonPig. Identical experience.

Even after removing both imageCache and UC Option Image 1.4 and then reinstalling both I got the same "redeclared" error.

To get it to work I started with a fresh Drupal install, then installed only Image Cache, UC and Token. Then I installed UC Option Images with line 11 of the install file fixed BEFORE I tried to enable it. That is the only way I could get it to work. IMHO, this means the other bug, http://drupal.org/node/590850, should have a higher priority. It appears that the incomplete install hoses something that generates the ImageCache error:

acouch’s picture

Version: 6.x-1.4 » 6.x-1.x-dev
Status: Needs review » Fixed

This should be fixed now in the latest dev version. New release soon.

Status: Fixed » Closed (fixed)

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