[19:28:57] [1/6] Just encountered a weird ResourceLoader bug that might have been caused by CloudFlare caching. What happened was: [19:28:57] [2/6] 1) Vocaloid Lyrics Wiki had a NSFW notice gadget configured to show on pages in a specific category. Originally this category check was done within the JS itself, but I wanted ResourceLoader to handle it instead, so I moved the check to MediaWiki:Gadgets-definition earlier today. [19:28:58] [3/6] 2) A user in the Discord reported that the NSFW notice was showing up on the main page an hour ago, so I went to go check. [19:28:58] [4/6] 3) The gadget works as expected when I'm logged in (i.e. the NSFW notice does not show on the main page). Running `mw.loader.getState('ext.gadget.nsfw-modal')` on the main page also returns `registered`, which is expected. [19:28:58] [5/6] 4) The bug shows up on Incognito (i.e. the NSFW notice showed up when it shouldn't). Running `mw.loader.getState('ext.gadget.nsfw-modal')` on the main page also returned `ready`. [19:28:58] [6/6] I made a quick fix by adding the category check back into the JS, but I wonder if this is worth making a Phorge report? [21:33:42] Not exactly a bug so much as we don't expect that the JS resources used by different pages should vary for logged out users (and therefore cache it). [21:34:34] Nothing going through load.php should vary on user [21:35:02] load.php should in theory crash out if you attempt to access a session through it [21:36:38] Gadgets going through resource loader (load.php) should be safe to cache without checking sessions/cookies [21:37:00] Other things like User JS shouldn't be as strict [21:48:32] gadgets and gadget definitions are cached separately so not too unlikely for them to be out of sync [21:49:01] especially so for logged out users who get the equivalent of yesterday's crumbs [21:49:48] I purged the main page and now the gadget no longer loads at all for me [21:50:38] should only load on pages with certain categories per https://vocaloidlyrics.miraheze.org/wiki/MediaWiki:Gadgets-definition?diff=prev&oldid=1844607 [21:50:52] That feels fun [21:51:05] [1/8] used to be ```js [21:51:05] [2/8] RLPAGEMODULES=["site","mediawiki.page.ready","jquery.makeCollapsible","skins.medik.js","ext.createPage","ext.SimpleTooltip","ext.centralNotice.geoIP","ext.centralNotice.startUp","ext.checkUser.clientHints","ext.CookieWarning","ext.echo.centralauth","ext.eventLogging","ext.urlShortener.toolbar","ext.embedVideo.overlay","ext.visualEditor.desktopArticleTarget.init","ext.visualEdit [21:51:05] [3/8] or.targetLoader","ext.gadget.nsfw-modal","ext.gadget.lyrics-options","ext.gadget.vlw-tl-queue-display","ext.gadget.guideline-notification","ext.gadget.rc-discussion","ext.gadget.countdown","ext.gadget.ReferenceTooltips","ext.gadget.bandcamp","ext.themes.switcher","ext.centralauth.centralautologin","ext.purge","ext.dismissableSiteNotice"] [21:51:06] [4/8] ``` [21:51:06] [5/8] now it's ```js [21:51:06] [6/8] RLPAGEMODULES=["site","mediawiki.page.ready","jquery.makeCollapsible","skins.medik.js","ext.createPage","ext.SimpleTooltip","ext.centralNotice.geoIP","ext.centralNotice.startUp","ext.checkUser.clientHints","ext.CookieWarning","ext.echo.centralauth","ext.eventLogging","ext.urlShortener.toolbar","ext.embedVideo.overlay","ext.visualEditor.desktopArticleTarget.init","ext.visualEdit [21:51:07] [7/8] or.targetLoader","ext.gadget.lyrics-options","ext.gadget.vlw-tl-queue-display","ext.gadget.guideline-notification","ext.gadget.rc-discussion","ext.gadget.countdown","ext.gadget.ReferenceTooltips","ext.gadget.bandcamp","ext.themes.switcher","ext.centralauth.centralautologin","ext.purge","ext.dismissableSiteNotice"] [21:51:07] [8/8] ``` [21:51:46] to make it apply you'd also need to purge every single page outside of the category [21:51:58] nothing to do with Cloudflare [21:53:10] we only cache load.php for like 5 min of cf anyway [21:53:28] or did we change it to follow headers [21:53:37] no this is the actual html of the page [21:53:45] i know [21:53:48] inside a `