Post by supercoco » Fri Feb 22, 2019 1:12 am

Hi,
I installed a SSL certificate and all went ok except 3 images at home page. That images are from the banner: http://prntscr.com/mo9lmj
Images affected: http://prntscr.com/mo9n1j
I tried everything, like upload same images when SSL went on, and desperate because it's impossible to get the green padlock in browers due that 3 banner images...
Web: https://bit.ly/2T6bGoy
So what could i do?
Thanks so much in advance!

Newbie

Posts

Joined
Fri Feb 22, 2019 1:06 am

Post by straightlight » Fri Feb 22, 2019 7:05 am

Check your Developers Kit by hitting F12 function on your keyboard when uploading those 3 images. In the console tab, notice the appearing error messages.

Dedication and passion goes to those who are able to push and merge a project.

Regards,
Straightlight
Programmer / Opencart Tester


Legendary Member

Posts

Joined
Mon Nov 14, 2011 11:38 pm
Location - Canada, ON

Post by supercoco » Fri Feb 22, 2019 10:07 pm

Hi,
I didn't got any error, and image still being http instead https (Image attached)

Attachments

Screenshot_6.png

Here is the result: - Screenshot_6.png (266.7 KiB) Viewed 1533 times


Newbie

Posts

Joined
Fri Feb 22, 2019 1:06 am

Post by straightlight » Fri Feb 22, 2019 10:22 pm

Ensure your .htaccess, config.php and admin/config.php files are properly configured with the SSL protocol. Just configuring the .htaccess file is insufficient.

Dedication and passion goes to those who are able to push and merge a project.

Regards,
Straightlight
Programmer / Opencart Tester


Legendary Member

Posts

Joined
Mon Nov 14, 2011 11:38 pm
Location - Canada, ON

Post by supercoco » Sat Feb 23, 2019 1:03 am

Of course i did both well, every content is https but that 3 images...Attaching config.php and admin/config.php files...
What should i try now?

Attachments

configphp.png

configphp.png (17.43 KiB) Viewed 1514 times

adminconfigphp.png

adminconfigphp.png (25.07 KiB) Viewed 1514 times


Newbie

Posts

Joined
Fri Feb 22, 2019 1:06 am

Post by supercoco » Sat Feb 23, 2019 1:05 am

Or may work to change the route manually with https instead http? If yes, where i can find that file to change? (banners)

Thanks in advance

Newbie

Posts

Joined
Fri Feb 22, 2019 1:06 am

Post by OSWorX » Sat Feb 23, 2019 2:09 am

supercoco wrote:
Sat Feb 23, 2019 1:05 am
Or may work to change the route manually with https instead http? If yes, where i can find that file to change? (banners)

Thanks in advance
Simply edit the URLs inside the slideshow from http to https (or inside the HTML-module if this is used).
While I recommend my clients always not to use any protocol, instead define these URLs like this:

Instead:

Code: Select all

http://www.jflazartigue.es/image/galeria/acondicionador-regenerativo.jpg

Code: Select all

../image/galeria/acondicionador-regenerativo.jpg
or wherever your banner images are stored.

Defining this way will not display the images in the backend, but who needs that?

Full Stack Web Developer :: Dedicated OpenCart Development & Support DACH Region
Contact for Custom Work / Fast Support.


User avatar
Guru Member

Posts

Joined
Mon Jan 11, 2010 10:52 pm
Location - Austria

Post by supercoco » Sat Feb 23, 2019 3:35 pm

Thanks for the reply, but where i can put the image route, if i only can change slideshow banner images uploading an image? (Image attached from banner manage section)

Attachments

Screenshot_1.png

Screenshot_1.png (20 KiB) Viewed 1475 times


Newbie

Posts

Joined
Fri Feb 22, 2019 1:06 am

Post by OSWorX » Sat Feb 23, 2019 4:11 pm

First of all, I have no mood to learn another language (screenshot).
Second, as it seems, you are using an older OpenCart version.
And finally, it seems that this is an extra installed extension.

So please, provide all infos needed (e.g. OpenCart Version, installed - and used - Extension) in a readable language.
Then - maybe - someone may help you.

Full Stack Web Developer :: Dedicated OpenCart Development & Support DACH Region
Contact for Custom Work / Fast Support.


User avatar
Guru Member

Posts

Joined
Mon Jan 11, 2010 10:52 pm
Location - Austria

Post by supercoco » Sat Feb 23, 2019 6:04 pm

Hi again,

It's no my intention to ask to learn any languaje lol...i'm newbie here and on Opencart, so i don't know what to do to explain better or what technical details have i to provide.
About the Opencart version: 2.0.3.1
About the banner module, i think it's the default that comes with this Opencart version? (Image attached)
"Gestion de Banners" means "Manage Banners"

Thanks again

Attachments

banner-default.png

banner-default.png (12.25 KiB) Viewed 1450 times


Newbie

Posts

Joined
Fri Feb 22, 2019 1:06 am

Post by OSWorX » Sat Feb 23, 2019 8:32 pm

