Post by buburuzza » Fri Sep 11, 2020 4:43 pm

Opencart Version 3.0.3.6

After adding SSLcertificate, some of the images don't show. Product images and others.
I have edited the config.php in both root and admin, as well as .htaccess
I have also added a line with
define('HTTPS_IMAGE', 'https://www.daiclick.ro/image/');
and still the images don't appear.
I mention that the line with HTTPS_IMAGES wasn't there at all

Website is: www.daiclick.ro
Only some of the images don't work, while some of them do

Also, I have done this (however, probably because of opencart version, I have image_new instead of new-image... so I used image_new.) Still not working. Next I will try to use vqmod

catalog/model/tool/image.php :

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;  // OLD CODE
	return HTTPS_IMAGE . $new_image;
	} else {
// return $this->config->get('config_url') . 'image/' . $new_image;  // OLD CODE
	return HTTP_IMAGE . $new_image;
}
Last edited by buburuzza on Fri Sep 11, 2020 5:18 pm, edited 2 times in total.

New member

Posts

Joined
Wed Aug 05, 2020 6:24 pm

Post by letxobnav » Fri Sep 11, 2020 5:02 pm

you are mixing http and https as well as www and non-www in your urls so correct your config.php files.
You are 301 redirecting virtually every image so check your htaccess.

Attachments

Capture.JPG

Capture.JPG (139.64 KiB) Viewed 1880 times


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
Expert Member

Posts

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

Post by buburuzza » Fri Sep 11, 2020 5:45 pm

I added this:

Code: Select all

RewriteEngine On
RewriteCond %{HTTPS} off
RewriteRule ^(.*)$ https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301]
to my .htaccess as my hosting provider said to do in order for SSL to work. What am I doing wrong?

New member

Posts

Joined
Wed Aug 05, 2020 6:24 pm

Post by buburuzza » Fri Sep 11, 2020 6:07 pm

My config file are as follows:

Code: Select all

/HTTP
define('HTTP_SERVER', 'http://daiclick.ro/admin/');
define('HTTP_CATALOG', 'http://daiclick.ro/');
define('HTTP_IMAGE', 'http://www.daiclick.ro/image/');

// HTTPS
define('HTTPS_SERVER', 'https://daiclick.ro/admin/');
define('HTTPS_CATALOG', 'https://daiclick.ro/');
define('HTTPS_IMAGE', 'https://www.daiclick.ro/image/');

and

Code: Select all

// HTTP
define('HTTP_SERVER', 'http://daiclick.ro/');
define('HTTP_IMAGE', 'http://www.daiclick.ro/image/');

// HTTPS
define('HTTPS_SERVER', 'https://daiclick.ro/');
define('HTTPS_IMAGE', 'https://www.daiclick.ro/image/');

New member

Posts

Joined
Wed Aug 05, 2020 6:24 pm

Post by ADD Creative » Fri Sep 11, 2020 6:21 pm

All those lines need to be https even the HTTP ones.

www.add-creative.co.uk


Expert Member

Posts

Joined
Sat Jan 14, 2012 1:02 am
Location - United Kingdom

Post by buburuzza » Fri Sep 11, 2020 6:36 pm

I fixed those lines and now it's working in Chrome. In Mozilla still not fully working. I'll just wait, maybe it takes some time to update.
Thank you.

New member

Posts

Joined
Wed Aug 05, 2020 6:24 pm

Post by buburuzza » Fri Sep 11, 2020 6:37 pm

Just a quick question, related to this: I still have a triangle that says not secure on the page --> it says that images are not secured. However, it says that the certificate is valid. Any fix to that?

New member

Posts

Joined
Wed Aug 05, 2020 6:24 pm

Post by buburuzza » Fri Sep 11, 2020 6:45 pm

I solved that too, I added this line in .htacess

Code: Select all

Header always set Content-Security-Policy "upgrade-insecure-requests;"
And it now shows the lock.

However, Mozilla Firefox still does not show all of my pictures. I just cleared the cache on this browser too. On Chrome it works perfectly, it's just Firefox that has issues now... would time sort it out?

New member

Posts

Joined
Wed Aug 05, 2020 6:24 pm

Post by letxobnav » Fri Sep 11, 2020 7:30 pm

Header always set Content-Security-Policy "upgrade-insecure-requests;"
that will tell the browser that from now on always use https for this domain but it will not fix https for users visiting for the very first time.

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
Expert Member

Posts

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

Post by buburuzza » Fri Sep 11, 2020 7:39 pm

Yup, but that is only related to the small triangle in the browser adderss bar saying that it is insecure.. because of the images!
So again, in Firefox not all the images work. Although, I have fixed everything... could there be something else left?

New member

Posts

Joined
Wed Aug 05, 2020 6:24 pm

Post by buburuzza » Fri Sep 11, 2020 7:48 pm

So, in order to confirm, now my root/config.php and admin/config.php look like this:

Code: Select all

// HTTP
define('HTTP_SERVER', 'https://daiclick.ro/admin/');
define('HTTP_CATALOG', 'https://daiclick.ro/');
define('HTTP_IMAGE', 'https://www.daiclick.ro/image/');

