Post by frankpmjr » Sat Jun 16, 2018 10:27 pm

Hello,
I am migrating an OC site from one host to the next and upgrading to 3.0 at the same time. All is going well but I FTPed all my images from old host to new host and when I uploaded my products a bunch of the pics came up blank. After a little poking around I found that a lot (more than half) of the pics have white spaces injected into them but only in the admin (if I add a picture to a product manually I see the whitespace) but if I look in the actual picture folder (using FTP or Cpanel) the name is fine. So I can't fix it reuploading or renaming the file in the Cpanel or via FTP. How do I get around this other than manually inserting every picture (about 1000 that didn't link when I did the uploads)? Thanks

Newbie

Posts

Joined
Sun Jan 21, 2018 2:03 am

Post by sw!tch » Sun Jun 17, 2018 1:54 am

Only thing I can think is your encoding is different between hosts and handling character set differently, either mySQL or when you uploaded them via FTP. You can try using gzip to pack all the images from your old host and then unzip them on the new host. Or when you did your database import the encoding is different.

Too little information you provided to be any help.

Active Member

Posts

Joined
Sat Apr 28, 2012 2:32 pm

Post by IP_CAM » Sun Jun 17, 2018 2:10 am

Well, you could download your images by FTP, to get 'em all, and then,
use a File Manager, or later an SEO Tool, to have 'em renamed. But be
aware, that every single image needs to be re-linked to the product again.
You should have been doing this before, it would have saved some time,
to do such according http-standards, valid, since the internet started to exist. :-\
Good Luck
Ernie
---
Mass Image Rename
https://www.opencart.com/index.php?rout ... n_id=14343
---
Product Image Bulk Rename - SEO Image Name Manager
https://www.opencart.com/index.php?rout ... n_id=19737
---
File Manager
Normalizer : UTF-8 Normalizer of file-name and file-path etc.
Sanitizer : Sanitizer of file-name and file-path etc.
https://www.opencart.com/index.php?rout ... n_id=32460
---

I'm rarely active at the OC Forum lately. To reach me, contact: jti@jacob.ch
A Demoversion of my free OpenCart LIGHT v.1.5.6.5 Software Edition
can be seen in real Action here: http://www.jti.li/shop/
---
1'300+ FREE OC Extension-Repositories - from OC v.1.5.x up,
on the world's largest OC-related Github Site: https://github.com/IP-CAM
---
Image


User avatar
Legendary Member

Posts

Joined
Tue Mar 04, 2014 1:37 am
Location - Switzerland

Post by ArtGallery » Mon Mar 25, 2019 6:48 am

I am experiencing the same issue. Images uploaded through the Admin for an individual product will sometimes display blank spaces between some characters in the file name. This doesn't happen every time, but once it occurs, it stays that way permanently.
Example:
Original File Name product-name-2x55.jpg is showing as product-name-2x5 5.jpg -- Note the blank space between the fives. This is only how it is shown in the Image Manager. The actual file names are not changed in the images folder. When I first noticed it I thought I had made an error in naming the original file, which was not the case. Everything seems to be displaying fine on the front end.

New member

Posts

Joined
Sat Apr 21, 2018 7:54 am

Post by henfeb » Mon May 13, 2019 10:56 pm

I am facing the same from of my filenames in opencart image viewer showing blank spaces. e.g hello.jpg becomes hello.jp g
I tried to delete everything and reupload the images. But somehow the filenames just randomly have spaces. The Catalog/images filenames are normal with no spaces. My website is not showing the images with the problem. I hope someone can help me with this problem. Thank you
Last edited by henfeb on Thu May 16, 2019 10:55 am, edited 1 time in total.

Newbie

Posts

Joined
Thu Apr 04, 2019 7:30 am

Post by henfeb » Thu May 16, 2019 10:53 am

Image

I hope somebody can help me.
Why there are random spaces for the filenames when in Opencart?
But when I look at the root directory of server"images>catalog" folder the file names doesn't have those spaces?

Newbie

Posts

Joined
Thu Apr 04, 2019 7:30 am

Post by letxobnav » Sat May 18, 2019 3:36 pm

probably to do with artificial wrapping of file/directory names to make the file-manager grid look nice with long file/directory names.

it first splits the names at 14 characters:

Code: Select all

$name = str_split(basename($image), 14);
and then glues them back again with a space added.

Code: Select all

'name'  => implode(' ', $name),

Crystal Light Centrum Taiwan
Extensions: MailQueue | SUKHR | VBoces

“Data security is paramount at [...], and we are committed to protecting the privacy of anyone who is associated with our [...]. We’ve made a lot of improvements and will continue to make them.”
When you know your life savings are gone.


User avatar
Active Member
Online

Posts

Joined
Fri Aug 18, 2017 4:35 pm
Location - Taiwan
Who is online

Users browsing this forum: Baidu [Spider], paulfeakins and 47 guests