Needs work
Project:
Ubercart Option Images
Version:
6.x-1.x-dev
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
17 Jan 2011 at 22:32 UTC
Updated:
27 Oct 2011 at 14:33 UTC
Hi
Please find attached a mega patch that
a) fixes this issue #955062: Option Images Capping my option amount at 15
b) Rewrites the whole module to adhere to coding standards (passes coder test)
c) Rewrites the JS to use Drupal's behaviors (the Drupal way!)
If you're looking for help maintaining this I'm happy to put hand up as a co-maintainer.
Also attached fully patched version of the module for those not familiar with patches.
Thanks to Website Express for sponsoring this.
Lee
| Comment | File | Size | Author |
|---|---|---|---|
| Patched module | 18.95 KB | larowlan | |
| Mega Patch | 40.54 KB | larowlan |
Comments
Comment #1
larowlanFYI the upload limit issue is overcome by not showing file upload fields for images that have already been uploaded. So if you've got 40 uploads and a max_file_uploads php config of 20, you'll still have to do it in 2 goes but at least you can do it.
Also this means to override an existing image, you've got to remove the old one first.
Comment #2
aju3169 commentedExcellent, I'll try it now and report back.
Comment #3
aju3169 commentedLooked good and seemed to be working until I got to 56 options. After that, no more would upload. Other bugs:
(1) A long list of no image pictures appears at the end of the options mixed up with the submit button.
(2) Previously loaded images appear as blanks and the remove function doesn't delete them. So I cannot change the image. I even tried removing the option and then adding it back. This removes the blank image giving the upload option - but the image upload fails.
You are getting close though!
Comment #4
SeanK commentedIs there an easy way to gather the results of the Available updates page? I'm thinking that we could resolve these items faster if we could also see what people are using when having problems. Obviously none of us are running a "stock" Drupal install with only this module added.
I have been trying it with a UberDrupal profile, upgraded to the latest modules, plus UCOI (this thread), and a couple more. This is a pain to get manually.
Drupal core 6.20
Administration menu 6.x-1.6
Content Construction Kit (CCK) 6.x-2.9
Devel 6.x-1.23
FileField 6.x-3.9
ImageAPI 6.x-1.9
ImageCache 6.x-2.0-beta10
ImageField 6.x-3.9
Poormanscron 6.x-2.2
skinr 6.x-1.6
token 6.x-1.15
ubercart 6.x-2.4
Ubercart Option Images 6.x-1.x-dev (2010-Dec-27)
Acquia Prosper 6.x-1.1
Fusion 6.x-1.0
Comment #5
aju3169 commentedI got this to work. Prior to installing the mega patch in post #1, I had deleted the old images of the options manually (via ftp) but I hadn't deleted them from the database. Using the option image module to remove the images didn't work because the images were not on the server anymore. So I then manually deleted them from the file table in the database. This fixed the empty image problem. Because I have 6 separate attributes for each product, I had to temporarily remove all the attributes except the one I needed to upload optional images for, I was then able to load the 114 images (20 at at a time) for this attribute. I now need to repeat the process for the other 5 attributes (although they have far less options). One thing I noticed is that you need to load each option image in the order they appear, ie don't skip any and leave a gap. Otherwise they will not upload.
Comment #6
aju3169 commentedI wanted to change some images. The delete option did not work so I needed to delete the images from the database and on the server manually.
Comment #7
broncomania commentedHmm still not working in my case. I get a javascript error: imageproperty is undefined
What does this mean?
Comment #8
pillarsdotnet commented@larowlan: I've fixed all the coder gripes; please re-submit your patch relative to the current 6.x-1.x checkout.
Comment #9
dorys commentedI'm having this issue where I needed to update about 100 option images, however, I could not delete the original image. I then went to 6x.1.x-dev and lost all my images in the preview and on the product. No Image pic showed up on each attritute. I started to re-uploaded the images but got stuck at 20 images. I have to upload only 2 images at a time so took a while.
Also, I had lost the preview images so I uploaded the no image preview patch here. I was then able to see image preview however, I still could not upload more images past the 20.
I just uploaded the module in #1 here, the 20 new images are showing up and the original images are now showing both in preview and when clicked on the attribute on the product page, however, now I can't replace the old images with the new ones. The "remove" check box doesn't work.
So I'm back to square 1, need to remove and replace 100+ images.
Also, where are the option images located in the mysql db? I can't a table for uc_option_images. The only place i see them is in the folder under imagecache/option-images which I can delete via ftp?
Thanks
Comment #10
cybis commented@dorys, see #334815: unable to delete images
Comment #11
dorys commentedthat patch failed to load. I'm using the module from http://drupal.org/node/1030442
patching file uc_option_image.module
Hunk #1 FAILED at 152.
Hunk #2 FAILED at 527.
Hunk #3 FAILED at 740.
Hunk #4 FAILED at 758.
4 out of 4 hunks FAILED -- saving rejects to file uc_option_image.module.rej
Comment #12
cybis commented@dorys, the module here is obsolete. The latest dev should have incorporate most the change proposed here. The patch over at #334815: unable to delete images should work against the latest dev.
Comment #13
dorys commentedThat may be true but when I installed the latest dev version I lost all my preview images. Not only that, all the option images on teh product pages then showed the "no image.png" pic. I then installed the fix for this http://drupal.org/node/1206192 and then I was stuck at 20 uploads max, 2 at a time.
I'm going to start over with the new dev version and see what happens. I'll report back shortly.
Comment #14
dorys commentedOk, I uploaded the lastest dev version and added the "unable to delete images" patch. I uploaded to my site and had no image previews, lost all option images on the product pages except for the original 20 I was able to upload yesterday. I tried to add another image but was unable to.
I added the patch on #1206192 for image preview and the 20 images now show up in both the product page and the edit page. However I cannot add any further images.
Now what?
Comment #15
dorys commentedI was able to fix my 20 max issue by adding max_file_upload = 100 to the php.ini file.