Author Topic: Still having some issue with images management  (Read 6550 times)

Elnino

  • Beginner
  • *
  • Posts: 47
    • Calgary Web Designer
Still having some issue with images management
« on: October 27, 2011, 18:07:39 pm »
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:

Code: [Select]
        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:

Code: [Select]
/homez.425/bolstibe/www/images/stories/virtuemart/product/ :: Writeable
/homez.425/bolstibe/www/images/stories/virtuemart/product/resized/ :: Writeable

Thanks.

Elnino

  • Beginner
  • *
  • Posts: 47
    • Calgary Web Designer
Re: Still having some issue with images management
« Reply #1 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. 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

  • Beginner
  • *
  • Posts: 47
    • Calgary Web Designer
Re: Still having some issue with images management
« Reply #2 on: October 27, 2011, 18:22:52 pm »
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

  • Beginner
  • *
  • Posts: 47
    • Calgary Web Designer
Re: Still having some issue with images management
« Reply #3 on: October 27, 2011, 18:40:54 pm »
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:

Code: [Select]
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

  • Beginner
  • *
  • Posts: 47
    • Calgary Web Designer
Re: Still having some issue with images management
« Reply #4 on: October 27, 2011, 19:15:35 pm »
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

  • Virtuemart Projectleader
  • Administrator
  • Super Hero
  • *
  • Posts: 9942
  • VM3.2 Cached and Optimized
    • VM3 Extensions
  • VirtueMart Version: VirtueMart 3 on joomla 3
Re: Still having some issue with images management
« Reply #5 on: October 27, 2011, 19:25:52 pm »
Hello Elnino,
lets see

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.

Code: [Select]
        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.

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.

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.

Code: [Select]
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.

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.
I should fix your bug, please support the VirtueMart project and become a member
______________________________________
Extensions approved by the core team: http://extensions.virtuemart.net/

PRO

  • Global Moderator
  • Super Hero
  • *
  • Posts: 10365
  • VirtueMart Version: 3+
Re: Still having some issue with images management
« Reply #6 on: October 27, 2011, 19:32:01 pm »
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.

J3.9+ VM 3.4.2
Slowest Page Speed Score (88) (Category)
Fastest Page Speed Score (94-96) (productdetails)

Milbo

  • Virtuemart Projectleader
  • Administrator
  • Super Hero
  • *
  • Posts: 9942
  • VM3.2 Cached and Optimized
    • VM3 Extensions
  • VirtueMart Version: VirtueMart 3 on joomla 3
Re: Still having some issue with images management
« Reply #7 on: October 27, 2011, 19:44:43 pm »
Also a method BanquetTables.pro
I should fix your bug, please support the VirtueMart project and become a member
______________________________________
Extensions approved by the core team: http://extensions.virtuemart.net/

Elnino

  • Beginner
  • *
  • Posts: 47
    • Calgary Web Designer
Re: Still having some issue with images management
« Reply #8 on: October 27, 2011, 20:02:04 pm »
Hi Milbo,

Thanks for your super quick answer.

Quote
Would be interesting to know your relative urls for the media.

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

Milbo

  • Virtuemart Projectleader
  • Administrator
  • Super Hero
  • *
  • Posts: 9942
  • VM3.2 Cached and Optimized
    • VM3 Extensions
  • VirtueMart Version: VirtueMart 3 on joomla 3
Re: Still having some issue with images management
« Reply #9 on: October 27, 2011, 22:38:40 pm »
/images/stories/virtuemart/product/

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

Milbo

  • Virtuemart Projectleader
  • Administrator
  • Super Hero
  • *
  • Posts: 9942
  • VM3.2 Cached and Optimized
    • VM3 Extensions
  • VirtueMart Version: VirtueMart 3 on joomla 3
Re: Still having some issue with images management
« Reply #10 on: October 28, 2011, 13:55:10 pm »
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
I should fix your bug, please support the VirtueMart project and become a member
______________________________________
Extensions approved by the core team: http://extensions.virtuemart.net/

Elnino

  • Beginner
  • *
  • Posts: 47
    • Calgary Web Designer
Re: Still having some issue with images management
« Reply #11 on: October 28, 2011, 16:50:54 pm »
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

  • Beginner
  • *
  • Posts: 6
    • CPPL
Re: Still having some issue with images management
« Reply #12 on: October 28, 2011, 17:43:28 pm »
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

  • Virtuemart Projectleader
  • Administrator
  • Super Hero
  • *
  • Posts: 9942
  • VM3.2 Cached and Optimized
    • VM3 Extensions
  • VirtueMart Version: VirtueMart 3 on joomla 3
Re: Still having some issue with images management
« Reply #13 on: October 28, 2011, 19:02:19 pm »
Please try the new version, and lets what happens there.
I should fix your bug, please support the VirtueMart project and become a member
______________________________________
Extensions approved by the core team: http://extensions.virtuemart.net/

manuelgc

  • Beginner
  • *
  • Posts: 1
Re: Still having some issue with images management
« Reply #14 on: February 07, 2012, 16:43:57 pm »
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.

 :)