HTTPS Insecure Content Blocked

Popular automatic website translation tool

HTTPS Insecure Content Blocked

Postby cagerattle » Mon Sep 23, 2013 9:04 pm

Hello,

I sent an email, but never got a response.

On https://www.csregional.com/ the plugin translates the content, but all of the css, js, etc links get changed to http:// and are then blocked. See: https://www.csregional.com/ko/

The Wordpress and Site Addresses are both set to: https://www.csregional.com

Here is the htaccess content:
Code: Select all
# BEGIN s2Member GZIP exclusions
<IfModule mod_rewrite.c>
   RewriteEngine On
   RewriteBase /
   RewriteCond %{QUERY_STRING} (^|\?|&)s2member_file_download\=.+
   RewriteRule .* - [E=no-gzip:1]
</IfModule>
# END s2Member GZIP exclusions

# BEGIN WordPress
<IfModule mod_rewrite.c>
# gtranslate config
RewriteRule ^([a-z]{2}|zh-CN|zh-TW)/([a-z]{2}|zh-CN|zh-TW)/(.*)$ /$1/$3 [R=301,L]
RewriteRule ^([a-z]{2}|zh-CN|zh-TW)/([a-z]{2}|zh-CN|zh-TW)$ /$1/ [R=301,L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^([a-z]{2}|zh-CN|zh-TW)/(.*)$ /gtranslate/translate.php?lang=$1&url=$2 [L,QSA]
RewriteRule ^([a-z]{2}|zh-CN|zh-TW)$ /gtranslate/translate.php?lang=$1 [L,QSA]
RewriteEngine On
RewriteBase /
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
</IfModule>

# END WordPress


Debug Info:
Code: Select all
* About to connect() to www.csregional.com port 80 (#0)
*   Trying 75.126.12.215... * connected
* Connected to www.csregional.com (75.126.12.215) port 80 (#0)
> GET /our-team/ HTTP/1.1
User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_8_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/29.0.1547.65 Safari/537.36
Host: www.csregional.com
Accept: */*
Cookie: PHPSESSID=7qevbi9njf9v91ua1tm82mt452

< HTTP/1.1 200 OK
< Date: Mon, 16 Sep 2013 19:33:57 GMT
< Server: Apache
< Expires: Thu, 19 Nov 1981 08:52:00 GMT
< Cache-Control: no-store, no-cache, must-revalidate, post-check=0, pre-check=0
< Pragma: no-cache
< X-Pingback: https://www.csregional.com/xmlrpc.php
< X-Powered-By: PleskLin
< Connection: close
< Transfer-Encoding: chunked
< Content-Type: text/html; charset=UTF-8
<
* Closing connection #0


Please get back to be as soon as you can.

Thank you!
cagerattle
 
Posts: 7
Joined: Sun Nov 11, 2012 4:09 am

Re: HTTPS Insecure Content Blocked

Postby Yana » Tue Sep 24, 2013 12:01 am

Hi,

Please try to use absolute URLs for CSS, JavaScript . Also please check your webiste for html validation errors and fix end tag errors You can use validator.w3.org to check your website ..
http://validator.w3.org/check?uri=https ... ne&group=0
Regards,

Yana Ghahramanyan - GTranslate Team

Please leave your feedback on your CMS plugin directory. It is very important for us!
Google Translate Joomla
Google Translate WordPress
Google Translate Drupal
Yana
 
Posts: 4135
Joined: Thu Jan 12, 2012 6:21 pm

Re: HTTPS Insecure Content Blocked

Postby cagerattle » Tue Sep 24, 2013 1:18 am

I fixed all of the validation errors and still have the same problem.

All of the url's use wordpress php calls like:

Code: Select all
<?php bloginfo( 'stylesheet_url' ); ?>


and

Code: Select all
<link rel="stylesheet" href="<?php echo esc_url( THEME_URI . '/shortcodes.css' ); ?>" type="text/css" media="screen" />


THEME_URI is defined as the following:
Code: Select all
define( 'THEME_URI', get_template_directory_uri() );


All of these work php calls work when the site is in the native language, English. For some reason the https links are being overwritten by http.
cagerattle
 
Posts: 7
Joined: Sun Nov 11, 2012 4:09 am

Re: HTTPS Insecure Content Blocked

Postby Edvard » Tue Sep 24, 2013 2:15 am

Hi,

It seems that the internal request for the original content which should be translated later goes through port 80 and in that case Wordpress outputs http instead of the https for the links. GTranslate tries to detect the protocol using $_SERVER['SERVER_PROTOCOL'] variable before sending the request for the original content. If it is not set in your environment or it is set to a wrong value then that can be the reason.

To avoid that you need to make sure that $_SERVER['SERVER_PROTOCOL'] is being set correctly or make the path for your css/js files protocol independent. For example you can use href="//www.domain.com/..." instead of href="https://www.domain.com/..."

Let me know.

Thanks!
Regards,

Edvard Ananyan - GTranslate Team

Please leave your feedback on your CMS plugin directory. It is very important for us!
Google Translate Joomla
Google Translate WordPress
Google Translate Drupal
Edvard
Site Admin
 
Posts: 4185
Joined: Mon Jun 28, 2010 1:54 pm
Location: Yerevan, Armenia

Re: HTTPS Insecure Content Blocked

Postby cagerattle » Tue Sep 24, 2013 5:46 am

Got it fixed, thanks!
cagerattle
 
Posts: 7
Joined: Sun Nov 11, 2012 4:09 am

Re: HTTPS Insecure Content Blocked

Postby Edvard » Tue Sep 24, 2013 12:26 pm

Thank you! Can you share what you did?
Regards,

Edvard Ananyan - GTranslate Team

Please leave your feedback on your CMS plugin directory. It is very important for us!
Google Translate Joomla
Google Translate WordPress
Google Translate Drupal
Edvard
Site Admin
 
Posts: 4185
Joined: Mon Jun 28, 2010 1:54 pm
Location: Yerevan, Armenia

Re: HTTPS Insecure Content Blocked

Postby cagerattle » Tue Sep 24, 2013 7:15 pm

Sure,

We added the following to the config.php file:
Code: Select all
if ($_SERVER['HTTPS'])
{
$_SERVER['SERVER_PROTOCOL'] = 'HTTPS';
}
return;

echo '<pre>';
print_r($_GET);
print_r($_SERVER);
exit;
cagerattle
 
Posts: 7
Joined: Sun Nov 11, 2012 4:09 am

Re: HTTPS Insecure Content Blocked

Postby Edvard » Tue Sep 24, 2013 7:16 pm

Thank you! It was a pleasure providing you support!
Regards,

Edvard Ananyan - GTranslate Team

Please leave your feedback on your CMS plugin directory. It is very important for us!
Google Translate Joomla
Google Translate WordPress
Google Translate Drupal
Edvard
Site Admin
 
Posts: 4185
Joined: Mon Jun 28, 2010 1:54 pm
Location: Yerevan, Armenia


  • Related Topics
    Replies
    Views
    Last post

Who is online

Users browsing this forum: No registered users and 0 guests

2GLux
cron