Page MenuHomePhabricator

HTMLCacheUpdate should invalidate pages linking to any variant title of the given title if the variant title itself doesn't exist
Closed, DeclinedPublic

Description

Because when the "variant title" doesn't exist, LanguageConverter::findVariantLink() rewrites any link linking to the "variant title" to the "given title", so pages containing such links need cache invalidation too.

More consideration: HTMLCacheUpdate seems not only for pagelinks, and findVariantLink is applied on some, but not all, other links. IIRC what works includes pagelinks, templatelinks and categorylinks. We may want to decide whether to add a new argument to HTMLCacheUpdate indicating to include variant titles or not, or switch based on $table, or just change callers to issue multiple HTMLCacheUpdate calls when variant invalidation is needed.

Note: about page creation and deletion, this is only needed for creation, as pagelinks table is already affected by findVariantLink's rewrite to use "given title" during parsing when that page exists.

Bug appearance on zhwiki:

  1. Create [[page]] containing "[[測試]]"
  2. Create [[测试]] with some content
  3. [[page]] appears to contain a red link now, but a purge or null edit turns it to be blue, pointing to [[测试]]

Version: 1.23.0
Severity: normal

Details

Reference
bz58023

Event Timeline

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

cc'ing the inventor of HTMLCacheUpdate to give some idea about the "more consideration" part.

At first glance, I personally think multiple HTMLCacheUpdate's might be the way to go.

Given that creation of a variant causes things linking to the other variant to change what pages they link to (and thus the links table), perhaps a non-recursive linksupdate would be in order for this situation.

Krinkle subscribed.

As I understand it, lang-variant entries currently don't need purging as they are not cached the same way as others either.

For more information and to continue this conversation, check T250511: Re-evaluate caching and purging of language variants (e.g. "/zh-hans/Page_name")