Forum Archive - Images not served on https page

Images not served on https page
Nov 11, 2016 7:38 am by sadashiv
I have the users profile served on https. We display few images of the users on this page. When I check with the default site i.e. no translation then the images get served but if I switch the language before login and then view my profile page then the images are broken. Here is a screenshot of what I see http://casetracker.gokhalemethod.com/sites/default/files/161110_logingerman.jpg Would like to know how can I fix this. Thanks, Sadashiv
Re: Images not served on https page
Nov 11, 2016 8:28 am by Yana
Hi, Can you send me test username password so I can check it?
Re: Images not served on https page
Nov 11, 2016 1:48 pm by sadashiv
Hi, Creds send on PM. Steps to replicate. Open http://gokhalemethod.com" rel="nofollow" target="_blank change language to german click on login enter creds see that you see broken images after login (it takes you to your profile page) Now you can logout change the language to English and try the same steps and it works. One of my co-worker also reported one more issue i.e. if you logout and change language and try to login with correct creds then it redirects you to the same login page, this cannot be replicated everytime. Seems to me that something is wrong with ssl and translated pages or something else. Thanks, Sadashiv
Re: Images not served on https page
Nov 13, 2016 4:59 pm by Yana
Hi, Please change image URLs to relative.
Re: Images not served on https page
Nov 14, 2016 5:17 pm by sadashiv
I changed the urls to relative and can see them changed without translation but on the translated pages its still picking the absolute urls. Is is something cached and will pick fresh eventually or something is not right? Thanks, Sadashiv.
Re: Images not served on https page
Nov 16, 2016 7:44 am by Yana
Hi, Please set cookie domain to ".gokhalemethod.com" with dot prefix.
Re: Images not served on https page
Nov 17, 2016 8:54 am by sadashiv
I already had that in my settings.php (drupal) and now also added to php.ini and reloaded httpd but still can't see the change. Can you update how I can check the cookie_domain is .gokhalemethod.com ? Thanks, Sadashiv.
Re: Images not served on https page
Nov 20, 2016 9:37 am by Edvard
Hi, You can find it out by checking your browser cookies for your domain. Right now the problem is that when you login on some language, the session cookie is not shared between your main domain and other language subdomains and you are not logged in in all languages, so when you want to load image from your main domain you are not logged in there too and it fails. If you have cookie domain with dot prefix, session cookie will be shared, so when you login on some language you will be also logged in in other languages. Thanks!
Re: Images not served on https page
Nov 21, 2016 12:50 pm by sadashiv
I think the problem is that in case of translated page it's taking wrong cookie domain. I tried to login without translate and you can see that the cookie domain is .gokhalemethod.com (refer attached screen shot gokhalemethod_domain.png) http://gokhalemethod.com/sites/default/files/theme_images/gokhalemethod_domain.png I then tried to login with translate german (de.gokhalemethod.com) and can see the cookie domain is .de.gokhalemethod.com (refer attached screen shot de_gokhalemethod_domain.png) http://gokhalemethod.com/sites/default/files/theme_images/de_gokhalemethod_domain.png I have a static code of setting it to .gokhallemethod.com, can't understand why it is setting to .de.gokhalemethod.com Thanks, Sadashiv.
Re: Images not served on https page
Nov 23, 2016 9:03 pm by Edvard
Hi, You need to make sure that the cookie domain for your session cookie is set to .gokhallemethod.com. If you can send admin and ftp access to [email protected] I can look into. Please mention where should I look if you know. Thanks!
Re: Images not served on https page
Nov 24, 2016 4:52 am by sadashiv
In my screen shots the cookies with pattern SESS* are the session cookies and as you can see the translated pages are showing .de.gokhalemethod.com I don't know why this is happening as I have ".gokhalemethod.com" hardcoded as cookie domain in my php.ini as well as in drupal settings.php file. Thanks, Sadashiv
Re: Images not served on https page
Nov 28, 2016 3:24 pm by sadashiv
Hi Would like to know how we can solve this? Also if you check the non translated page shows relative urls and the translated page shows absolute urls, I think I made them relative and if served relative then will show the images as the cookie for the current sub domain will be used as suggested at images-not-served-https-page-t5159.html#p21468 Thanks, sadashiv
Re: Images not served on https page
Nov 30, 2016 7:15 pm by Edvard
Hi, We will need to solve the issue with cookie domain. If you can provide access I can look into for you. Thanks!
Re: Images not served on https page
Dec 1, 2016 3:35 am by sadashiv
Hi, I'll need your ip address so that I can add it to my firewall then I'll PM the creds. Thanks, sadashiv
Re: Images not served on https page
Dec 1, 2016 8:20 pm by Edvard
Hi, I do not have a static IP. My IP changes from time to time. Thanks!
Re: Images not served on https page
Dec 2, 2016 5:45 am by sadashiv
We can't keep a open ssh as we face attacks and cause the network to fail. I can send snippets of files you want and you can verify. Please update which files you want and I'll attach the files or part of the files here. Thanks, Sadashiv.
Re: Images not served on https page
Feb 7, 2017 10:19 am by sadashiv
Hey, Would like to know whether you can help me to debug this. Thanks, Sadashiv.
Re: Images not served on https page
Nov 27, 2017 5:16 pm by sadashiv
I tried to check further and found that the cookie domain is .gokhalemethod.com but that's not send when I switch the language i.e. http://gokhalemethod.com/sites/default/ ... 4%20PM.png shows the SSESS... cookie has .gokhalemethod.com as cookie domain but when I switch the language to german then the SSESS.. cookie is not passed and the request is considered anonymous as we can see here http://gokhalemethod.com/sites/default/ ... 1%20PM.png When I switch the language prior login and then login then I can see the cookie domain as .de.gokhalemethod.com as shown at http://gokhalemethod.com/sites/default/ ... 8%20PM.png I don't understand why this is happening. Can you help me to fix this. I am sure I have .gokhalemethod.com as cookie domain. Thanks, Sadashiv
Re: Images not served on https page
Dec 7, 2017 2:53 pm by Yana
Hi, If you can send FTP access we can fix it. Please contact by our live chat support. Thanks!

SIMILAR TOPICS

GT doesn't work...error 404 pageJan 28, 2019 5:36 pmReplies: 1Post by: vincenzodinuzzo
Translate website to any specific language, on page loadJan 19, 2019 6:49 amReplies: 1Post by: Leaon7756
Best way to translate a page in WordPress?Jan 7, 2019 11:10 amReplies: 3Post by: Tonnystark
Is it translate web page in any languageAug 17, 2018 12:23 pmReplies: 3Post by: jaizoojee
Set the language through the URL, from a different pageSep 2, 2018 7:51 pmReplies: 3Post by: Jorgedmm

Try GTranslate with a free 15 day trial