Page MenuHomePhabricator

ResourceLoader didn't invalidate cached CSS correctly for Extension:CategoryTree change
Closed, DeclinedPublic

Description

Bad rendering

HTML:

<div style="font-family: sans-serif;" dir="ltr" lang="zh-cn"><div id="mw-subcategories">
<h2>子分类</h2>
<p>本分类只有以下子分类。
</p><div style="font-family: sans-serif;" dir="ltr" class="mw-content-ltr" lang="zh"><h3>使</h3>
<ul><li><div class="CategoryTreeSection"><div class="CategoryTreeItem"><span class="CategoryTreeEmptyBullet">► </span> <a title="" class="CategoryTreeLabel  CategoryTreeLabelNs14 CategoryTreeLabelCategory" href="/wiki/Category:%E4%BD%BF%E7%94%A8%E6%97%A0%E6%95%88%E9%A2%9C%E8%89%B2%E7%9A%84%E7%94%9F%E7%89%A9%E5%88%86%E7%B1%BB%E6%A1%86">使用无效颜色的生物分类框</a>‎ <span title="含有0个子分类,129个页面和0个文件" dir="ltr">(129个页面)</span></div>
		<div class="CategoryTreeChildren" style="display:none"></div></div>
		</li></ul></div>
</div></div></div>

See Also: T53766: ResourceLoader didn't invalidate cached CSS correctly for #toc change

Attached:

Category:生物分类框清理_-_维基百科,自由的百科全书.png (363×1 px, 37 KB)

Details

Reference
bz55334

Event Timeline

bzimport raised the priority of this task from to Medium.Nov 22 2014, 2:35 AM
bzimport set Reference to bz55334.
bzimport added a subscriber: Unknown Object (MLST).

Created attachment 13441
Good rendering (after a force reload)

Attached:

Category:生物分类框清理_-_维基百科,自由的百科全书2.png (363×1 px, 37 KB)

We'll need more information (specifically the Git commit that changed this in CategoryTree) to figure out what caused it (RL not caching right, or CategoryTree using it wrong) and how to prevent it.

(In reply to comment #2)

We'll need more information (specifically the Git commit that changed this in
CategoryTree) to figure out what caused it (RL not caching right, or
CategoryTree using it wrong) and how to prevent it.

I think it's 4b1eecbd1006e4f6e577dbffc61bda8adb885eac.

The commit changes:

  • i18n messages used in PHP

This means all cached pages (for anonymous users) will continue to contain the old
version for up to 30 days. This is expected behaviour by MediaWiki and Wikimedia's server configuration and not related to ResourceLoader.

  • The css for the list item bullet

This module is loaded with addModuleStyles and can't be cached with a version timestamp for that reason. It is automatically invalidated every 5 minutes.

So after this was deployed:

  • In the first 5 minutes:
    • logged-in users will (as usual) get fresh pages with the new i18n icon, but have old css cached (upto 5 minutes).
    • logged-out users will get cached pages with the old i18n icon and also cached css (upto 5 minutes).
  • In the first 30 days, after the first 5 minutes:
    • logged-in users will see the new i18n icon with the new css.
    • logged-out users will get cached pages with the old i18n icon and the new css.

The only part that is ResourceLoader is that the css is cached for 5 minutes.

Are you able to see the mixed version (either logged-in or not) still now? If so, I'd like to investigate what might cause that.

I was logged in, and based on the time I don't think I was seeing that just within 5 minutes after deployment, so, it's:

In the first 30 days, after the first 5 minutes: logged-in users see the new i18n icon with (expected) the new css / (actual) the old css.

Krinkle claimed this task.
Krinkle updated the task description. (Show Details)
Krinkle set Security to None.

Various cache issues have been resolved since this issue was originally filed. The specific instance affecting CategoryTree is no longer relevant since the cache has been rebuilt since then. File a new task if this comes up again.