Post by marcella » Mon Nov 29, 2010 1:18 am

Wasn't sure of the correct place to post this. On the back of some issues with third party modules an export and import of the DB was required.

In this process all images associated with products have dislodged. They are in the database and the paths are correct, however on output there is no source being placed.

This is with the default theme.

Also in the image manager, any created folders have disapeared and it has reverted to the hierarchy created with a new installation. Nothing less, nothing more.

Any advice appreciated as ever.

Thanks

Code: Select all

$wpdb->update('users', 'users_nicename' = 'Alistair', 'display_name' = 'troubled', %s); 


User avatar
Newbie

Posts

Joined
Tue Oct 05, 2010 3:21 pm
Location - Edinburgh, Scotland

Post by SapporoGuy » Wed Dec 01, 2010 12:03 am

Could this be permission problem?

930sc ... because it is fun!


User avatar
Active Member

Posts

Joined
Mon Nov 01, 2010 7:29 pm

Post by marcella » Wed Dec 01, 2010 8:09 pm

Hey Sapporo,

No no it's not file permissions. The src attribute for all images is appearing empty.

Code: Select all

$wpdb->update('users', 'users_nicename' = 'Alistair', 'display_name' = 'troubled', %s); 


User avatar
Newbie

Posts

Joined
Tue Oct 05, 2010 3:21 pm
Location - Edinburgh, Scotland

Post by SapporoGuy » Wed Dec 01, 2010 9:22 pm

..... so in the database all files are associated properly
..... images directory structure changed ....

um, image is not being found since it's not parked in the right parking lot ???

930sc ... because it is fun!


User avatar
Active Member

Posts

Joined
Mon Nov 01, 2010 7:29 pm

Post by marcella » Wed Dec 01, 2010 9:57 pm

Quite possibly here is my open cart structure on the server.

admin
catalog
download
image
--- cache
--- data
--- flags
--- templates
system
index.php
config.php

Any ideas?

Code: Select all

$wpdb->update('users', 'users_nicename' = 'Alistair', 'display_name' = 'troubled', %s); 


User avatar
Newbie

Posts

Joined
Tue Oct 05, 2010 3:21 pm
Location - Edinburgh, Scotland

Post by SapporoGuy » Wed Dec 01, 2010 10:32 pm

Also in the image manager, any created folders have disapeared and it has reverted to the hierarchy created with a new installation. Nothing less, nothing more.
I thought you meant that your images moved.

There are 2 image directories in the cart.
1.) for products within the main directory
2.) for design within your theme directory

Did you put them into the template(theme) directory by accident?

930sc ... because it is fun!


User avatar
Active Member

Posts

Joined
Mon Nov 01, 2010 7:29 pm

Post by marcella » Wed Dec 01, 2010 10:52 pm

Hey again,

No no everything is in the right place, all that's happened is a full DB export and import. An clean install and the image directory downloaded from the old and uploaded to the new install.

Default theme is currently active. All images in the backend are no longer linked to products, i.e the thumbnail doesn't appear and none are within the product list.

Don't worry i think it's going to be a manual process for this one.

All very annoying, but hey it's a good cart so we persist to get it right.

Have you ever done a DB dump and import before? How does your work flow go with that if so?

Thanks for your help.

Alistair

Code: Select all

$wpdb->update('users', 'users_nicename' = 'Alistair', 'display_name' = 'troubled', %s); 


User avatar
Newbie

Posts

Joined
Tue Oct 05, 2010 3:21 pm
Location - Edinburgh, Scotland

Post by SapporoGuy » Wed Dec 01, 2010 11:44 pm

oh geez, it's been like 7 or 8 years now since I did that :choke:
I used to have fun with oscommerce back in the day.

I've only been using (errr, modding) opencart since about Nov 3rd or so ....

My workflow used to be dump >> import into BBEdit >> export into excel >> edit >> export to BBEdit >> load ...
Very old school, but I'm old school php3 ;D

930sc ... because it is fun!


User avatar
Active Member

Posts

Joined
Mon Nov 01, 2010 7:29 pm

Post by Skyhigh » Thu Dec 02, 2010 1:19 am

Wow this is incredibly coincidental - I have the exact same problem after upgrading from 1.3.2 to 1.4.9.1.

Images are in the right directory.
Product table points to the images correctly in the file structure.
But no product images show, the <img> SRC tag is empty.


What did I do to get this state?

1. Original cart was 1.3.2
2. I created a fresh copy of 1.4.9.1 to look at
2. Upgraded my 1.3.2 to 1.4.9.1 using the Upgrade installation method
3. Did a DB compare between the blank 1.4.9.1 and my new 1.3.2 upgraded to 1.4.9.1 just to make sure everything was OK.
4. Added some missing tables for a few addons.
5. Manually went through all the table structure and data to check that my upgraded DB installation was correct. Looked good.
6. Cart works fine, apart from no images are shown (SRC is blank for IMG tag).


I've triple checked that the 'image' field for the Products table points to the right location and that the images are where they should be, the permissions are also correct.

I've yet to look into this further - but will be doing so shortly.


