{{PAGESIZE:...}} returns empty string when top revision of page has no associated revision length
Closed, ResolvedPublic

Description

Author: happy.melon.wiki

Description:
Enter:
<{{PAGESIZE:Foo bar}}>
<{{PAGESIZE:Foo_bar}}>
<{{PAGESIZE:Talk:Fartown Ground, Huddersfield}}>

Expected:
<20>
<20>
<559>

Actual:
<>
<>
<>

This can occur either when the top revision is a 'null' revision, noting moves/protections/deletions/etc; or when the top revision is from before the time when rev_len started to be recorded (cf bug12188). The latter is transitory and can be resolved by writing and running the script requested in bug18881; the former needs to be addressed properly.


Version: 1.15.x
Severity: enhancement

bzimport set Reference to bz18998.
bzimport added a subscriber: Unknown Object (MLST).

The issue with null revisions was fixed in r44885, which should apply to protection and moves.

happy.melon.wiki wrote:

I assume that with bug12188, this bug is also fixed.

matmarex reopened this task as "Open".Mon, May 16, 6:06 PM
matmarex claimed this task.
matmarex added a subscriber: matmarex.

This was never fixed, and the T18748 issue with rev_len not being recorded regressed (see T135414 for details). Returning '0' is probably saner than returning an empty string.

Change 288997 had a related patch set uploaded (by Bartosz Dziewoński):
CoreParserFunctions: Return 0 from {{PAGESIZE:}} when length is unknown

https://gerrit.wikimedia.org/r/288997

Change 288997 merged by jenkins-bot:
CoreParserFunctions: Return 0 from {{PAGESIZE:}} when length is unknown

https://gerrit.wikimedia.org/r/288997

matmarex closed this task as "Resolved".Sun, May 22, 7:24 PM
matmarex removed a project: Patch-For-Review.

This has been fixed and the fix will be deployed to Wikimedia wikis this week, between Tuesday and Thursday, per the schedule at https://www.mediawiki.org/wiki/MediaWiki_1.28/Roadmap.

Add Comment