Page MenuHomePhabricator

Disable unused Flow extension on ur.wikibooks
Closed, ResolvedPublic

Event Timeline

Nemo_bis created this task.Oct 22 2018, 7:08 AM
Restricted Application added a subscriber: Aklapper. · View Herald TranscriptOct 22 2018, 7:08 AM
Restricted Application added a project: User-Zoranzoki21. · View Herald TranscriptNov 8 2018, 11:44 PM

Change 478464 had a related patch set uploaded (by Zoranzoki21; owner: Zoranzoki21):
[operations/mediawiki-config@master] Disable unused Flow extension on ur.wikibooks

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

Zoranzoki21 moved this task from Inbox to To deploy on the User-Zoranzoki21 board.Dec 9 2018, 7:53 AM

Change 478464 merged by jenkins-bot:
[operations/mediawiki-config@master] Disable unused Flow extension on ur.wikibooks

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

Mentioned in SAL (#wikimedia-operations) [2019-01-10T12:46:13Z] <zfilipin@deploy1001> Synchronized dblists/flow.dblist: SWAT: [[gerrit:478464|Disable unused Flow extension on ur.wikibooks (T207627)]] (duration: 00m 55s)

zfilipin@mwmaint1002:~$ mwscript namespaceDupes.php urwikibooks --fix
0 pages to fix, 0 were resolvable.

pagelinks from=1475 ns=0 dbk=وکی_کتب:Babel -> وکی_کتب:Babel
1 links to fix, 1 were resolvable.

Looks good!
Zoranzoki21 closed this task as Resolved.Jan 10 2019, 12:59 PM

These are all still listed as content model 4 (flow board) in the slots table.

wikiadmin@10.64.32.136(urwikibooks)> select * from content where content_model = 4;
+------------+--------------+---------------------------------+---------------+-----------------+
| content_id | content_size | content_sha1                    | content_model | content_address |
+------------+--------------+---------------------------------+---------------+-----------------+
|       1927 |          141 | dre6r1l99h9ujd9h2j9ip2hs60o4fj4 |             4 | tt:5502         |
|       1958 |           36 | gsnkn05mqpgwhdalwg5itm7yic5r0nr |             4 | tt:5532         |
|       1963 |          135 | ob5hf0aqbqtyifvdxd63c0r0zzgutkj |             4 | tt:5537         |
|       1985 |           66 | 6z6zkta73nu2a6het7ae9i9zfvd85z6 |             4 | tt:5560         |
|       1991 |           57 | dyfq9jthrker9nhw6y7gcddft95lqz1 |             4 | tt:5566         |
|       2100 |           51 | brzrz58hn1gyw3myhet5qob4el54xk2 |             4 | tt:5689         |
+------------+--------------+---------------------------------+---------------+-----------------+
6 rows in set (0.01 sec)

Here's the slot, rev and page info for all of those:

wikiadmin@10.64.32.136(urwikibooks)> select * from slots where slot_content_id in (1927, 1958, 1963, 1985, 1991, 2100);
+------------------+--------------+-----------------+-------------+
| slot_revision_id | slot_role_id | slot_content_id | slot_origin |
+------------------+--------------+-----------------+-------------+
|             5519 |            1 |            1927 |        5519 |
|             5553 |            1 |            1958 |        5553 |
|             5559 |            1 |            1963 |        5559 |
|             5590 |            1 |            1985 |        5590 |
|             5598 |            1 |            1991 |        5598 |
|             5743 |            1 |            2100 |        5743 |
+------------------+--------------+-----------------+-------------+
6 rows in set (0.01 sec)

```wikiadmin@10.64.32.136(urwikibooks)> select * from revision where rev_id in (5519, 5553, 5559, 5590, 5598, 5743);
+--------+----------+-------------+-------------+----------+---------------+----------------+----------------+-------------+---------+---------------+---------------------------------+-------------------+--------------------+
| 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 |
+--------+----------+-------------+-------------+----------+---------------+----------------+----------------+-------------+---------+---------------+---------------------------------+-------------------+--------------------+
|   5519 |     2673 |        5502 |             |      459 | Nooruddin2020 | 20130701124534 |              0 |           0 |     141 |             0 | dre6r1l99h9ujd9h2j9ip2hs60o4fj4 | NULL              | NULL               |
|   5553 |     2687 |        5532 |             |      459 | Nooruddin2020 | 20130702083347 |              0 |           0 |      36 |             0 | gsnkn05mqpgwhdalwg5itm7yic5r0nr | NULL              | NULL               |
|   5559 |     2673 |        5537 |             |      459 | Nooruddin2020 | 20130702084313 |              1 |           0 |     135 |          5519 | ob5hf0aqbqtyifvdxd63c0r0zzgutkj | NULL              | NULL               |
|   5590 |     2699 |        5560 |             |      459 | Nooruddin2020 | 20130702112141 |              0 |           0 |      66 |             0 | 6z6zkta73nu2a6het7ae9i9zfvd85z6 | NULL              | NULL               |
|   5598 |     2702 |        5566 |             |      459 | Nooruddin2020 | 20130702114551 |              0 |           0 |      57 |             0 | dyfq9jthrker9nhw6y7gcddft95lqz1 | NULL              | NULL               |
|   5743 |     2749 |        5689 |             |      459 | Nooruddin2020 | 20130712124103 |              0 |           0 |      51 |             0 | brzrz58hn1gyw3myhet5qob4el54xk2 | NULL              | NULL               |
+--------+----------+-------------+-------------+----------+---------------+----------------+----------------+-------------+---------+---------------+---------------------------------+-------------------+--------------------+
6 rows in set (0.00 sec)
wikiadmin@10.64.32.136(urwikibooks)> select * from page where page_id in (2673, 2687, 2673, 2699, 2702, 2749);
+---------+----------------+-------------------------+-------------------+------------------+-------------+----------------+----------------+--------------------+-------------+----------+--------------------+-----------+
| page_id | page_namespace | page_title              | page_restrictions | page_is_redirect | page_is_new | page_random    | page_touched   | page_links_updated | page_latest | page_len | page_content_model | page_lang |
+---------+----------------+-------------------------+-------------------+------------------+-------------+----------------+----------------+--------------------+-------------+----------+--------------------+-----------+
|    2673 |           2600 | سماجی_سائنس             |                   |                0 |           0 | 0.014920851882 | 20130702084313 | NULL               |        5559 |      135 | wikitext           | NULL      |
|    2687 |           2600 | ادب                     |                   |                0 |           1 | 0.591715943395 | 20130702083347 | 19691231235959     |        5553 |       36 | wikitext           | NULL      |
|    2699 |           2600 | ریاضی                   |                   |                0 |           1 |  0.16833559845 | 20130702112141 | 19691231235959     |        5590 |       66 | wikitext           | NULL      |
|    2702 |           2600 | شمارندیات               |                   |                0 |           1 | 0.773192205131 | 20171227084535 | NULL               |        5598 |       57 | wikitext           | NULL      |
|    2749 |           2600 | تمام_موضوعات            |                   |                1 |           1 | 0.846843918352 | 20130712124103 | NULL               |        5743 |       51 | wikitext           | NULL      |
+---------+----------------+-------------------------+-------------------+------------------+-------------+----------------+----------------+--------------------+-------------+----------+--------------------+-----------+
5 rows in set (0.00 sec)

Notice they are all namespace 2600 and all claim to be wikitext.

I'll check on whether these have wikitext in them or actual flow content in a little bit.

These revisions (at least I guess it's them) break abstract dumps in the same way as on T220594 (same error about MWUnknownContentModelException from ContentHandler.php) so it would be nice to get them fixed up.

text and blob table info:

wikiadmin@10.64.32.136(urwikibooks)> select * from text where old_id in (5502,5532, 5537, 5560, 5566, 5689 );
+--------+---------------+-----------+--------------------+-------------+----------+---------------+---------------+----------------+---------------------+-------------------+
| old_id | old_namespace | old_title | old_text           | old_comment | old_user | old_user_text | old_timestamp | old_minor_edit | old_flags           | inverse_timestamp |
+--------+---------------+-----------+--------------------+-------------+----------+---------------+---------------+----------------+---------------------+-------------------+
|   5502 |               |           | DB://cluster25/99  |             |          |               |               |                | utf-8,gzip,external |                   |
|   5532 |               |           | DB://cluster24/106 |             |          |               |               |                | utf-8,gzip,external |                   |
|   5537 |               |           | DB://cluster24/108 |             |          |               |               |                | utf-8,gzip,external |                   |
|   5560 |               |           | DB://cluster25/135 |             |          |               |               |                | utf-8,gzip,external |                   |
|   5566 |               |           | DB://cluster24/125 |             |          |               |               |                | utf-8,gzip,external |                   |
|   5689 |               |           | DB://cluster25/205 |             |          |               |               |                | utf-8,gzip,external |                   |
+--------+---------------+-----------+--------------------+-------------+----------+---------------+---------------+----------------+---------------------+-------------------+

MariaDB [urwikibooks]> select blob_id, TO_BASE64(blob_text) from blobs_cluster24 where blob_id in (106,108,125);
+---------+-------------------------------------------------------------------------------------------------------------------------------------------------------+
| blob_id | TO_BASE64(blob_text)                                                                                                                                  |
+---------+-------------------------------------------------------------------------------------------------------------------------------------------------------+
|     106 | 01KIjr6x/nbPzY4by2+2Kdxsu7H8xtYbGxVurQQydtxsvd0TGwsA                                                                                                  |
|     108 | JY0xDsIwFEN3TuGZU1aoqTJk4hAUKkBKg5DK0HPYyWXqiMGSZf//zKLAmc+WwGJz08SC+mhXKCjy
a23QzozTGRpbqtGeH+3QAM4adbECmFsyItcJ2lpy4gcuZvbi/cev6Ld8KdZfX/Hq3fFyAA== |
|     125 | 01KIjr7Zemvljc23e2623lh+o0fhxhYwY+PNthvrbwO5y2+23FhzY8WNjTeWKwDFdgAFWmNjAQ==                                                                          |
+---------+-------------------------------------------------------------------------------------------------------------------------------------------------------+
3 rows in set (0.03 sec)
MariaDB [urwikibooks]> select blob_id, TO_BASE64(blob_text) from blobs_cluster25 where blob_id in (99, 135, 205);
+---------+-------------------------------------------------------------------------------------------------------------------------------------------------------+
| blob_id | TO_BASE64(blob_text)                                                                                                                                  |
+---------+-------------------------------------------------------------------------------------------------------------------------------------------------------+
|      99 | JYxNCoMwFIT3PcVb95YVE1xkJT2DqSKUEC248RwzeZfpiIvhPebnQ2VAxurJUPVMjKjWZh+NgQN+
0mE8UQyZPTspGIon1UuLxsOTHC1EWNWJ+AilPRbsjEpfd9q+mK4zK8gq+fvxNPae2nDRN55/ |
|     135 | u7H8xmaFm603O25sA+KdQObtnlu7ICJrgHi9wq2VN1bdWGHFpXWz5dbK2z03Nt7uUbix/GbLjTU3
VtzYeGM5AA==                                                             |
|     205 | U76x8caamx03dsbfbL21EsjZqBAdfWPdjeU3tlrdWHWz9cbym60KN7bebLyxFii2KjaWSxcA                                                                              |
+---------+-------------------------------------------------------------------------------------------------------------------------------------------------------+
3 rows in set (0.02 sec)

b64-decoded, deflated text:

[ariel@bigtrouble getrevs]$ python3 decompr_rev.py id_99.txt
decoded:  سماجی سائنس کے موضوع پر القلم ریسرچ ٹیم کی جانب سے تصنیف کی گئی کتاب ۔
* لیڈر شپ
[ariel@bigtrouble getrevs]$ python3 decompr_rev.py id_135.txt
decoded:  اس موضوع میں موجود کتب:
*لکیری الجبرا
[ariel@bigtrouble getrevs]$ python3 decompr_rev.py id_205.txt
decoded:  #رجوع_مکرر [[خاص:تمام صفحات]]
[ariel@bigtrouble getrevs]$ python3 decompr_rev.py id_106.txt
decoded:  * [[دیوان ناصر کاظمی]]
[ariel@bigtrouble getrevs]$ python3 decompr_rev.py id_108.txt
decoded:  سماجی سائنس کے موضوع پر 
* لیڈر شپ ـ القلم ریسرچ ٹیم 
* تاریخ ساز لمحوں کی بات
[ariel@bigtrouble getrevs]$ python3 decompr_rev.py id_125.txt
decoded:  * [[مکسیما، شمارندی الجبرا نظام]]

So they all look like plain wikitext to me.

ArielGlenn reopened this task as Open.Apr 11 2019, 8:36 PM

Re-openng until these stray entries are cleaned up.

@ArielGlenn If you list me the pages with a wrong content model I can change them to 'wikitext'.

@MarcoAurelio Wonderful! It's not the pages though; in the page entry for each of the bad revisions, the content model is listed there as wikitext. It's only in the content table where the wrong content model (4) is shown.
The entries in the content table are listed in T207627#5105046 (double-checked just now to be sure the list is still the same). The slot, revision and pages infocorresponding to each of those is listed in the same comment, double-checked just now to be sure none of that changed either.

Thanks @ArielGlenn - I'll see what I can do. Accesing them via the UI gives:

[XUvkWgpAMFgAAFBtJ9sAAACB] 2019-08-08 08:59:06: Fatal exception of type MWUnknownContentModelException

So I'll try using the API.

Using the API trying to edit, move or delete the pages all result in a MW Exception.

I expected that; this requires direct intervention at the db level. I was sort of hoping you were volunteering to do it :-D

[Un]fortunatelly I don't have any kind of production db access.

There are some docs at https://wikitech.wikimedia.org/wiki/Flow but I'm not sure how updated are they.

Adding @Catrope as he might know better.

I should clarify; I think the only thing that is needed is to set the content model column for those rows in the content table to 1 (or whichever model is 'wikitext'). The dewikiversity tickets are similar.

Nemo_bis triaged this task as Normal priority.Thu, Aug 8, 10:20 AM

Mentioned in SAL (#wikimedia-operations) [2019-08-08T10:46:32Z] <Urbanecm> Set $wgContentHandlers["flow-board"] = $wgContentHandlers["wikitext"]; locally on mwdebug1001 to fix few bad pages (T207627)

MariaDB [urwikibooks_p]> select page_id, page_title, page_namespace from page where page_namespace=2600;
+---------+-------------------------+----------------+
| page_id | page_title              | page_namespace |
+---------+-------------------------+----------------+
|    2687 | ادب                     |           2600 |
|    2749 | تمام_موضوعات            |           2600 |
|    2699 | ریاضی                   |           2600 |
|    2673 | سماجی_سائنس             |           2600 |
|    2702 | شمارندیات               |           2600 |
+---------+-------------------------+----------------+
5 rows in set (0.01 sec)

Moving and deleting those.

I've managed to move, change its content model and delete those pages afterwards. However outside mwdebug1001 the revisions before changing the page's content model return a MW Exception. I guess this is to be expected given that the 'flow-board' content model is not known to the urwikibooks database anymore.

Mentioned in SAL (#wikimedia-operations) [2019-08-08T11:05:53Z] <Urbanecm> Run scap pull on mwdebug1001 to revert local modifications (T207627)

MarcoAurelio closed this task as Resolved.Thu, Aug 8, 11:08 AM