ArielGlenn added a comment.

  @daniel It looks to me (without testing it) that the changeset above, 
https://gerrit.wikimedia.org/r/#/c/mediawiki/core/+/464768/  will handle empty 
comment text differently than we currently do, writing out a comment tag, maybe 
with empty content. Current practice is to omit the tag. Have you been able to 
check if this is true with your change?
  
  An example of a revision with an empty comment field: on enwiki, page id 
1791080  (Talk:Communist Party Historians Group), for revision 17438553, 
current and older stub files contain no comment tag at all, and if one looks at 
the revision row:
  
    wikiadmin@10.64.16.101(enwiki)> select * from revision where rev_id = 
17438553;
    
+----------+----------+-------------+-------------+----------+------------------+----------------+----------------+-------------+---------+---------------+---------------------------------+-------------------+--------------------+
    | rev_id   | rev_page | rev_text_id | rev_comment | rev_user | 
rev_user_text    | rev_timestamp  | rev_minor_edit | rev_deleted | rev_len | 
rev_parent_id | rev_sha1                        | rev_content_model | 
rev_content_format |
    
+----------+----------+-------------+-------------+----------+------------------+----------------+----------------+-------------+---------+---------------+---------------------------------+-------------------+--------------------+
    | 17438553 |  1791080 |    17438553 |             |    12978 | Charles 
Matthews | 20050425215404 |              1 |           0 |     233 |      
12810595 | ntmnkm276glud6v0z0fmqbib489ycud | NULL              | NULL           
    |
    
+----------+----------+-------------+-------------+----------+------------------+----------------+----------------+-------------+---------+---------------+---------------------------------+-------------------+--------------------+
  
  rev_comment is empty. If you track that down through the rev comment temp 
into the comment table, you see:
  
    wikiadmin@10.64.16.101(enwiki)> select * from revision_comment_temp where 
revcomment_rev = 17438553;
    +----------------+-----------------------+
    | revcomment_rev | revcomment_comment_id |
    +----------------+-----------------------+
    |       17438553 |                    10 |
    +----------------+-----------------------+
  
  leading to
  
    wikiadmin@10.64.16.101(enwiki)> select * from comment where comment_id = 10;
    +------------+--------------+--------------+--------------+
    | comment_id | comment_hash | comment_text | comment_data |
    +------------+--------------+--------------+--------------+
    |         10 |            0 |              | NULL         |
    +------------+--------------+--------------+--------------+
  
  I should study all these edge cases and figure out unit tests for them (sigh, 
later ticket).

TASK DETAIL
  https://phabricator.wikimedia.org/T174031

EMAIL PREFERENCES
  https://phabricator.wikimedia.org/settings/panel/emailpreferences/

To: daniel, ArielGlenn
Cc: gerritbot, ArielGlenn, Fjalapeno, Aklapper, daniel, Daryl-TTMG, 
RomaAmorRoma, 0010318400, E.S.A-Sheild, darthmon_wmde, WDoranWMF, 
EvanProdromou, joker88john, CucyNoiD, Nandana, NebulousIris, Gaboe420, 
Versusxo, Majesticalreaper22, Giuliamocci, Adrian1985, Cpaulf30, Lahi, Gq86, 
Af420, Ramsey-WMF, Darkminds3113, Bsandipan, Lordiis, GoranSMilovanovic, 
Adik2382, Th3d3v1ls, Ramalepe, Liugev6, QZanden, LawExplorer, WSH1906, 
Lewizho99, JJMC89, Maathavan, _jensen, rosalieper, Agabi10, Pchelolo, 
Wikidata-bugs, aude, Jdforrester-WMF, Mbch331, Ltrlg
_______________________________________________
Wikidata-bugs mailing list
Wikidata-bugs@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/wikidata-bugs

Reply via email to