Hello
Before upgrading, I made a full copy of our forum and DB. I then performed the upgrade on the copied forum, and ran into the Style challenge mentioned above. I confirmed that the CSS and TPL files in that upgraded forum folder were copied correctly, and did not make any changes after the upgrade, but the old forum styles persisted.
The key to all this is actually the Admin / Forum Settings / Forum Address (URL) option. When I originally copied the forum, I did not make any adjustments within Settings, so Forum Address was still pointing to the (original) production forum, which had our existing style changes. And, as I found out, Style information is pulled from the URL specified in Forum Address, and does not use a relative path to the current forum folder.
Yes, the link to the CSS-file is given as an absolute URL. I don't know, why Alex decided so, but this behaviour is really "old".
<link rel="stylesheet" type="text/css" href="https://mylittleforum.net/forum/themes/default/style.min.css" media="all" />
Generally it would be no problem to change this behaviour. In line #15 of the main template one can see, that the first part of the URL ({$FORUM_ADDRESS}/
) can simply be removed.
<link rel="stylesheet" type="text/css" href="{$FORUM_ADDRESS}/{$THEMES_DIR}/{$theme}/style.min.css" media="all" />
This would result in a relative and functioning path.
<link rel="stylesheet" type="text/css" href="themes/default/style.min.css" media="all" />
As far as I know, the index.php, which is built from the main template, is the base for all pages with exception of the JS-popups, which has their own document-complete HTML-templates. So I expect this to work. But this will not prevent issues with the browser caching and the prerendered templates after an upgrade.
Tschö, Auge