VirtueMart Forum

VirtueMart 2 + 3 + 4 => Virtuemart Development and bug reports => Topic started by: princessbs on October 11, 2011, 20:43:22 PM

Title: Product Category Image replacement problem
Post by: princessbs on October 11, 2011, 20:43:22 PM
Joomla 1.7.1
Virtuemart 1.98RC 2H
Linux server
PHP 5.2.17
Apache/1.3.42 (Unix) mod_gzip/1.3.26.1a mod_auth_passthrough/1.8 mod_log_bytes/1.2 mod_bwlimited/1.4 FrontPage/5.0.2.2635 mod_ssl/2.8.31 OpenSSL/0.9.8e-fips-rhel5 PHP-CGI/0.9

When trying to replace a product category image, the file name is replaced by a number and an image box with a number but no image.  I have tried different images, no change. I deleted the product category and re-entered it with the proper image and it still behaves the same way and no picture appears.

The name of the image is birdcagecups.jpg, as the image shows it replaced the name with 56. If I try to replace that image it does the same thing and adds more numbers after the original number.


[attachment cleanup by admin]
Title: Re: Product Category Image replacement problem
Post by: Milbo on October 13, 2011, 01:50:14 AM
Hmm strange thing, I just tested it, no problems.
it looks like you are in the media view, but you are in the category view. The available roles should be "no attribute", "downloadable", "product image".

What exactly do you mean with "replace". The available commands are for Image Action: None, upload, replace, replace thumb, create thumb.
Replace can also mean that you use "Attach new Image" and then you just edit all the time the same image. On the other hand the current file should never change. Hmmm
Title: Re: Product Category Image replacement problem
Post by: princessbs on October 13, 2011, 22:09:53 PM
Okay, something very disturbing is happening.  When I try to replace an image, an error message saying the file can't be deleted and then on the front end, the server returns a 500 error. 
I don't have any idea how but the public_html director "mysteriously" changes permissions to 777.

I wouldn't believe this and know I don't communicate the situation very well so if you would like access to my site, I'd be happy to let you in to figure out what is happening.
Title: Re: Product Category Image replacement problem
Post by: jjk on October 14, 2011, 10:18:26 AM
If you have an odd permission problem, the hints below won't help, but...

Looking at your screenshots it looks to me like you did upload a file bearing a mime type other than GIF, JPG, PNG or WBMP which VM2 can't handle or the file didn't have i.e. the .jpg extension. Your second screenshot says that the file you are trying to open is an application/octet-stream. That happens, if the mime/file type is unknown or an executeable file type like .exe or .dll.

There are a few things you can try to solve your problem.

1. Make shure your birdcagecups.jpg is in the folder "images/stories/virtuemart/category. Then go to your 'Product Category Form - Images' tab and type the complete relative url "mages/stories/virtuemart/category/birdcagecups.jpg" into both, the 'Used url' and the 'Used thumb url' fields and click on "Save".
(The 'Used thumb url' path is required if you want to see the thumb image in the 'Attach new image' box and the Media list popup window from which you can select images which are in the database.)

2. If you have access to your database, locate the "56" file in the table _virtuemart_medias and edit that row to show something like:
file_title file_description ... file_mimetype file_type file_url file_url_thumb
birdcagecups         birdcagecups         image/jpeg category images/stories/virtuemart/category/birdcagecups.jpg images/stories/virtuemart/category/birdcagecups.jpg