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
Too little information you provided to be any help.
Full Stack Web Developer :: Send a PM for Custom Work.
Backup and learn how to recover before you make any changes!
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
---
My Github OC Site: https://github.com/IP-CAM
5'200 + FREE OC Extensions, on the World's largest private Github OC Repository Archive Site.
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.
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
it first splits the names at 14 characters:
Code: Select all
$name = str_split(basename($image), 14);
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.
letxobnav wrote: ↑Sat May 18, 2019 3:36 pmprobably 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:
and then glues them back again with a space added.Code: Select all
$name = str_split(basename($image), 14);
Code: Select all
'name' => implode(' ', $name),
That was a nice catch to fix the Image Manager "white space" issue.
store/controller/common/filemanger.php
Code: Select all
'name' => implode(' ', $name),
Code: Select all
'name' => implode('', $name),
Midwest United States
Photoshop - InDesign - Illustrator
OC 3.03
Linux - CPanel - PHP 5.4.45
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.
Dedication and passion goes to those who are able to push and merge a project.
Regards,
Straightlight
Programmer / Opencart Tester
Still looking for a reason the images won't show up in Image Manager or browser.
The store logo shows up but not product images.
Code: Select all
define('DIR_IMAGE', '/home/mysite/public_html/store/image/');
Wondering if it's a PHP version issue. I'm on PHP 5.4.45
Midwest United States
Photoshop - InDesign - Illustrator
OC 3.03
Linux - CPanel - PHP 5.4.45
You should move up fast, that time is really over ...
My Github OC Site: https://github.com/IP-CAM
5'200 + FREE OC Extensions, on the World's largest private Github OC Repository Archive Site.
I know. It's a leased/shared server. They offer to upgrade but I'm worried sites will have issues. I host dozens, so It's scary.
Midwest United States
Photoshop - InDesign - Illustrator
OC 3.03
Linux - CPanel - PHP 5.4.45
Scary is running a 5 year old EOL PHP version. You should ask your host if they have multi-php support, you could then slowly migrate your sites to newer PHP versions instead of an all at once upgrade.info@wescomedia.com wrote: ↑Sun Sep 13, 2020 12:02 pmI know. It's a leased/shared server. They offer to upgrade but I'm worried sites will have issues. I host dozens, so It's scary.
Surprised hosts still even offer 5.4 as an option. In any case, should really get that updated or hire a developer to work with you, PHP 7 brought a lot of speed enhancements to PHP.
Full Stack Web Developer :: Send a PM for Custom Work.
Backup and learn how to recover before you make any changes!
(ROOT+) SHOP .htaccess file of each OC Site I have, to
individually select the PHP Version used. It looks like this:
Code: Select all
AddHandler application/x-httpd-php72 .php
#@__HCP_END__@#
Code: Select all
AddHandler application/x-httpd-php73 .php
#@__HCP_END__@#
Code: Select all
AddHandler application/x-httpd-php74 .php
#@__HCP_END__@#
another system/library/encryption.php File, to work flawless with PHP v.7.4.9
so far, depending on, what's available on PHP Versions from the Hoster.
At least, if used with default-theme-like installs, but I don't know about JOURNAL ...
That's the one I use for my v.1.5.6.5_rc Versions:
Code: Select all
<?php
final class Encryption {
private $key;
private $iv;
public function __construct($key) {
$this->key = $key;
}
public function encrypt($value) {
return strtr(base64_encode(openssl_encrypt($value, 'aes-128-cbc', hash('sha256', $this->key, true))), '+/=', '-_,');
}
public function decrypt($value) {
return trim(openssl_decrypt(base64_decode(strtr($value, '-_,', '+/=')), 'aes-128-cbc', hash('sha256', $this->key, true)));
}
}
?>
Ernie
Some (OC v.1.5.6.x / 2.x) encryption.php files can be found here, it's the same for those Versions:
https://www.opencart.com/index.php?rout ... earch=php7
My Github OC Site: https://github.com/IP-CAM
5'200 + FREE OC Extensions, on the World's largest private Github OC Repository Archive Site.
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.
DISCLAIMER:
You should not modify core files .. if you would like to donate a cup of coffee I will write it in a modification for you.
https://www.youtube.com/watch?v=zXIxDoCRc84
Well, it's called 'combining knowledge', a Topic, where one can also find other Wisdom andso we go from image name white space to not finding images to php versions to encryption back to php version switching, what could be next?
Download Links, to find solutions, or possibly solve problems, before they even exist....
This Place her is not so transparent, and what's not linked in 'main' Sections, is quite
hardly to be found, especially for Newbies, partly not even aware of what they use ...
In addition the the known fact, that the Forum Search Engine is just a piece of crab ...
But most important is, to have it 'googled', it saves a lot of bread, to still stay atop ...
And that's possible, if one takes care, to 'please' those fellows too, with, what they're looking for.
It's called 'CONTENT'
Ernie
My Github OC Site: https://github.com/IP-CAM
5'200 + FREE OC Extensions, on the World's largest private Github OC Repository Archive Site.
Users browsing this forum: nonnedelectari, Semrush [Bot] and 404 guests