Jump to content

header logo breaks SSL


Recommended Posts

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?

 

 

Link to comment
Share on other sites

{$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?

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

  • 2 weeks later...
  • 2 weeks later...

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.

Link to comment
Share on other sites

  • 2 weeks later...
  • 1 month later...

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?

  • Like 1
Link to comment
Share on other sites

  • 1 month later...

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

Link to comment
Share on other sites

  • 2 weeks later...
  • 1 month later...
  • 1 month later...
  • 4 months later...

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
 

Link to comment
Share on other sites

  • 4 weeks later...

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

Link to comment
Share on other sites

  • 6 months later...
  • 1 year later...
×
×
  • Create New...