Crew Manifest and Admin CP don't load over https

Having a problem getting Nova installed? Can't figure out why something isn't working right? This is the place to get help and report any bugs you find with Nova!

Williams Mon Dec 05, 2016 12:28 pm

Crew Manifest and Admin CP don't load over https

So, I've recently been able to set up HTTPS for all sites on my server after enabling WHM's AutoSSL to generate certificates for all of them. I've not yet disabled http connections though, as I want to try to make sure that everything works properly over https before enforcing it globally.

The problem I've come across is that the Admin CP and Crew Manifest don't seem to load over HTTPS. I'm guessing that this might be fixed by redirecting all http requests over to https, but I'd like to see if I can get it working independently first in the meantime.

Both pages just get stuck showing the 'Loading' bar - other pages all seem to be loading fine, so I'd guess the problem lies in how that functionality works. Could it be trying to use a http connection to load that and falling over, or doing something else that would stop it loading the content when using port 443?
Matt aka
Krace / Williams

USS HighlanderMy Xtras Profile
ImageImage

Posts: 287


Williams Mon Dec 05, 2016 12:30 pm

Re: Crew Manifest and Admin CP don't load over https

I've also just noticed that anything that should be showing as tabs is just appearing in a list - like the recent news items/mission posts/personal logs on the homepage.

http://highlander.pegasusfleet.net/nova and http://highlander.pegasusfleet.net/nova ... nnel/index
vs
https://highlander.pegasusfleet.net/nova and https://highlander.pegasusfleet.net/nov ... nnel/index
Matt aka
Krace / Williams

USS HighlanderMy Xtras Profile
ImageImage

Posts: 287


AgentPhoenix Mon Dec 05, 2016 1:10 pm

Re: Crew Manifest and Admin CP don't load over https

Start with echoing out site_url() and base_url()... are those two functions generating HTTPS URLs?
User avatar

Posts: 7531



Posts: 287


Williams Mon Dec 05, 2016 7:58 pm

Re: Crew Manifest and Admin CP don't load over https

I can see that the admin_index_js.php file is the one that has the code for hiding the loader and showing the loaded divs. I'm seeing that that is being pulled in directly into the <head> tag in the page source code.

However, while all of the site-hosted JS files being pulled in here are done over https, the first one in the list is http - http://code.jquery.com/jquery-1.8.2.min.js. Could it be that the protocol being off there is what's causing it not to run the JS code? Looking in the template_admin.php, I can see an include along the lines of

Code: Select all
<?php include_once($this->config->item('include_head_admin')); ?>


Where does that include_head_admin pull from?
Matt aka
Krace / Williams

USS HighlanderMy Xtras Profile
ImageImage

Posts: 287


Williams Mon Dec 05, 2016 8:02 pm

Re: Crew Manifest and Admin CP don't load over https

Tested by adding the following line about that include code in my template_admin.php file:

Code: Select all
<script type="text/javascript" src="//code.jquery.com/jquery-1.8.2.min.js"></script>


And the admin page started working again. Changing the protocol from http:// to just // should preserve whatever protocol you're on at the time (so if you're on http, it'll use that, if you're on https it'll use that). All I need now is to find the source include files to modify it in there and it should work (tabs started working with that little update too)
Matt aka
Krace / Williams

USS HighlanderMy Xtras Profile
ImageImage

Posts: 287


Williams Mon Dec 05, 2016 8:08 pm

Re: Crew Manifest and Admin CP don't load over https

Found it!

Under nova/modules/assets/ - updated all four include_head_[section].php files to use // instead of http://, and the site works again now. Tested on http and https and both are working as expected again.
Matt aka
Krace / Williams

USS HighlanderMy Xtras Profile
ImageImage

Posts: 287


AgentPhoenix Tue Dec 06, 2016 7:55 am

Re: Crew Manifest and Admin CP don't load over https

What version of Nova are you using? I'm looking at both those files now and see // in the source files, not http.

https://github.com/anodyne/nova/blob/2. ... in.php#L32
https://github.com/anodyne/nova/blob/2. ... in.php#L27
User avatar

Posts: 7531


Williams Tue Dec 06, 2016 5:20 pm

Re: Crew Manifest and Admin CP don't load over https

The site is still on 2.3.0 (I hadn't upgraded as my solution to let everyone view saved posts without raising their access level had its loophole closed somewhere in 2.4, though I didn't realise we were that far behind). I'll have to upgrade when I figure out a better solution for doing what I wanted with with the saved posts that works in the latest version.
Matt aka
Krace / Williams

USS HighlanderMy Xtras Profile
ImageImage

Posts: 287


AgentPhoenix Wed Dec 07, 2016 7:34 am

Re: Crew Manifest and Admin CP don't load over https

That's totally fine, I just wanted to make sure there wasn't something weird going on with the files being distributed. Glad you got this HTTPS stuff sorted out!
User avatar

Posts: 7531



Return to Help

Who is online

Users browsing this forum: No registered users and 3 guests