News:

Looking for documentation? Take a look on our wiki

Main Menu

Still having some issue with images management

Started by Elnino, October 27, 2011, 18:07:39 PM

Previous topic - Next topic

Elnino

Hi there,

Running Joomla 1.7.1 + VM RC 2.0J

My thumbnail was 90 x 90 by default. I already had an image for a product. I changed these settings in config tab to be 120 x 120.
I went back to product images tab, select my picture again on my computer than select "Replace thumb" in the option then click save.

Then I got this error message:

        File /homez.425/bolstibe/www/images/stories/virtuemart/product/resized/BOL GANESH 2.jpg uploaded
        File could not be deleted

        Failed deleting www


I thought maybe the blank in the file name is an issue.

The following are writeable:

/homez.425/bolstibe/www/images/stories/virtuemart/product/ :: Writeable
/homez.425/bolstibe/www/images/stories/virtuemart/product/resized/ :: Writeable


Thanks.

Elnino

After this error message, my thumbnail in Product Images tab has been replaced by the real big image. It then screws up the layout of the page but the biggest prob is that it overlaps the red cross button of the thumb: then I just can't delete this image any more. If something like this appear at least you might want to change the position of the red cross button or change the z-index of this red cross so that it always appears at the top.

I had to manually delete the file on the FTP to make the red cross appear again and delete the image info of the database for this product.

Elnino

New update:

Now I removed the image from the FTP + I deleted the image of the db by clicking the red cross I've got a 500 internal server error on the front-end ... I will restore the default VM2 settings and continue my testings.

Thanks.

Elnino

By searching where my 500 internal server error comes from I've tried to uninstall all VM2 component, plugin and modules and I got the following error message:

Warning: require_once(/homez.425/bolstibe/www/administrator/components/com_virtuemart_allinone/helpers/config.php) [function.require-once]: failed to open stream: No such file or directory in /homez.425/bolstibe/www/administrator/components/com_virtuemart/install/script.virtuemart.php on line 35

Fatal error: require_once() [function.require]: Failed opening required '/homez.425/bolstibe/www/administrator/components/com_virtuemart_allinone/helpers/config.php' (include_path='.:/usr/local/lib/php') in /homez.425/bolstibe/www/administrator/components/com_virtuemart/install/script.virtuemart.php on line 35


After few search I noticed that my permission changed on my root directory from 755 to 777 which causes this 500 error ... I doubt that VM can change the directories permission so I wonder why this error appears after deleting the picture. By accessing the FTP to manually delete the pic I'm sure I did not change the permission. Weird. Any idea ?

Elnino

Hey guys,

I'm spamming my own topic here. Sorry about that.

I just noticed another little bug; now I understood the thumb replacement bug and so on I manage to do a little bit what I want without creating any bug.
I then changed the thumbnail config from 90 x 90 to 160 x 160 now.

It works great, only prob is similar to what I've described earlier: the class vm_thumb_image in the admin is static and does not adapt to thumbnail size config. So the thumb is once again overlapping the red cross and the "edit image information" button. So of course I can change height and width of this class to be 180 instead of 120 but it should be dynamic and be changed regarding thumbnail size config.

Milbo

Hello Elnino,
lets see

Quote from: Elnino on October 27, 2011, 18:07:39 PM
My thumbnail was 90 x 90 by default. I already had an image for a product. I changed these settings in config tab to be 120 x 120.
I went back to product images tab, select my picture again on my computer than select "Replace thumb" in the option then click save.
Just for the future, when you do that next time, the new thumbnail gets automatically generated, when it is not there. So the system is looking for 120x120, it is not there and it gets generated. The only problem is that you have then an unused file on your harddisk. But for this we want to provide a clean up tool.

Quote from: Elnino on October 27, 2011, 18:07:39 PM
        File /homez.425/bolstibe/www/images/stories/virtuemart/product/resized/BOL GANESH 2.jpg uploaded
        File could not be deleted

        Failed deleting www


I thought maybe the blank in the file name is an issue.
hmmm it maybe the dot in homez.425, of course an error, but this would be a hint, so I know where to look for. Your filename is recognised as www, strange thing.

Quote from: Elnino on October 27, 2011, 18:18:54 PM
After this error message, my thumbnail in Product Images tab has been replaced by the real big image.

This is "right" that way, when you replace the thumb itself with a big image, the thumb is a big image.

