Jump to content
  • 0
BoKr

header logo breaks SSL

Question

Hello

 

we run 1.5.6.2 with PrestaThemeMaker theme.

 

Issue is that Firefox claims the header logo breaks SSL. Namely, I think from where it is loaded.

However, I compared the tag in header.tpl with the one in default theme and they look the same for me :(

 

the site is: www. g r u e nes-spiel z eug.de

 

The logo is the only media that is not loaded via https on secure parts of the shop:

 

http://www.g r u e n es-spiel z eug.de/img/logo.jpg?1390319694

 

header.tpl

!-- Header -->
			<div id="header">
				<div id="header_right">
                                    <div id="logo_wrapper">
				<a id="header_logo" href="{$base_dir}" title="{$shop_name|escape:'htmlall':'UTF-8'}">
                                            <img class="logo" src="{$logo_url}" alt="{$shop_name|escape:'htmlall':'UTF-8'}" />
			<!-- this is how I did it in ps1541 <img class="logo" src="{$img_ps_dir}logo-1.png"  alt="{$shop_name|escape:'htmlall':'UTF-8'}" /> -->
				</a>
                                    </div>    
					{$HOOK_TOP}
				</div>
			</div> 

So,

 

since my theme and default theme look the same for me, why is this the case? Is the {$base_dir} really the problem?

If so should I use {$img_ps_dir} and copy the logo there?

 

 

Share this post


Link to post
Share on other sites

24 answers to this question

Recommended Posts

  • 0

{$base_dir} generates unsecured link, instead of it use {$content_dir}.

but i think that problem is not related to this, because this variable isn't used in src param.

 

can you for test purposes disable cache? problem appears also without it?

Share this post


Link to post
Share on other sites
  • 0

Hello Vekia!

 

Thanks for looking into my issue.

 

The problem remains.

I disabled Cache and disabled all CC. Emptied cached and and broswer cache. Strg-F5 and relogged in my test buyer.

 

Logo is still being loaded via http.

 

Please have a look at our site.

 

PS:

Is is freshly upgraded. Did it yesterday and am very happy about 1.5.6.2 as far as I can tell but these ongoiung SSL issues are really annoying :)

I had of course a look through duckduckgo :P and this forum and found some older threads that looked the same though in Spanish.

Share this post


Link to post
Share on other sites
  • 0

That' is good. Ok, that was sarcastic but at least the chances have doubled to solve this.

 

cheers

Boris

Share this post


Link to post
Share on other sites
  • 0

I updated from 1.5.2 to 1.5.6 today.  I too am having the exact same issue of the logo being loaded as http instead of https on secure pages and it's breaking my SSL Cert.

 

Any idea of how fix this issue?

Share this post


Link to post
Share on other sites
  • 0

Hi again,

 

I spoke too fast. Can you guys try to apply this commit ?

 

https://github.com/PrestaShop/PrestaShop/commit/640100f10f789129dc50a0d68e3e82cedf85aad3

 

Best regards

Edited by Gregory Roussac

Share this post


Link to post
Share on other sites
  • 0

Thanks Gregory.

 

 

To be on the sage side:

 

I use ps  1562 and had this line in the Link.php

return $this->protocol_content.Tools::getMediaServer($filepath).$filepath;

It is a bit different from the GIT file but I commented it out and replaced it with the new improvement.

Can you please tell me briefly that I did ok?

 

Thanks alot.

Share this post


Link to post
Share on other sites
  • 0

In 1.6.0.5 problem with logo and breadcrumb persists. 

 

I found partial solution here: http://www.sslshopper.com/apache-redirect-http-to-https.html

 

By adding this piece of code to .htaccess 

RewriteEngine On
RewriteCond %{HTTPS} off
RewriteRule (.*) https://%{HTTP_HOST}%{REQUEST_URI} 

all trafic is redirected from http to https, which is fine, when user forgets to type https. It also solves the problem with logo and breadcrumb.

 

The problem is, this solution doesn't work on FB canvas page.  Any solution?

Share this post


Link to post
Share on other sites
  • 0

In 1.6.0.5 problem with logo and breadcrumb persists. 

 

I found partial solution here: http://www.sslshopper.com/apache-redirect-http-to-https.html

 

By adding this piece of code to .htaccess 

RewriteEngine On
RewriteCond %{HTTPS} off
RewriteRule (.*) https://%{HTTP_HOST}%{REQUEST_URI} 

all trafic is redirected from http to https, which is fine, when user forgets to type https. It also solves the problem with logo and breadcrumb.

 

The problem is, this solution doesn't work on FB canvas page.  Any solution?

This worked for me PS1.5.6.2

Thanks

Share this post


Link to post
Share on other sites
  • 0

So far the only 2 things I see causing SSL errors is the actual logo and a font from fonts.googleapis.com/css?family=xxxxx that Chrome developer tools found...

 

will the above fix both?

Share this post


Link to post
Share on other sites
  • 0
sft    0

Hi,

 

I went into the link.php file but it was already like this:

 

public function getMediaLink($filepath)
    {
        return $this->protocol_content.Tools::getMediaServer($filepath).$filepath;
    }

    /**

 

So there was nothing for me to change as per https://github.com/PrestaShop/PrestaShop/commit/640100f10f789129dc50a0d68e3e82cedf85aad3

 

Can anyone suggest another way of fixing this issue? I am using version PS version 1.6.0.9

 

Thanks
 

Share this post


Link to post
Share on other sites
  • 0

i HAVE THE SAME ISSUE AND FOUND THE SAME THING AS POSTED BY SFT :

 

Hi,

 

I went into the link.php file but it was already like this:

 

public function getMediaLink($filepath)
    {
        return $this->protocol_content.Tools::getMediaServer($filepath).$filepath;
    }

    /**

 

So there was nothing for me to change as per https://github.com/P...e3e82cedf85aad3

 

Can anyone suggest another way of fixing this issue? I am using version PS version 1.6.0.11

 

PLS RESPOND WITH THE SOLUTION

Share this post


Link to post
Share on other sites
  • 0

Hi,

I have 1.5.6.2 and I do not understand this solution. What am I supposed to do on the link.php file? And where in the back-office do I find the option to activate Apache multi-view?

Please help.

Share this post


Link to post
Share on other sites

×