I might have to resort to doing an export/import into a fresh install. But if its a problem with the data, then that won't fix my issue :)

LoveMoissanite.com - Moissanite Rings - Proudly Powered by Opencart
[How To] Speed Up Page Content with Opencart - Opencart advocate since 2009


New member

Posts

Joined
Fri Sep 11, 2009 8:12 pm

Post by celestial » Thu Dec 02, 2010 2:12 am

Same problem, all backup system from OC dont work, backup / restore (OC), export / import (MOD), CSV Import/Export, none work for me, i lost all the connections for my images, the products and options for this products.

Celestial - Martín Abel Rosales
WhatsApp: 50671482211
Email: martinrosales2012@hotmail.com
Skype: martin.abel.rosales
San José , Costa Rica


User avatar
Expert Member

Posts

Joined
Sat Mar 20, 2010 4:19 am
Location - Costa Rica

Post by Skyhigh » Thu Dec 02, 2010 3:18 am

So I've fixed my issue.

If for some reason your product image tag src is completely empty, then it's probably because the Thumb conversion has failed.
This is also highlighted, if you delete your Cache contents - nothing will re-appear in the cache.

The likely reason for this is because the Thumbnail conversion method has to be called on the product image.
If the image location is wrong in any way, or the image is missing - the thumb conversion will fail and return NULL.
Hence you will have <img src =""

How to resolve this?

1. Make sure you know where your images are on your server. Most likely they are under image/data/
2. Make sure that your HTTP_IMAGE and HTTPS image settings in your admin/Config.php file - and ANY other reference to the image folder location is set to the correct path. For most people this will be "http://MYSERVER/image"
3. In your DB, open the Product and ProductImage tables and look at the image column. Check that this points to where your images live.
If you images live in "image/data/" then the 'image' field will want to be set to "data/myimage.jpg".
If you have your product images in another folder, such as "image/data/products/myproducts" then the 'image' field will want to be set to "data/products/myproducts/myimage.jpg".

This is because the full image path is "the image location from the config.php PLUS the image location from the Product table".

Hence:
config for "HTTP_IMAGE" is "http://myserver/image/"
plus
image field "data/myimage.jpg"

= "http://myserver/image/data/myimage.jpg"


Cheers,



* Incidentally, my problem was the the 1.3.2 version I was converting, had previously had its IMAGE folder renamed to IMAGES in the config file. So the thumbnail conversion was failing because it couldn't find the full URL (hence the image).

Also please note that although I was upgrading from 1.3.2 to 1.9.1/2, I manually compared my upgraded DB against the 1.3.2 DB, and wrote a script to add/remove/alter the existing/missing columns that the OC upgrade process had missed out.
Although most of the work was changing the 'default' column values from '0' to "None", because it looks like 1.3.2 had an awful lot of columns that defaulted to '0' and not NULL/'none' (no default).

LoveMoissanite.com - Moissanite Rings - Proudly Powered by Opencart
[How To] Speed Up Page Content with Opencart - Opencart advocate since 2009


New member

Posts

Joined
Fri Sep 11, 2009 8:12 pm

Post by marcella » Thu Dec 02, 2010 3:52 am

Wahhh i am such a noob.

Thanks for spelling it out skyhigh, i did run through your process.... well checking the paths in the DB but completely overlooked the fact that the new environment is on a staging server with http://IPADDRESS/DOMAIN/INSTALL

Meaning any paths in the DB make sense on the real domain, but not the staging... All the image paths now need to be

/DOMAIN/DATA/WHATEVER

Thanks a lot, that was the problem specifically for this setup. Sometimes just unplugging and putting it back in will fix the issue. lol.

CHEERS! Seriously, thanks all!

Code: Select all

$wpdb->update('users', 'users_nicename' = 'Alistair', 'display_name' = 'troubled', %s); 


User avatar
Newbie

Posts

Joined
Tue Oct 05, 2010 3:21 pm
Location - Edinburgh, Scotland

Post by vjcoop » Sat Jan 29, 2011 9:18 am

Hi:

I migrated opencart from one server environment to another. Since the migration, everything appears to work except the image manager. I've read through the various posts here on the forum and none seem to address my issues.

Everything appeared correct, everywhere...

Except the HTTPS settings in the admin config.php. Even though we're not using HTTPS right now, the image manager showed blank and would not upload images....even though the url for the admin was http

Changing that HTTPS path fixed the image manager issue....entirely, everything from the directory paths to upload. I believe the image manager code uses that HTTPS variable whether you are actually using HTTPS or not. Check that value in admin config if you are having trouble.

John Cooper

Newbie

Posts

Joined
Fri Jul 16, 2010 5:11 am

Post by heizo » Thu Feb 24, 2011 7:38 am

Thank you so much for that! Holy shit I just spend 4 hours trying to figure out why the stupid image uploader was not working. Turns out I just had to clear out the s in the admin config file...

This fixed my issue and image display issues instantly!

My Blog / Site

$1 Hosting and Free Domain Name for OpenCart, Wordpress, Joomla, Droopal


New member

Posts

Joined
Wed Feb 09, 2011 1:12 am
Who is online

Users browsing this forum: No registered users and 20 guests