content_image tag ignores https in generated url

The place to talk about things that are related to CMS Made simple, but don't fit anywhere else.
Post Reply
d4creative
Forum Members
Forum Members
Posts: 58
Joined: Mon Nov 01, 2010 10:40 pm
Location: Sydney, Australia

content_image tag ignores https in generated url

Post by d4creative »

I am using {content_image} to load a background image ('urlonly') for a div in the page template. For pages that are designated to use https the image url that is generated by the tag uses http protocol, causing a security error for browsers with more locked-down security settings (i.e. my client who owns this website).

Any thoughts on why this is happening or how to fix it?
User avatar
DIGI3
Dev Team Member
Dev Team Member
Posts: 1788
Joined: Wed Feb 25, 2009 4:25 am
Location: Victoria, BC

Re: content_image tag ignores https in generated url

Post by DIGI3 »

I can't recreate this issue in 2.1.6, but I also tested in 2.2 and the generated urls are protocol-less.

A short term fix if you can't find out why it's doing it is to use the |replace modifier, e.g. {$myimage|replace:'http':'https'}

You should also check your config file and htaccess to make sure nothing is going on that would cause the url to be generated incorrectly.
Not getting the answer you need? CMSMS support options
User avatar
Rolf
Power Poster
Power Poster
Posts: 7825
Joined: Wed Apr 23, 2008 7:53 am
Location: The Netherlands
Contact:

Re: content_image tag ignores https in generated url

Post by Rolf »

Config.php and .htaccess settings for SSL described in:
https://www.cmscanbesimple.org/blog/set ... ade-simple
- + - + - + - + - + - + -
LATEST TUTORIAL AT CMS CAN BE SIMPLE:
Migrating Company Directory module to LISE
- + - + - + - + - + - + -
Image
Post Reply

Return to “The Lounge”