Page MenuHomePhabricator

Empty page get a empty bytes attribute in Export/Dump
Closed, ResolvedPublic

Description

See url. The page is an empty page, but the export contains:

<text xml:space="preserve" bytes="" />

I am expected a bytes="0" for empty pages.

Thanks.


Version: 1.20.x
Severity: normal
URL: https://de.wikipedia.org/wiki/Spezial:Exportieren/Diskussion:Sylvia

Details

Reference
bz32414

Event Timeline

bzimport raised the priority of this task from to Low.Nov 22 2014, 12:04 AM
bzimport set Reference to bz32414.
bzimport added a subscriber: Unknown Object (MLST).

This seems to depend on the value of $row->revlen...

Testing locally on trunk

<page>
<title>Blank</title>
<ns>0</ns>
<id>223</id>
<revision>
<id>326</id>
<timestamp>2011-12-11T18:54:49Z</timestamp>
<contributor>
<ip>192.168.0.17</ip>
</contributor>
<comment>noh</comment>
<text xml:space="preserve" bytes="0"/>
</revision>
</page>

mysql> select * from revision WHERE rev_id = 94010356;
+----------+----------+-------------+----------------------------------------------------+----------+---------------+----------------+----------------+-------------+---------+---------------+

rev_idrev_pagerev_text_idrev_commentrev_userrev_user_textrev_timestamprev_minor_editrev_deletedrev_lenrev_parent_id

+----------+----------+-------------+----------------------------------------------------+----------+---------------+----------------+----------------+-------------+---------+---------------+

94010356101296754686Hob den Schutz von „[[Diskussion:Sylvia]]“ auf10276APPER2011092415173910NULL94010347

+----------+----------+-------------+----------------------------------------------------+----------+---------------+----------------+----------------+-------------+---------+---------------+
1 row in set (0.00 sec)

Said db row on dewiki

mysql> select * from revision WHERE rev_id = 94010356;
+----------+----------+-------------+----------------------------------------------------+----------+---------------+----------------+----------------+-------------+---------+---------------+

rev_idrev_pagerev_text_idrev_commentrev_userrev_user_textrev_timestamprev_minor_editrev_deletedrev_lenrev_parent_id

+----------+----------+-------------+----------------------------------------------------+----------+---------------+----------------+----------------+-------------+---------+---------------+

94010356101296754686Hob den Schutz von „[[Diskussion:Sylvia]]“ auf10276APPER2011092415173910NULL94010347

+----------+----------+-------------+----------------------------------------------------+----------+---------------+----------------+----------------+-------------+---------+---------------+
1 row in set (0.00 sec)

Pushing null through intval seems to be enough

r105816

Needs a (second?) run of populateRevisionLength to fill that field right?