If it would be the 'normal' standard banner module, it would be not have an extra menu entry.
The standard Banner module is located under Extensions > Module > Banner
And the banner itself are located under System > Design > Banner where you add the route manual (as already described by me earlier).

But youe images are displaying something else - a Banner extension which is not standard.

Full Stack Web Developer :: Dedicated OpenCart Development & Support DACH Region
Contact for Custom Work / Fast Support.


User avatar
Guru Member

Posts

Joined
Mon Jan 11, 2010 10:52 pm
Location - Austria

Post by Banastres » Sun Jun 21, 2020 5:15 pm

I had this problem recently. It's because the catalog/controller/module/banner.php is loading the HTTP_Server inside the PHP file for the URL image. This will cause mixed content errors while using SSL as you mentioned above. Make sure the HTTPS_SERVER is set in the config.php.

Then open catalog/controller/module/banner.php and find: HTTP_SERVER change to HTTPS_SERVER:

Code: Select all

		foreach ($results as $result) {
			if (file_exists(DIR_IMAGE . $result['image'])) {
				$this->data['banners'][] = array(
					'title' => $result['title'],
					'link'  => $result['link'],
					'image' => HTTPS_SERVER . 'image/' . $result['image'],
				);
			}
		}
The mixed content errors for the banners will now be fixed, as they will load over HTTPS.

User avatar
Newbie

Posts

Joined
Fri Jun 19, 2020 5:52 pm

Post by OSWorX » Sun Jun 21, 2020 6:54 pm

Banastres wrote:
Sun Jun 21, 2020 5:15 pm
I had this problem recently. It's because the catalog/controller/module/banner.php is loading the HTTP_Server inside the PHP file for the URL image. This will cause mixed content errors while using SSL as you mentioned above. Make sure the HTTPS_SERVER is set in the config.php.

Then open catalog/controller/module/banner.php and find: HTTP_SERVER change to HTTPS_SERVER:

Code: Select all

		foreach ($results as $result) {
			if (file_exists(DIR_IMAGE . $result['image'])) {
				$this->data['banners'][] = array(
					'title' => $result['title'],
					'link'  => $result['link'],
					'image' => HTTPS_SERVER . 'image/' . $result['image'],
				);
			}
		}
The mixed content errors for the banners will now be fixed, as they will load over HTTPS.
Don't know from where you have this code, but for sure not from an OpenCart installtion.
Because the code inside this system reads like this:

Code: Select all

foreach ($results as $result) {
	if (is_file(DIR_IMAGE . $result['image'])) {
		$data['banners'][] = array(
			'title' => $result['title'],
			'link'  => $result['link'],
			'image' => $this->model_tool_image->resize($result['image'], $setting['width'], $setting['height'])
		);
	}
}
And anybody ca see, there is NO HTTP_SERVER
And this is since the 1.5.x releases.

Full Stack Web Developer :: Dedicated OpenCart Development & Support DACH Region
Contact for Custom Work / Fast Support.


User avatar
Guru Member

Posts

Joined
Mon Jan 11, 2010 10:52 pm
Location - Austria

Post by Banastres » Sun Jun 21, 2020 7:42 pm

OSWorX wrote:
Sun Jun 21, 2020 6:54 pm
Banastres wrote:
Sun Jun 21, 2020 5:15 pm
I had this problem recently. It's because the catalog/controller/module/banner.php is loading the HTTP_Server inside the PHP file for the URL image. This will cause mixed content errors while using SSL as you mentioned above. Make sure the HTTPS_SERVER is set in the config.php.

Then open catalog/controller/module/banner.php and find: HTTP_SERVER change to HTTPS_SERVER:

Code: Select all

		foreach ($results as $result) {
			if (file_exists(DIR_IMAGE . $result['image'])) {
				$this->data['banners'][] = array(
					'title' => $result['title'],
					'link'  => $result['link'],
					'image' => HTTPS_SERVER . 'image/' . $result['image'],
				);
			}
		}
The mixed content errors for the banners will now be fixed, as they will load over HTTPS.
Don't know from where you have this code, but for sure not from an OpenCart installtion.
Because the code inside this system reads like this:

Code: Select all

foreach ($results as $result) {
	if (is_file(DIR_IMAGE . $result['image'])) {
		$data['banners'][] = array(
			'title' => $result['title'],
			'link'  => $result['link'],
			'image' => $this->model_tool_image->resize($result['image'], $setting['width'], $setting['height'])
		);
	}
}
And anybody ca see, there is NO HTTP_SERVER
And this is since the 1.5.x releases.
I didn't realize the OP was referring to 2.0~ until i checked the forum breadcrumb. The problem sound similar to mine, hence me finding the thread. For 1.5.6.4 that is what worked for me. The banner module was using HTTP_SERVER causing mixed content errors while using SSL.

2.0~ could have a similar scenario. I don't know. Because i don't use it.

User avatar
Newbie

Posts

Joined
Fri Jun 19, 2020 5:52 pm
Who is online

Users browsing this forum: No registered users and 218 guests