MyBB Community Forums

Full Version: Themes does not work after updating from HTTP to HTTPS
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2 3
(2024-03-26, 06:56 PM)effone Wrote: [ -> ]This is. The setting is completely driven by Board URL.
But additionally:
- Make hard refreshes several times (Ctrl + F5, in Win) and check. I've be doing that. I also asked to other users to try - same issue.
- Purge Browser cache from browser settings and check. I did that. I also shut down my network and PC.
- Enable "Minify Stylesheets" feature from ACP > Configuration > Settings > Server and Optimization Options : and check Checked. It was already set: Minify Stylesheets? On | Use a CDN? No
- Try using different browser and check. I could test in Edge and Chrome (PC and Smartphone)
- If you are under Cloudflare - need to purge cache there and check. I don't think the https://sourceforge.net/ is using Cloudflare.
- Comment out global.php : Line 338 (following) and check
$stylesheet_url .= "?t=".filemtime(MYBB_ROOT.$page_stylesheet);
Nothing has changed.


(2024-03-26, 07:04 PM)effone Wrote: [ -> ]
(2024-03-26, 06:53 PM)Micheus Wrote: [ -> ]Anyway, what is the difference between {$mybb->asset_url} and {$mybb->settings['bburl']}, since the first is getting updated and the second don't?
Would be safe I replace the 2nd by the 1st in order to fix the problem?
Both are same unless you have explicitly declared in settings to be using a CDN to serve your site assets.
Ok.

So, I just started to replace the bburl, but I can find from where the {$stylesheets} will come from.
By commenting and replacing it in headerinclude template:
 :
 :
<!-- {$stylesheets} -->

<link type="text/css" rel="stylesheet" href="{$mybb->asset_url}/cache/themes/theme12/global.min.css?t=1692451333" />
<link type="text/css" rel="stylesheet" href="{$mybb->asset_url}/cache/themes/theme12/css3.min.css?t=1691772550" />
<link type="text/css" rel="stylesheet" href="{$mybb->asset_url}/cache/themes/theme12/footer.min.css?t=1695243926" />
<link type="text/css" rel="stylesheet" href="{$mybb->asset_url}/cache/themes/theme12/extra.min.css?t=1691417743" />
<link type="text/css" rel="stylesheet" href="{$mybb->asset_url}/cache/themes/theme12/avatarep.min.css?t=1691417743" />

The forum is not beautiful. (https://www.wings3d.com/forum) Smile
But, I would like to not have this fix on template.
The solution can be found without hard edits to template files.

I see your site perfectly fine with SSL. Have you rectified or is issue still on your browser?
Your site is loading perfectly fine for me too, with https://
I tried it again on different devices and browsers

all seemed ok, but on Windows in Firefox I have for a part of a second what you can see in the screenshot; then it is correctly loaded

a lot of extern ressources are loaded
Sorry, I had to leave home.

(2024-03-26, 08:11 PM)Micheus Wrote: [ -> ]The forum is not beautiful. (https://www.wings3d.com/forum) Smile
But, I would like to not have this fix on template.
What a dumb am I?! Angry
I wrote the last sentence wrongly. It should be: The forum is NOW beautiful. (which is still may be in a bad English Blush)

So, MattyWjeisz, effone and bv64, yes the forum is OK now. But, because I inserted those stylesheets by hand - which is not nice since themes can be changed.

(2024-03-26, 08:42 PM)MattyWjeisz Wrote: [ -> ]The solution can be found without hard edits to template files.
That is what I asked in latest sentence.
Where I can change that "template" for stylesheets?
I looked at some possible templates for it, but I couldn't find it.


I don't understand much about servers, so just out of curiosity: From the server side, it would be possible one variable be cashed while other not?
Because is very strange that replacing bburl by asset_url the pages are built correctly. Maybe the asset_url is getting its value from the server instead of the database??
Revert changes you have made and then we will see site again. If problem occurs then we know is settings associated with asset_url.

You have correctly done these steps before revisit
- set board url to contain https://
- cleared cache in browser after make change
- revert back to {$mybb->asset_url}

After these changes, we will see site again and see if we experience same problem.
ACP --> Templates --> Find Updated Templates

there you should find your modified headerinclude template

choose on "Options"-Button --> Revert to Original
Nothing is taken from server. It checks for user defined CDN url else falls back directly to bburl.
Thats exactly what the core code says. I have gone through the code before stating.

The only reason we use asset_url to allow the system to adhere custom assets location (CDN, say).
Its not strange. Its system flexibility and a feature.
(2024-03-26, 08:42 PM)MattyWjeisz Wrote: [ -> ]The solution can be found without hard edits to template files.

I see your site perfectly fine with SSL. Have you rectified or is issue still on your browser?
(2024-03-26, 11:20 PM)MattyWjeisz Wrote: [ -> ]Revert changes you have made and then we will see site again. If problem occurs then we know is settings associated with asset_url.

You have correctly done these steps before revisit
- set board url to contain https://
- cleared cache in browser after make change
- revert back to {$mybb->asset_url}

After these changes, we will see site again and see if we experience same problem.
If you noticed in the first post, I added a print of the MyBB database at our server and it's showing the url correctly - with https://

I reverted the changes, but I let them commented. I also added the variable inspection to the script clausule which result in:
:
	var homeURL = "http://www.wings3d.com";
	var bburl = "http://www.wings3d.com/forum";
	var asset_url = "https://www.wings3d.com/forum";
:
So, you can take a loot at the source code of the page and see all of this there - and the page is, of course, broken at this moment.


(2024-03-27, 06:18 AM)bv64 Wrote: [ -> ]ACP --> Templates --> Find Updated Templates
there you should find your modified headerinclude template
choose on "Options"-Button --> Revert to Original
Thanks bv64.
I know where is the headerinclude - it's the one I have been playing. What I don't know, but I believe it's coded is where the {$stylesheet} used on it variable is filled/set.

Btw, I think I just found a bug in the Find Updated Templates, since it doesn't shows the templates present in the Ungrouped Templates - I see three modified there (green colour) and one of them is headerinclude.



I'm going to let it this way for a while, then you can inspect the built home page. Afternoon I'm going to bring back the workarounds. At least the forum will be functional. Maybe someday in the future this weird behaviour goes away by itself, the same way it has came.


Thanks for your support.
This is weird.

Well I can suggest you one thing.
Just remove the protocol. Let server decide.

Set your Board URL as:
//www.wings3d.com/forum

Save and check what happens...
Pages: 1 2 3