Post by davidOSM » Sat Feb 03, 2018 6:43 pm

I am tearing my hair out over this O0

This installed extension is not working because the javascript request is http on an https page. The problem is I don't know where the http url is coming from or how to change it to https? Any help gratefully apprecated

Image
Last edited by davidOSM on Tue Feb 06, 2018 5:49 am, edited 1 time in total.

New member

Posts

Joined
Thu Aug 31, 2017 5:24 am

Post by cyclops12 » Sat Feb 03, 2018 9:52 pm

Probably best to ask the author of the extension for help first

Expert Member

Posts

Joined
Sun Sep 27, 2015 1:10 am

Post by davidOSM » Sat Feb 03, 2018 11:11 pm

Unfortunately, they are not responding. It worked perfectly until I installed Let's Encrypt.

The "/var/www/storage/modification/catalog/view/theme/default/template/product/product.twig" file contains the below line but It does not explain where the http url is coming from unless I am missing something

<script type="text/javascript" src="{{ module_live_options.module_live_options_js }}"></script>

New member

Posts

Joined
Thu Aug 31, 2017 5:24 am

Post by IP_CAM » Sun Feb 04, 2018 2:51 am

Well, this script is part of a live_options Product Page Extension, and if an OcMod
is part of the Game, then, you will likely find this link in an extension in your oc_modification
Database Table Section.
Ernie

My Github OC Site: https://github.com/IP-CAM
5'600 + FREE OC Extensions, on the World's largest private Github OC Repository Archive Site.


User avatar
Legendary Member

Posts

Joined
Tue Mar 04, 2014 1:37 am
Location - Switzerland

Post by davidOSM » Sun Feb 04, 2018 4:56 am

Thanks, I am not sure if OCMod is involved but will check.

New member

Posts

Joined
Thu Aug 31, 2017 5:24 am

Post by davidOSM » Sun Feb 04, 2018 9:29 pm

The extension Install.xml is adding this.
-<file path="catalog/view/theme/*/template/product/product.twig">

-<operation>
-<search>
<![CDATA[{{ footer }}]]>
</search>
-<add position="before">
<![CDATA[ <script type="text/javascript" src="{{ module_live_options.module_live_options_js }}"></script> ]]>
</add>

Am I correct in thinking that the curly brackets are adding the http:// path? And if so where is this defined?

New member

Posts

Joined
Thu Aug 31, 2017 5:24 am

Post by IP_CAM » Mon Feb 05, 2018 2:12 am

well, I have no idea on, from/to what this module_live_options.module_live_options_js is linking,
it's either strictly 'internally linked' by starting at the catalog/.. level, or then by plain 'http'. But you
could try something like this, to then find out, if the link is written correctly, or then eventually + wrongly add's
a double http:// + https:// link into the line, in the corresponsing database oc_modification Section.

Code: Select all

<script type="text/javascript" src="https://onestopmods.com/{{ module_live_options.module_live_options_js }}"></script>
But if the Extension itself already exists in the Database oc_modification Section,
you could then just manually change the link to https:// onestopmods.com/ and then
save the DB-Table again, and it would stay this way, until you ever remove the OcMod again.
This way, you would not have to de-install the modification, and re-install it again, by use of the
modified install.xml file. (Strictly theorecitally, it's hard to guess without anything to see or test... ::) )
Good try! ;)
Ernie

My Github OC Site: https://github.com/IP-CAM
5'600 + FREE OC Extensions, on the World's largest private Github OC Repository Archive Site.


User avatar
Legendary Member

Posts

Joined
Tue Mar 04, 2014 1:37 am
Location - Switzerland

Post by davidOSM » Mon Feb 05, 2018 6:26 pm

Ernie, thanks for the pointers

The only link in oc_modifications>ajax_live_options record is to the author's demo page 'http://demo.j-mall.com.tw/'

I tried changing the script line as you suggested but it is still concatenating the http url as below

https://onestopmods.com/http://onestopm ... uct_id=137

Which makes me think the curly brackets are significant. I will experiment by removing them and see.
Last edited by davidOSM on Mon Feb 05, 2018 11:18 pm, edited 1 time in total.

New member

Posts

Joined
Thu Aug 31, 2017 5:24 am

Post by davidOSM » Mon Feb 05, 2018 8:06 pm

Well, experimenting with the curly brackets removed the http url but not quite as expected.

Replacing the script src with a literal line for one product proves the extension works perfectly.

<script type="text/javascript" src=https://onestopmods.com/index.php?route ... "></script>

I am convinced the curly brackets are pointing to a default line in a file somewhere. I just don't know which one.

New member

Posts

Joined
Thu Aug 31, 2017 5:24 am

Post by davidOSM » Tue Feb 06, 2018 5:51 am

Probably something I missed when I installed Let's Encrypt.

In config.php it must read
HTTP define('HTTP_SERVER', 'https://mysite.com/')

Extension works perfectly now with no mixed content errors

Thanks for you help all

New member

Posts

Joined
Thu Aug 31, 2017 5:24 am

Post by open_user » Fri Dec 07, 2018 10:16 am

davidOSM wrote:
Tue Feb 06, 2018 5:51 am
Probably something I missed when I installed Let's Encrypt.

In config.php it must read
HTTP define('HTTP_SERVER', 'https://mysite.com/')

Extension works perfectly now with no mixed content errors

Thanks for you help all
Thanks a lot. I have been going crazy for a week and a half with this. It solved all my problems.

Newbie

Posts

Joined
Wed Jun 06, 2018 10:10 am

Post by IP_CAM » Fri Dec 07, 2018 11:49 am

Well, this has been mentioned hundreds of times around here, that BOTH
config.php settings should be 'declared' in either HTTP:// or HTTPS://,
but better not in both, or it might end up in mixed Content Reports, if
one uses HTTPS://, and still has the HTTP:// Config routing named to HTTP://
Ernie

My Github OC Site: https://github.com/IP-CAM
5'600 + FREE OC Extensions, on the World's largest private Github OC Repository Archive Site.


User avatar
Legendary Member

Posts

Joined
Tue Mar 04, 2014 1:37 am
Location - Switzerland
Who is online

Users browsing this forum: DigitCart, Semrush [Bot] and 42 guests