I'm using CKEditor, and when clicking on insert image icon, and after selecting the image, the WYSIWYG editor goes blank where the image should be, however, the code shows the image as embedded.
Any ideas what's going on??
My Github OC Site: https://github.com/IP-CAM
5'600 + FREE OC Extensions, on the World's largest private Github OC Repository Archive Site.
Here are how images looking in the Opencart file manager(no preview in thumbnails)
http://awesomescreenshot.com/0634wgta40
And this is how it looks once the image has been inserted(there is no image in the preview section)
http://awesomescreenshot.com/0004wgt962
Apparently, all of the images on the server(even images for live products) lead to the same result.
I did NOT add the Image Routine into the ADMIN Sub 'image.php' file as well...

So, to make sure, in:
( Line 39 to line 59, the last: '?>' END of the Code)catalog\model\tool\image.php
replace, what you have, starting with this:
with this:list($width_orig, $height_orig) = getimagesize(DIR_IMAGE . $old_image);
Code: Select all
list($width_orig, $height_orig) = getimagesize(DIR_IMAGE . $old_image);
if ($width_orig != $width || $height_orig != $height) {
$image = new Image(DIR_IMAGE . $old_image);
$image->resize($width, $height, $type);
$image->save(DIR_IMAGE . $new_image);
} else {
copy(DIR_IMAGE . $old_image, DIR_IMAGE . $new_image);
}
}
if (isset($this->request->server['HTTPS']) && (($this->request->server['HTTPS'] == 'on') || ($this->request->server['HTTPS'] == '1'))) {
// return $this->config->get('config_ssl') . 'image/' . $new_image;
return HTTPS_IMAGE . $new_image;
} else {
// return $this->config->get('config_url') . 'image/' . $new_image;
return HTTP_IMAGE . $new_image;
}
}
}
?>
( Line 33 to line 42, the last: '?>' END of the Code)admin\model\tool\image.php
replace, what you have, with this:
Code: Select all
if (isset($this->request->server['HTTPS']) && (($this->request->server['HTTPS'] == 'on') || ($this->request->server['HTTPS'] == '1'))) {
// return $this->config->get('config_ssl') . 'image/' . $new_image;
return HTTPS_IMAGE . $new_image;
} else {
// return $this->config->get('config_url') . 'image/' . $new_image;
return HTTP_IMAGE . $new_image;
}
}
}
?>
Good Luck
Ernie
bigmax.ch/os/
My Github OC Site: https://github.com/IP-CAM
5'600 + FREE OC Extensions, on the World's largest private Github OC Repository Archive Site.
However, all of the code was already existing the files.
The only difference were these lines in the code, which I replaced, to find even the working images on store front-end & admin getting broke(and not being displayed)
Code: Select all
// return $this->config->get('config_ssl') . 'image/' . $new_image;
return HTTPS_IMAGE . $new_image;
} else {
// return $this->config->get('config_url') . 'image/' . $new_image;
return HTTP_IMAGE . $new_image;
Attachments
code.PNG (25.16 KiB) Viewed 4297 times
it's a very important Difference, it makes ALL the difference in the world!

BUT, since you have not configured your config.php files, as mentioned above, accordingly, it did not work!
If you set the IMAGE-LINKS+PATHS in BOTH of the 2 config.php,
the one in the Server ROOT and the one in the ADMIN Sub,
according the Content below, if will work.
If ANY Image-related, Line is (still) missing, in your ROOT config.php,
Copy the one of this File, or then the already 'rewritten' Line of the admin-config.php,
and make sure, they both will MATCH the 'Values' like Path, or Link, to your Server files.
Code: Select all
// HTTP
define('HTTP_SERVER', 'http://www.YOURS.COM/shop/admin/');
define('HTTP_CATALOG', 'http://www.YOURS.COM/shop/');
define('HTTP_IMAGE', 'http://www.YOURS.COM/shop/image/');
// IF IMAGE SUB-DOMAIN USED, 'unquote' line below and quote line above this Line.
// define('HTTP_IMAGE', 'http://images.YOURS.COM/shop/image/');
// HTTPS
define('HTTPS_SERVER', 'http://www.YOURS.COM/shop/admin/');
define('HTTPS_CATALOG', 'http://www.YOURS.COM/shop/');
define('HTTPS_IMAGE', 'http://www.YOURS.COM/shop/image/');
// IF IMAGE SUB-DOMAIN USED, 'unquote' line below and quote line above this Line.
// define('HTTPS_IMAGE', 'http://images.YOURS.COM/shop/image/');
// YOUR SERVER PATH WILL LOOK DIFFERENT, I KNOW! Take it as sample:
// DIR
define('DIR_APPLICATION', '/home/YOURS/www/YOURS_COM/shop/admin/');
define('DIR_SYSTEM', '/home/YOURS/www/YOURS_COM/shop/system/');
define('DIR_DATABASE', '/home/YOURS/www/YOURS_COM/shop/system/database/');
define('DIR_LANGUAGE', '/home/YOURS/www/YOURS_COM/shop/admin/language/');
define('DIR_TEMPLATE', '/home/YOURS/www/YOURS_COM/shop/admin/view/template/');
define('DIR_CONFIG', '/home/YOURS/www/YOURS_COM/shop/system/config/');
// THIS ONE:
define('DIR_IMAGE', '/home/YOURS/www/YOURS_COM/shop/image/');
// ABOVE LINE
define('DIR_CACHE', '/home/YOURS/www/YOURS_COM/shop/system/cache/');
define('DIR_DOWNLOAD', '/home/YOURS/www/YOURS_COM/shop/download/');
define('DIR_LOGS', '/home/YOURS/www/YOURS_COM/shop/system/logs/');
define('DIR_CATALOG', '/home/YOURS/www/YOURS_COM/shop/catalog/');
Ernie
bigmax.ch/os/
My Github OC Site: https://github.com/IP-CAM
5'600 + FREE OC Extensions, on the World's largest private Github OC Repository Archive Site.
And make sure, to (if so...) ADD any image Links IN SOURCE-MODE, not WysiwWyg...!
I use this One below, linked, from best-byte
http://www.ipc.li/os/ckeditor-4_3-full.zip
http://www.opencart.com/index.php?route ... n_id=13753
Others available:
http://www.opencart.com/index.php?route ... n_id=10032
http://www.opencart.com/index.php?route ... n_id=12281
http://www.opencart.com/index.php?route ... n_id=21159
Let me know!
Ernie
My Github OC Site: https://github.com/IP-CAM
5'600 + FREE OC Extensions, on the World's largest private Github OC Repository Archive Site.
It's the CKeditor, it has no DEFAULT selection Config-Option to REWRITE the 'entire' SERVER - BASEPATH, or for image-href-links, so, it's rather inflexible, when it comes to address other than the DEFAULT Image Directory. I looked for some time, but found nothing , but lot's of different succestions, and information, not resulting in anything usable, to make it work on my test Site.
But for Info-Pages, and such, it's still not a Problem, if you only use a few images. Just do it, as shown below!
At least, until we find a working solution to REROUTE the CKEditor address-Path/link.
Ernie
I placed an image in each info page:
http://www.bigmax.ch/os/
My Github OC Site: https://github.com/IP-CAM
5'600 + FREE OC Extensions, on the World's largest private Github OC Repository Archive Site.

I need that stuff to find out, because I work with an 'Image Subdomain', and my Image Handler takes the image-link out of the 'Image Subdomain', and the CKEditor makes creates it's own Image File out of it, but does NOT place it in the LOCAL Image directory. Probably, it's directed to another path by the config.php. As a consequence of this, I end up with no image visible.

I have to find a better solution, but manually to copy/paste Links, as described above.
Once I get the Server-Path, as default-defined by CKEditor, to start from Server ROOT, not from Shop ROOT, my Problem will be solved, because, set as path, I have all my Sites/Files within the same Server Path.

Good Luck, anyway!
Ernie
My Github OC Site: https://github.com/IP-CAM
5'600 + FREE OC Extensions, on the World's largest private Github OC Repository Archive Site.
http://forum.opencart.com/viewtopic.php?f=138&t=40573
I use sub-domain for my images and I have no problem to insert them in information page. I added one at the bottom of this page.
http://www.lesbricollesdecleo.com/delivery-information
Cleo
Opencart v1.5.4.1 fr/en
Theme: Custom
vqmod-2.6.0
PHP: 7.3 (ea-php73)
using the REMOTE IMAGE Address, quoted in the config.php's, but always PRESET
the Shop Site URL only. So, I have to exchange it manually, by re-linking (Shop-related) images to the
Image Subdomain URL >http://images/openshop.li/....<, I found no FAST WAY to change it.
Ernie
bigmax.ch/os/
My Github OC Site: https://github.com/IP-CAM
5'600 + FREE OC Extensions, on the World's largest private Github OC Repository Archive Site.
Users browsing this forum: Google Adsense [Bot] and 95 guests