// HTTPS
define('HTTPS_SERVER', 'https://daiclick.ro/admin/');
define('HTTPS_CATALOG', 'https://daiclick.ro/');
define('HTTPS_IMAGE', 'https://www.daiclick.ro/image/');
and

Code: Select all

// HTTP
define('HTTP_SERVER', 'https://daiclick.ro/');
define('HTTP_IMAGE', 'https://www.daiclick.ro/image/');

// HTTPS
define('HTTPS_SERVER', 'https://daiclick.ro/');
define('HTTPS_IMAGE', 'https://www.daiclick.ro/image/');

It works fine in Google Chrome --> see for yourself www.daiclick.ro
However, Firefox still doesn't show all the images. I have cleared the cache in Firefox and still nothing... what now?

New member

Posts

Joined
Wed Aug 05, 2020 6:24 pm

Post by letxobnav » Fri Sep 11, 2020 7:50 pm

I am sure it has to do with the fact that you are referencing images using www. on http

Attachments

Capture.JPG

Capture.JPG (155.11 KiB) Viewed 1753 times


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
Expert Member

Posts

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

Post by buburuzza » Sun Sep 13, 2020 3:28 pm

HI,

and how could I reference them without www ? Could you tell me how to do that?
Thanks.

New member

Posts

Joined
Wed Aug 05, 2020 6:24 pm

Post by sw!tch » Sun Sep 13, 2020 6:05 pm

buburuzza wrote:
Sun Sep 13, 2020 3:28 pm
HI,

and how could I reference them without www ? Could you tell me how to do that?
Thanks.
Unless you hardcoded the urls or something you should be able to just remove the www. reference from your config url.

Full Stack Web Developer :: Send a PM for Custom Work.
Backup and learn how to recover before you make any changes!


Active Member

Posts

Joined
Sat Apr 28, 2012 2:32 pm

Post by buburuzza » Sun Sep 13, 2020 6:10 pm

I edited the config files in root and admin folder and removed the www from the images links. Now I will wait until it gets updated on the server. I hope it will fix it, otherwise I don't know what else to do.

New member

Posts

Joined
Wed Aug 05, 2020 6:24 pm

Post by letxobnav » Sun Sep 13, 2020 6:42 pm

just look in your source:

Code: Select all

<div class="sub-col col-sm-12 col-md-3">
                                                                                                                        										  										  										  										  										  										  										  										  										  										  										  										  										  										  <p>&nbsp;</p><p><a href="http://www.daiclick.ro/index.php?route=product/category&amp;path=278" target="_self"><img src="http://www.daiclick.ro/image/catalog/THMBN/NEW THMB/THMB 1.1.jpg"></a>&nbsp;&nbsp;<a href="http://www.daiclick.ro/index.php?route=product/category&amp;path=408" target="_self"><img src="http://www.daiclick.ro/image/catalog/THMBN/NEW THMB/12cc121v 21312fasd.jpg"></a>&nbsp;&nbsp;<a href="http://www.daiclick.ro/index.php?route=product/category&amp;path=5" target="_self"><img src="http://www.daiclick.ro/image/catalog/THMBN/NEW THMB/13v13v33rfeee.jpg"></a><br></p> 									 									 									 									 									 									 									 									 									 									 									 									 									 									
                                                                                                            </div>
don't know what this means:
Now I will wait until it gets updated on the server
You have to make an appointment?

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
Expert Member

Posts

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

Post by buburuzza » Sun Sep 13, 2020 7:00 pm

And how can I remove it from there?

New member

Posts

Joined
Wed Aug 05, 2020 6:24 pm

Post by xxvirusxx » Sun Sep 13, 2020 7:36 pm

Re-update(remove and select) slideshow images, baners...
And use the same structure in both config

Code: Select all

https://www.

Upgrade Service | OC 2.3.0.2 PHP 8 | My Custom OC 3.0.3.8 | Buy me a beer


User avatar
Expert Member

Posts

Joined
Tue Jul 17, 2012 10:35 pm
Location - România

Post by letxobnav » Sun Sep 13, 2020 7:38 pm

there are 33 references in your homepage source with www.
both links and images.
Just hover over some images and you will see which has www and which does not.
Those with www are part of some module you put there, maybe review that module.

like:
SANATATE SI FRUMUSETE 9 image and link
50% REDUCERE image and link etc.

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
Expert Member

Posts

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

Post by buburuzza » Tue Sep 15, 2020 8:23 pm

Yes, I see, but now that I have edited the two config.php files in the right way, all my images (product images) show up right. BUT, only in Firefox, images related to the theme itself (Like the shopping cart icon, and some other icons and images accross the site, many you can see on the homepage) display as Xs. Only in Firefox, though.
What can I do with theme related images and icons?
Isn't there a straight forward way to deal with this sort of a problem?
Thanks.

New member

Posts

Joined
Wed Aug 05, 2020 6:24 pm
Who is online

Users browsing this forum: No registered users and 42 guests