Bay 12 Games Forum

Please login or register.

Login with username, password and session length
Advanced search  

Author Topic: incorrect layout for some pages on some browsers  (Read 12609 times)

Ziusudra

  • Bay Watcher
    • View Profile
incorrect layout for some pages on some browsers
« on: July 16, 2020, 12:53:05 am »

This screenshot from someone else on discord:
Spoiler (click to show/hide)

I see it happen on Chrome on Android, but not on Brave on Linux. I saw it on one other page a day or two ago, but can't remember which it was.
Logged
Ironblood didn't use an axe because he needed it. He used it to be kind. And right now he wasn't being kind.

lethosor

  • Bay Watcher
    • View Profile
Re: incorrect layout for some pages on some browsers
« Reply #1 on: July 16, 2020, 12:57:48 am »

There's not much I can go on here, unfortunately. It looks like the screenshot is of a pretty narrow window, which is known to cause some oddities with the top navigation tabs (even on Wikipedia), but I couldn't reproduce the issue seen in your screenshot.

If you do see this again, does the page also seem to take a very long time to load? We performed a server migration a week or two ago, and the new server setup has been a bit slow sometimes. I'm wondering if some CSS file simply timed out in this case (in most browsers, this would result in visible content, but a loading spinner in the address bar for a while longer - not sure how Chrome on Android represents it, though).
Logged
DFHack - Dwarf Manipulator (Lua) - DF Wiki talk

There was a typo in the siegers' campfire code. When the fires went out, so did the game.

Ziusudra

  • Bay Watcher
    • View Profile
Re: incorrect layout for some pages on some browsers
« Reply #2 on: July 16, 2020, 01:27:19 am »

DF2014:Baron is the other one. Happens on that but not v0.34:Baron.

Neither page takes long to load.

It also happens on the Samsung Internet browser, the LastPass browser (which both may be based on Chrome), and Firefox on Android tablet. Even when in landscape orientation. My tablet's resolution is 1920x1080. It must have something to do with some Android setting.

It doesn't happen on Brave or Firefox on Linux even when the window is as narrow as I can make it.
Logged
Ironblood didn't use an axe because he needed it. He used it to be kind. And right now he wasn't being kind.

Ziusudra

  • Bay Watcher
    • View Profile
Re: incorrect layout for some pages on some browsers
« Reply #3 on: July 16, 2020, 02:32:48 am »

Ah, new info, it happens on Brave and Firefox on Linux if I am NOT logged into the wiki.