Quote from: Elnino on October 27, 2011, 18:18:54 PM
It then screws up the layout of the page but the biggest prob is that it overlaps the red cross button of the thumb: then I just can't delete this image any more.
Yeah, we did not thought about that someone could do this error, but of course, it was from your point quite reasonable. Lets see if Patrick has an idea to prevent this.

Quote from: Elnino on October 27, 2011, 18:40:54 PM
Warning: require_once(/homez.425/bolstibe/www/administrator/components/com_virtuemart_allinone/helpers/config.php) [function.require-once]: failed to open stream: No such file or directory in /homez.425/bolstibe/www/administrator/components/com_virtuemart/install/script.virtuemart.php on line 35

Fatal error: require_once() [function.require]: Failed opening required '/homez.425/bolstibe/www/administrator/components/com_virtuemart_allinone/helpers/config.php' (include_path='.:/usr/local/lib/php') in /homez.425/bolstibe/www/administrator/components/com_virtuemart/install/script.virtuemart.php on line 35


Interesting, but this errors shouldnt have anything todo with the 500,777 delete problem.

Quote from: Elnino on October 27, 2011, 18:40:54 PM
After few search I noticed that my permission changed on my root directory from 755 to 777 which causes this 500 error ... I doubt that VM can change the directories permission so I wonder why this error appears after deleting the picture.

You are the 4th now with this error. Of course we never change the permission of the files. It happens, when you delete an image, somehow the path is not correct. Would be interesting to know your relative urls for the media.
Should I fix your bug, please support the VirtueMart project and become a member
______________________________________
Extensions approved by the core team: http://extensions.virtuemart.net/

PRO

For cleaning up the folder, I just empty the resized folder.

Then change the thumbnail size, and when the front end page refreshes. The thumbs are created.


Milbo

Should I fix your bug, please support the VirtueMart project and become a member
______________________________________
Extensions approved by the core team: http://extensions.virtuemart.net/

Elnino

Hi Milbo,

Thanks for your super quick answer.

QuoteWould be interesting to know your relative urls for the media.

Why do you mean by relative? Is that not: /images/stories/virtuemart/product/ ?

Milbo

/images/stories/virtuemart/product/

yes is right, that is the relative url from your domain to your product images
Should I fix your bug, please support the VirtueMart project and become a member
______________________________________
Extensions approved by the core team: http://extensions.virtuemart.net/

Milbo

We didnt solved the issue yet, but the version in the svn, does not lead to a 500 error anymore, but the file is still not deleted. I think it has something todo with the serverconfig, because it works on my local apache. More hints are welcome
Should I fix your bug, please support the VirtueMart project and become a member
______________________________________
Extensions approved by the core team: http://extensions.virtuemart.net/

Elnino

Hi Milbo,

I can't tell you a lots more on the server except that it's provided by a French shared hosting company named OVH (ovh.fr).
You have the absolute path already ...

I don't know, what would you need to help you out ?

cppl

I just installed a clean J1.7.2 and the VM2J package into a sub-directory (/shop) on one of our Rochen MVS's.

The only thing I did was try to setup a manufacturer and load a logo image for them. I realised I'd loaded the wrong logo file and tried to replace it with another with a different file name. After pressing "Save" things went wrong.

The the server started returning 500 errors for the entire J1.7.2 directory ie. /shop - quick check showed that the permissions for the directory had been changed to 777.

After changing the directory back to 755 I was able to refresh the J1.7.2 /administrator page successfully but there were 3 messages from before the permissions problem waiting for me:

File /home/cppl01/public_html/shop/images/stories/virtuemart/manufacturer/resized/logo.png uploaded
File could not be deleted


Failed deleting shop

Manufacturer successfully saved
Craig Phillips
craig@craigphillips.biz

Syd:     +61-2-8090-5408
Bris:     +61-7-3056-1992

Milbo

Please try the new version, and lets what happens there.
Should I fix your bug, please support the VirtueMart project and become a member
______________________________________
Extensions approved by the core team: http://extensions.virtuemart.net/

manuelgc

Hi, I have the same problem as they say, I was reviewing the code, specifically the file "mediahandler.php" located in "administrator / components / com_virtuemart / helpers /" and I think there is one detail in the DeleteFile method.

The method gets the path to the thumbnail but not get the thumbnail file name, I suppose that by failing to file method "JFile :: delete" returns false and does not delete the file.

When the method "processAction" calls "deleteFile" is passed as a parameter the path to thumbnail, but not the file name, I know how to bring the name before deleting thumbnail to pass it to method and so delete the file.

:)