Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Losing product images after transfer


Recommended Posts

Migrating 2.3.something to 4.13 with OSCB159. Three issues:

1. customers and orders tables are quite large and timed out several times. Eventually, I was able to get whole thing over, but it was a white-knuckle experience.

2. One category has a bunch of subcategories, but they appeared on the main category listing. I had to go into the DB and manually reset 'show_on_home' from 1 to 0.

3. The most serious problem is that many product image paths exceed 64 characters, and are truncated in the database. I had to widen products.products_image from var(64) to var(128) and will need to repair most entries. Please consider widening this field (categories.categories_image is already 128). The image files themselves came over OK. Many images are missing from the product_images table -- I suspect because the path was truncated during processing and they weren't assigned products_images_id and product_id and are thus not in the table, and don't show an image in the store. Is this what's happening? Can this be repaired?

Link to comment
Share on other sites

Thanks for your feedback, Phil.

7 hours ago, MrPhil said:

1. customers and orders tables are quite large and timed out several times. Eventually, I was able to get whole thing over, but it was a white-knuckle experience.

It depends on the ability of the server with the old osCommerce to timely responce. In our experience, not all shared hostings successfully cope with this, especially if the number of customers and orders is in the order of hundreds of thousands.

If we come across such servers, we first transfer the old system to a more powerful server, and then import.

7 hours ago, MrPhil said:

2. One category has a bunch of subcategories, but they appeared on the main category listing. I had to go into the DB and manually reset 'show_on_home' from 1 to 0.

This applies more to group operations on categories/products than to imports, since it may be needed in other cases. I added this to our todo list.

7 hours ago, MrPhil said:

3. The most serious problem is that many product image paths exceed 64 characters, and are truncated in the database. I had to widen products.products_image from var(64) to var(128) and will need to repair most entries. Please consider widening this field (categories.categories_image is already 128). The image files themselves came over OK.

The original products.products_image is var(64). It is no longer used and is retained for compatibility purposes. We will not change that field but fix import for large image paths.

8 hours ago, MrPhil said:

Many images are missing from the product_images table -- I suspect because the path was truncated during processing and they weren't assigned products_images_id and product_id and are thus not in the table, and don't show an image in the store. Is this what's happening? Can this be repaired?

There are two files that can help figure out the cause of the issue:

1. images/products/missing_img.txt - contains products ids and image file name

2. lib/common/extensions/OscLink/logs/YYYY-MM-DD_H_M_S.log - it should contain "Could not download file <url>" if there was a problem with image file.

You can PM me these files if you want me to analyze them.

Link to comment
Share on other sites

I see both files you indicated. There are 210 entries in missing_files.txt, all showing a truncated path. One of the log files shows many (I didn't count them) "image missed <gives truncated path>". Is there any repair I can do, hopefully short of manually updating one or more DB fields for each missing image? Any suggestions on creating an .sql file to import to do the fixup? (maybe edit from the missing_files.txt -- what table fields do I need to update?) Should I wait for OSCB160 and rerun the import bridge? Will I need to upgrade 4.13 to something later? At this stage, this is testing for my client to see if they want to stay with osC. I see reports in the logs about a number of other corruptions, including invalid country codes and invalid order status.

Let me know if you need to look at any of the log files, or if I have provided enough information to proceed with the fix. Thanks!

Link to comment
Share on other sites

Sorry to take so long to get back to you, but just as I was ready to try your two patches, the host decided to migrate the server, which had it down for several days. Then there were some weather-related and other issues at home that kept me off this job for a few more days.

Any way, I think the patches are working OK -- the subcategories now don't appear on the main categories page, and it looks like most, if not all, the product images appear in the database. Thanks for the quick fix! I think you can go ahead and put them in the next release.

I now need to figure out a basic theme to use. May I suggest that when the admin deletes all the sample products (and categories, and channels), that the splash page be replaced by a simple four-across category listing. Maybe there could be another default theme available similar to the old osC layout (featured products) to choose from? All the channel stuff should go away, and a basic (but workable) theme or two should be offered. I'll look around the forums and wiki to see if there is something to help me with this.

Link to comment
Share on other sites

14 hours ago, MrPhil said:

Any way, I think the patches are working OK -- the subcategories now don't appear on the main categories page, and it looks like most, if not all, the product images appear in the database. Thanks for the quick fix! I think you can go ahead and put them in the next release.

Sure. They will be included in next update.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...