And it does NOT happen if I type "baron" into the search box and just hit enter. It then happens again when I reload the Baron page. So something about the redirect. (Typing "Toady One" or "Toady_One" does NOT keep it from happening. The space gets replaced by a "+" and with the "_" it's not a redirect or not the same kind.)

Edit: and it does not happen on android if I'm logged into wiki. So, being logged in prevents it. Then after logging out it happens again.
« Last Edit: July 16, 2020, 02:39:16 am by Ziusudra »
Logged
Ironblood didn't use an axe because he needed it. He used it to be kind. And right now he wasn't being kind.

Starver

  • Bay Watcher
    • View Profile
Re: incorrect layout for some pages on some browsers
« Reply #4 on: July 16, 2020, 06:19:13 am »

I checked. Android, currently, and both Firefox (set to "Request desktop page", though I don't think that matters here) and Chrome browsers show https://dwarffortresswiki.org/index.php/Toady_One more or less as shown.

Search for Baron (only tested on FF) gives https://dwarffortresswiki.org/index.php/DF2014:Baron as it should with "miner" artwork and side menu area (including ad) off to the side in both landscape (as I default to holding for browsing), and rotated to portrait. Ads above title and below categories Ok.

Click on v0.34 for https://dwarffortresswiki.org/index.php/v0.34:Baron and it looks just as sane.

Then either click on v0.47.04 or back-a-page to https://dwarffortresswiki.org/index.php/DF2014:Baron and it displays wrongly. As it does if I paste https://dwarffortresswiki.org/index.php/DF2014:Baron into the address.

Editing or pasting https://dwarffortresswiki.org/index.php/Baron as the address gives it loading right, even though it changes the address to the Namespace: version, and a Refresh of the page makes it wrong again.

'Wrong' here is the side-stuff (normally to the left of the lined white box, in the grey 'bakground') now sitting a very similar place within the box as it should be within the whole page, overcompositing the white-box contents. Similarly, the top-ad that should sit between the 'tabs' (of "DF2014" "Discussion" "Rate", gap, "Read" "Edit", "View History" and search-widget) and the "2014:Baron" title now sits behind the tabs, the Title itself is shifted over the "xTATTEREDx" quality item in that list.

The ad below the Categories seems Ok, but may just have nothing to be interfered with.


Logged

lethosor

  • Bay Watcher
    • View Profile
Re: incorrect layout for some pages on some browsers
« Reply #5 on: July 16, 2020, 10:21:11 am »

Then either click on v0.47.04 or back-a-page to https://dwarffortresswiki.org/index.php/DF2014:Baron and it displays wrongly. As it does if I paste https://dwarffortresswiki.org/index.php/DF2014:Baron into the address.
Interesting! I was able to reproduce this on both desktop and mobile when logged out (but not when logged in). Not sure what's going on here, but at least it's consistent, although troubleshooting it could be tricky.


Quote
Without digging into the source/css (slightly awkward to do, here in an Android browser, at least in trying to cross-compare) my best guess is that the DF2014 namespace templating (which does not get called when redirected to in leiu of namespace, even though it defaults to DF2014 content and post-processing) somehow has the sidebar elements positioning relative to the 'internal' page element (the "white box") not the browser page (or a more senior element that is the "grey background").

There's nothing special about CSS in different namespaces - the namespaces are essentially just part of the page title. Yes, the article version box changes color on different pages, but that's just the template looking at the page title and adjusting itself.  You can take a look at the site-wide CSS here:
https://dwarffortresswiki.org/index.php/MediaWiki:Common.css
https://dwarffortresswiki.org/index.php/MediaWiki:Vector.css

There also shouldn't be a difference between the redirected and non-redirected pages. An interesting feature of Mediawiki's redirects, though, is that they don't actually issue HTTP redirects - fetching https://dwarffortresswiki.org/index.php/Baron will return the contents of DF2014:Baron, and then some JS updates the page title on the client side (so if you disable JavaScript on the wiki, the URL will remain https://dwarffortresswiki.org/index.php/Baron). I'm guessing that some broken render of the page is cached under one of these URLs but not the other. Not sure why it would have broken, though. I'll double-check with other admins and see if they have ideas.
Logged
DFHack - Dwarf Manipulator (Lua) - DF Wiki talk

There was a typo in the siegers' campfire code. When the fires went out, so did the game.

lethosor

  • Bay Watcher
    • View Profile
Re: incorrect layout for some pages on some browsers
« Reply #6 on: July 16, 2020, 11:59:16 am »

Ok, turns out there was some broken HTML that was only live temporarily, but must have made its way into the cache of some rendered pages. Also, redirected pages (like "Baron") don't seem to use the cache for some reason, so that was probably why it was displaying as expected. I've cleared the cache, so any pages you visit now should be fixed. Let me know if you spot any others that are still broken.
Logged
DFHack - Dwarf Manipulator (Lua) - DF Wiki talk

There was a typo in the siegers' campfire code. When the fires went out, so did the game.

Starver

  • Bay Watcher
    • View Profile
Re: incorrect layout for some pages on some browsers
« Reply #7 on: July 16, 2020, 02:09:31 pm »

For my part, it looks fixed.  I used the Random Page link to go a-visiting, clicking across to the DF2014 link when I landed off of it[1], refreshing it if I landed on already (though it never was a "redirected" page, being a smarter Random-lander than that). No obvious signs of it persisting on anything I went to, so probably a good enough little sample to pronounce it solved. For me, but probably for others.

Cached problems (that don't affect login, I suppose because logged-inedness forces a version upon you to say "Logged in as <foo>"[3]) are of course a pain to work out. Not quite Heisenbug territory, but a related variation.


Though I seemed to omit it, in that last lot of scrawl, I had tested and found the Talk pages for the affected pages (Toady and Baron) were clean/unfaulty, now explainable by the cache issue (they were not visited and cached-faulty when the fault existed to be cached, even if at least the DF2014:Baron and Toady One main-pages were), and so this time I think I went into a decent proportion of the checked-good pages to ensure they didn't then have faulty-Talks 'behind' them, as a reversal of fortunes. None did! Not that I expected them to have, but as I didn't mention the prior discovery, I thought I better do that double-check myself just now.


Anyway, glad it's sorted. Or an easy answer is found for any page not yet discovered needing 'healing'.


[1] And though the first few times gave me exclusively v0.34, making me think Random was somehow limiting itself to them, it did start to give me other-namespace pages (eventually including the 'current' set) and no-namespace ones ("Where should I build my fort?", version independent). Plus, ironically, the namespaced-but-non-'switching'[2] https://dwarffortresswiki.org/index.php/DF2014:Release_information/0.42.06 ;)

[2] Yes, I fully understand that there's no reason to switch to a v0.34 version of a page specifically describing 0.42.06. I'd have only worried if it looked like I could!

[3] Either does not cache/always builds anew or else has a possible cache only of the last version you with your login fetched, when it was clearly not broken to cache-as-broke, because you'd have seen it broken and done what you need to to solve it already...
Logged

Ziusudra

  • Bay Watcher
    • View Profile
Re: incorrect layout for some pages on some browsers
« Reply #8 on: July 16, 2020, 05:18:14 pm »

Yep, fixed here, too. Thanks.
Logged
Ironblood didn't use an axe because he needed it. He used it to be kind. And right now he wasn't being kind.

lethosor

  • Bay Watcher
    • View Profile
Re: incorrect layout for some pages on some browsers
« Reply #9 on: July 16, 2020, 05:24:36 pm »

Cached problems (that don't affect login, I suppose because logged-inedness forces a version upon you to say "Logged in as <foo>"[3]) are of course a pain to work out. Not quite Heisenbug territory, but a related variation.
Yeah, that's at least part of the reason. It might be possible to cache just the page contents (i.e. the rendered version of the wikitext source code of each page), but most of our traffic is logged-out users anyway, so there's not much point. Logged-in users also tend to be the ones changing templates, so it's convenient for pages' caches to auto-clear when they're visited.

Quote
[2] Yes, I fully understand that there's no reason to switch to a v0.34 version of a page specifically describing 0.42.06. I'd have only worried if it looked like I could!

{{av}} (the template you're referring to) is generally included only on top-level pages, e.g. "DF2014:Release notes" but not "DF2014:Release notes/0.40.01". In the case of release notes, yeah, it makes sense.
Logged
DFHack - Dwarf Manipulator (Lua) - DF Wiki talk

There was a typo in the siegers' campfire code. When the fires went out, so did the game.