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

tjmoyer - April 20, 2009 - 03:38

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

#2

pillarsdotnet - April 20, 2009 - 18:38
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.

#3

pillarsdotnet - April 20, 2009 - 18:57
Status:postponed (maintainer needs more info)» duplicate

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

#4

pillarsdotnet - April 20, 2009 - 18:58
Version:6.x-1.2» 6.x-1.3
Status:duplicate» fixed

#5

tjmoyer - April 21, 2009 - 01:03
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.

#6

tjmoyer - April 21, 2009 - 01:38

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?

#7

jerry - April 21, 2009 - 02:08

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

pillarsdotnet - April 21, 2009 - 04:03
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.

#9

freeStyle_Media - April 21, 2009 - 20:52

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

pillarsdotnet - April 21, 2009 - 22:09

Committed to CVS.

#11

tjmoyer - April 22, 2009 - 01:25
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.

#12

tjholowaychuk - April 22, 2009 - 15:31
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

#13

freeStyle_Media - April 23, 2009 - 07:00

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

System Message - May 7, 2009 - 07:00
Status:fixed» closed

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

#15

slipsey1 - June 30, 2009 - 22:57
Status:closed» 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

#16

ianc60 - July 13, 2009 - 12:59

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

mtpultz - August 5, 2009 - 09:48

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

mtpultz - August 6, 2009 - 04:42

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

sprocketjared - August 10, 2009 - 13:16

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

scottrigby - August 16, 2009 - 21:01
Status:needs work» needs review

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

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

AttachmentSize
uc_option_image_438714_20.patch 693 bytes

#21

pillarsdotnet - August 17, 2009 - 01:02

Much thanks to those who have made patches.

Will try to review and apply tomorrow.

#22

InternetPro - August 28, 2009 - 11:21

Quick reminder, this patch still needs to be applied

#23

JakobMetzger - September 22, 2009 - 03:35

bump for the patch needing to be applied.

glad I found this thread though.

#24

squiggle86 - September 25, 2009 - 06:34

Bumpin this too

#25

SeanK - September 28, 2009 - 00:12

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

 
 

Drupal is a registered trademark of Dries Buytaert.