Closed vithultnair closed 4 years ago
Hi
Please, check if you don't have hard-coded http
instead of https
in your theme.
Not really! I checked everything and found the http links are generated by the following elements
{$value.cover_url}
- (In blog file)
{$post.cover_url}
- (In post file)
{?= $post.author.avatar ?}
- (In post file)
All of these are dynamically generated and have nothing to do with the theme!
I've made a temporary fix by using str replace, but i know it's not the right thing to do.
<img src="{?= str_replace( 'http://', 'https://', $value.cover_url ) ?}" alt="{$value.title}">
Also the og:image attribute being generated automatically is having an http url, but i couldn't figure out where it is being generated from! :(
Batflat has https support and should generate the URL correctly. Maybe you can try to force your website to redirect to https. https://stackoverflow.com/questions/4398951/force-ssl-https-using-htaccess-and-mod-rewrite
That didn't make a change! Still the urls generated are http://
! It would be better if there was an option to enter the base url in admin panel which will prevent issues like this!
Enable DEV_MODE in inc/core/defines.php
Open DebugBar and in Requests tab should be[HTTPS] => on
. If you can't find this line, then there is probably a problem with your server. Please check if our SSL is correctly installed.
If the problem persists, you can manually set the https protocol:
Open inc/core/lib/functions.php
;
Find $protocol = 'http://';
and replace with https://
.
Cheers
Got it working finally! I don't have an SSL at my origin server, i am using cloudflare SSL. So the script couldn't determine that my site have an SSL! eventhough this is not a permanent fix ,this will solve my problem for now! Thanks @michu2k
Btw please note that Batflat couldn't determine whether the site is on https or not correctly while the site uses an ssl from cdn like cloudflare.
Also please lemme know if there is any fix for error with Sitemap module(error code: 500) .
There is no official fix for the sitemap error. You can check possible fixes created by sim2github https://github.com/sruupl/batflat/pull/39
Okay 😊 Thanks again @michu2k Loving Batflat
Not really! I checked everything and found the http links are generated by the following elements
{$value.cover_url}
- (In blog file){$post.cover_url}
- (In post file){?= $post.author.avatar ?}
- (In post file) All of these are dynamically generated and have nothing to do with the theme!I've made a temporary fix by using str replace, but i know it's not the right thing to do.
<img src="{?= str_replace( 'http://', 'https://', $value.cover_url ) ?}" alt="{$value.title}">
Also the og:image attribute being generated automatically is having an http url, but i couldn't figure out where it is being generated from! :(
Hi batflat Community,
Cover/featured image url, tags input in admin panel and og meta properties doesn't seems to work properly while using ssl.
Suggestions: An option to add cover/featured image from an external link so that one can add image from cdns like cloudinary! It would be helpful for those who is on a shared hosting with limited resources.