Post by boraz » Sun Aug 31, 2008 8:01 am

I can't delete or change image's file. I've upgraded to version 0.7.8 and the problem still exists. When i'm trying to delete the image's entry it's actually removed from the database but the image FILE still sits in image and cache folders. It's also impossible to update image with a new one (new image won't even upload). Why does nobody report it? Could anyone fix this, please?
Last edited by boraz on Sun Aug 31, 2008 8:05 am, edited 1 time in total.

Newbie

Posts

Joined
Tue Jul 29, 2008 5:37 am

Post by Luvz2drv » Sun Aug 31, 2008 9:19 am

boraz wrote: I can't delete or change image's file. I've upgraded to version 0.7.8 and the problem still exists. When i'm trying to delete the image's entry it's actually removed from the database but the image FILE still sits in image and cache folders. It's also impossible to update image with a new one (new image won't even upload). Why does nobody report it? Could anyone fix this, please?
fastest fix is to rename you file that you are goign to upload or use FTP and delete the image  form the images folder

Global Moderator

Posts

Joined
Fri Mar 21, 2008 10:58 am

Post by jty » Sun Aug 31, 2008 5:29 pm

Do you have a permissions problem?
I just installed on my web host for the first time today and I encountered permission problems. I ended up setting permissions to my images folders to 777  ::)

jty
Active Member

Posts

Joined
Sat Aug 30, 2008 8:19 am

Post by boraz » Sun Aug 31, 2008 7:38 pm

jty wrote: Do you have a permissions problem?
I just installed on my web host for the first time today and I encountered permission problems. I ended up setting permissions to my images folders to 777   ::)
My images folder is set to 777 also. Images are uploading without a problem, but i can't delete them or update.
Luvz2drv - yes, that's the fastest fix, but i'd like the image module to actually work. Maybe anyone could check what's wrong with the code and suggest another fix? This is really annoying. Thanks
Maybe the imagefile itself needs to have chmod 777 so it can be deleted?
Last edited by boraz on Sun Aug 31, 2008 8:26 pm, edited 1 time in total.

Newbie

Posts

Joined
Tue Jul 29, 2008 5:37 am

Post by jty » Sun Aug 31, 2008 8:48 pm

boraz wrote: Maybe the imagefile itself needs to have chmod 777 so it can be deleted?
I was going to suggest this. Not only set the permission for the folder but also set the permission for the files
I had my image folder set to 666 (I think it was set to 666). This resulted in my image files set to 000. I've never seen a 000 before
I then set my folder permission to 777 but the files stayed at 000. I had to set the permissions for the "files" to fix it.

jty
Active Member

Posts

Joined
Sat Aug 30, 2008 8:19 am

Post by boraz » Mon Sep 01, 2008 2:05 am

Ok, my dir and files are now chmod to 777 with

Code: Select all

	chmod(DIR_IMAGE . $upload->getName('image'), 0777); 
but i'm still unable to delete them or update  :(
I've searched the forums and found that when removing 'if' condition from

Code: Select all

if ($upload->has('image')) {
        		$sql = "update image set filename = '?' where image_id = '?'";
        		$database->query($database->parse($sql, $upload->getName('image'), $request->get('image_id')));
      		}
the update succesfully works. Can anyone explain me why that's happening?
I'd be really thankfull.
Last edited by boraz on Mon Sep 01, 2008 2:07 am, edited 1 time in total.

Newbie

Posts

Joined
Tue Jul 29, 2008 5:37 am

Post by hm2k » Sat Dec 20, 2008 1:44 am

Not sure if this was solved, so see here:

http://forum.opencart.com/index.php/top ... l#msg12826

UK Web Hosting


User avatar
Global Moderator

Posts

Joined
Tue Mar 11, 2008 9:06 am
Location - UK

Post by yl » Fri Jan 02, 2009 5:35 am

I use o.7.9 rc5. I want to delete an image from admin/catalog/images, as I have the product deleted. I am not able to do it because it said "This Image cannot be deleted as it is currently assigned to 11 categories! or it would say assigned to manufacturer". Is there any coding to take this action effectively?

yl
New member

Posts

Joined
Tue Nov 25, 2008 6:46 am

Post by bruce » Fri Jan 02, 2009 5:55 am

My suggestion is to upload an "image coming soon" type image and/or a transparent single pixel image as a "no image" placeholder and apply that image to your manufacturers and categories. After doing this, you should be able to delete your unused product image.

Active Member

Posts

Joined
Wed Dec 12, 2007 2:26 pm

Post by Qphoria » Fri Jan 02, 2009 6:21 am

I haven't tested this, but adding a "blank" option for the image drop down and setting it to that value should release the image if you set each of the 11 categories to blank

See here how to add a blank (or no image) option
http://forum.opencart.com/index.php/top ... l#msg12255

Or

Are you asking if there is a way to force the delete and automatically delete the reference to this image in the database? It could be done but is not yet implemented

Image


User avatar
Administrator

Posts

Joined
Tue Jul 22, 2008 3:02 am

Post by yl » Sat Jan 03, 2009 1:21 am

Thank you both of you. It did solve the problem. 

Yes, Q. It is it... it will be more functional.

yl
New member

Posts

Joined
Tue Nov 25, 2008 6:46 am
Who is online

Users browsing this forum: No registered users and 7 guests