Page 1 of 2

I Have Lost My Images.... [SOLVED]

Posted: Sat Oct 30, 2010 9:01 pm
by Adrian666
I have reinstalled a fresh copy of open cart as i had major issues when moving my images to a subdomain...

I had successfully edited the 2 config.php files and pointed them to my NEW subdomain which was fine for all images other than ones I had personally uploaded: (Product Images and logo ohh and favicon) they are not working!!

stlysheet images (../images/example.jpg) - ALL OK!!
Logo (Not Visable)
Products (Not Visable)
Favicon (Not Visable)

Now in my admin i can upload any image and it saves to the new dir but the store front is using the old dir to ask for the file names... the image below explains it all...

p.s
I have copied all the images to my new subdomain but opencart will not load them... im 100% their is something missing in this problem to move images onto another subdomain. (Someone further in the thread mentioned the imapge.php file!!) >>>???????????


Image

Re: I Have Lost My Images....

Posted: Sun Oct 31, 2010 3:09 am
by Adrian666
anyone O0

Re: I Have Lost My Images....

Posted: Sun Oct 31, 2010 7:24 am
by ausdev
I have something similar. The missing image thing kind of resolved itself after a while, it was replaced by the standard no_image image in the admin panel. But I still have 3000 images that won't show on the front page. The image names are all fine in the database, but appear blank (img src="") on the front page. Is this what you have?

Re: I Have Lost My Images....

Posted: Sun Oct 31, 2010 8:01 am
by Adrian666
yes my code says <img scr="" yada yada />

my issuse was editing the 2 config. php files, can somebody please please clarify what needs to be changed. To successfully move all images to a subdomain...

thanks for any help asap!!

Re: I Have Lost My Images....

Posted: Sun Oct 31, 2010 8:07 am
by ausdev
I didn't edit the configs. I installed a new opencart on the web server, downloaded the two configs, deleted the new opencart, then uploaded my opencart and replaced the two configs with the new ones.

Also keep in mind that you have to go to the settings in Admin and change the URL of the site from localhost to the new URL.

Re: I Have Lost My Images....

Posted: Sun Oct 31, 2010 8:28 am
by Adrian666
what settings are they :) :) :)

Re: I Have Lost My Images....

Posted: Sun Oct 31, 2010 9:01 am
by billyggla
admin/model/tool/image.php

I think theres something to do with the image path/directory in that file when they are resized..

Re: I Have Lost My Images....

Posted: Sun Oct 31, 2010 9:09 am
by Adrian666
this is what i thought but i can see anything in their.... i know 100million % just the 2 config files aint enough

THANKS - anyone have any clue where to edit in this new image.php file ??

Re: I Have Lost My Images....

Posted: Sun Oct 31, 2010 9:57 am
by ausdev
Adrian,

The setting I was talking about is in system - settings - general tab - store URL.

If you still have problems, can you FTP to your site,

Go to System - settings - image tab.

What is the "product image thumb size" set to?

Then FTP to your site and look in the image/cache/data folder. What are the last parts of the file names of the images in this folder? Do they match up to your image size settings?

(mine do not)

Just a thought: http://code.google.com/p/opencart/issues/detail?id=188

Re: I Have Lost My Images....

Posted: Sun Oct 31, 2010 5:53 pm
by Adrian666
I know my store is the problem but Im sure its doen to a single file.
After i have uploaded an image.... the file gets uploaded to:
http://img.mydomain.co.uk/data/fav.png - and i can see it in the admin!
Basically on all aspects of the backend...

But when i look at the store front its still requesting the old url. I
http://www.mydomain.co.uk/data/fav.png

it is the image.php that still needs changing - can anyone suggest what to change...... ???

Re: I Have Lost My Images....

Posted: Sun Oct 31, 2010 7:41 pm
by i2Paq
How difficult can it be!
* Always mention version of your OpenCart!
*Always include a link if you are having a store front issue!

Re: I Have Lost My Images....

Posted: Mon Nov 01, 2010 7:54 am
by Adrian666
not very...

Version 1.4.9.1
http://www.g a m e r s limited.co.uk (Remove Spaces)

Re: I Have Lost My Images....

Posted: Tue Nov 02, 2010 2:52 am
by Adrian666
anyone???? ive had no store images for over 2 weeks, does open cart have a dedicated support team i can contact?

Re: I Have Lost My Images....

Posted: Tue Nov 02, 2010 2:59 am
by dbe
To me it seems as if you're having a theme issue mate...

When I select something on your navigation bar, I get the following:
Image

As you can see, your categories are showing up twice in the list.
I guess your imaging problem is not the only thing you should worry about.

Did you create the theme yourself, or did someone create it for you?

Greets

Re: I Have Lost My Images....

Posted: Tue Nov 02, 2010 4:24 am
by Adrian666
no the 2nd link is the <a href> alt tags. Its my store front which is requesting the old url... so the html looks like <img src="" /> as the template is looking for the old image url.

Re: I Have Lost My Images....

Posted: Tue Nov 02, 2010 9:24 pm
by Adrian666
Bump any help peeps :)

Re: I Have Lost My Images....

Posted: Tue Nov 02, 2010 9:34 pm
by Qphoria
Not fully sure what is happening here. It looks like you are using a subdomain for images, haven't tried that myself but should work. Did you have these in another store at some point? Images used to be stored in image/ root path until 1.4.4 I think. The filemanager was added and for some reason it would not work with images in the root image/ path so they had to be added to image/data.

But if you upgraded from an existing store, the db record would look for just "image.jpg". While new products would use "data/image.jpg"

So it is possible if you moved your db over that is looking for images in the root, but uploaded all images to the data subfolder. But maybe I'm wrong.

If you can set me up with temp ftp I can take a look

Re: I Have Lost My Images....

Posted: Wed Nov 03, 2010 2:51 am
by Adrian666
no its a fresh install and these are all new products, ive just changed the 2 config files, check pm mate :)
thanks a million

Re: I Have Lost My Images....

Posted: Wed Nov 03, 2010 4:14 am
by Qphoria
ok the issue is kind of a bad design in the later versions of opencart. You renamed your image directory to "img" and changed the filepath "DIR_IMAGE" as well as the HTTP_IMAGE path in the admin/config.php. That is all fine.

But since the multistore was added, the root config.php no longer has a definable HTTP_IMAGE path. Instead it grabs the url from the database for the store you are visiting and just assumes that "/image/" should be added to the end of it.

So the index.php file code had to be changed for

Code: Select all

define('HTTP_IMAGE', HTTP_SERVER . 'image/');
to

Code: Select all

define('HTTP_IMAGE', HTTP_SERVER . 'img/');
This still doesn't make it use the subdomain, instead just the subfolder "img" instead of "image" which still works since by default "img.site.com" is the same as "site.com/img"

The only other issue I saw was that the images you have set for each product just don't exist anywhere yet so I assume they were not uploaded.

So once you upload those images, you should be all set.

If you really want to change the url to use img.site.com then you will likely need to just hardcode that in for now until we think of a better method

Code: Select all

define('HTTP_IMAGE', 'img.site.com/');

Re: I Have Lost My Images....

Posted: Wed Nov 03, 2010 4:18 am
by Adrian666
honestly amazing work !!!!!!!!!!!! A MILLION THANKS FROM ME !!!!!!!! :gamer: :gamer: :gamer: :gamer: