Current situation (reported by @dario.crespi.wmit):
In production (1.35) of https://wiki.wikimedia.it/, page [[MediaWiki:Common.js]] explodes with:
Fatal exception of type "MediaWiki\Revision\RevisionAccessException
The history does not show the correct latest revision.
It's not possible to delete the page from the web interface.
Inspecting the database, it seems page [[MediaWiki:Common.js]] points to revision 1257231, that has rev_sha1 = g71rbz7gievck79qine062lx5pt14fc but that content_sha1 does not exist. Instead, in the legacy wiki (1.26), the rev_sha1 exists.
This is the situation in production:
$ SELECT * FROM page WHERE page_id = 7143 \G; page_id: 7143 page_namespace: 8 page_title: Common.js page_restrictions: page_is_redirect: 0 page_is_new: 0 page_random: 0.539350581857 page_touched: 20220725123931 page_latest: 1257231 page_len: 5869 page_content_model: javascript page_links_updated: 20220725123931 page_lang: NULL
$ SELECT * FROM revision WHERE rev_id = 1257231 \G; rev_id: 1257231 rev_page: 7143 rev_comment_id: 0 rev_actor: 0 rev_timestamp: 20220725123931 rev_minor_edit: 1 rev_deleted: 0 rev_len: 5869 rev_parent_id: 1182371 rev_sha1: g71rbz7gievck79qine062lx5pt14fc
$ SELECT * FROM content WHERE content_sha1 = 'g71rbz7gievck79qine062lx5pt14fc' \G; Empty set (0.049 sec)
Also notable:
$ SELECT * FROM revision WHERE rev_id = 1182371 \G; rev_id: 1182371 rev_page: 7143 rev_comment_id: 0 rev_actor: 0 rev_timestamp: 20220309151406 rev_minor_edit: 0 rev_deleted: 0 rev_len: 5784 rev_parent_id: 1177961 rev_sha1: 8jwn1qiatgx96ktre86ri1rn2o03oa3
Since our intentions are to delete this page, and since this seems the only page involved with this problem, and since only the latest revision of this page seems broken, the proposed dirty workaround is to update in production page [[MediaWiki:Common.js]] (id 7143) deleting the reference to the broken revision 1182371. Additional notes:
$ SELECT * FROM content WHERE content_sha1 = '8jwn1qiatgx96ktre86ri1rn2o03oa3' \G; content_id: 145618 content_size: 5784 content_sha1: 8jwn1qiatgx96ktre86ri1rn2o03oa3 content_model: 3 content_address: tt:1148831
So this is the proposed hotfix in production:
$ UPDATE revision SET rev_parent_id = 0 WHERE rev_id = 1257231; $ DELETE FROM revision WHERE rev_id = 1182371;
This obtains a working page and a working history.
Even said that, the page cannot be deleted yet, because of:
Error 1062: Duplicate entry '46233' for key 'ar_revid_uniq' (localhost)
So, since our intention is to delete this page, it's safe enough to get rid of all these broken archived revisions:
$ DELETE FROM archive WHERE ar_namespace = 8 AND ar_title = 'Common.js';
Now I was able to delete this page using the canonical way.
I have absolutely no idea why such a thing happened. It's like in the dump, the page and the archive table were more up to date (out of sync) than the revision table.
BTW, since the intention was to nuke that page, and now it's really nuked, here the original history:
12:39, 25 July 2022β Valerio Bozzolan (Talk | contribs | block)β m . . (5,869 bytes) (+85)β . . (fix access of undefined wgUserGroups in MediaWiki 1.35 phabricator:T268515; remove deprecated addOnloadHook()) (rollback 1 edit | undo) (cur | prev) 15:14, 9 March 2022β Dario Crespi (Talk | contribs | block)β . . (5,784 bytes) (-5)β . . (undo) (cur | prev) 13:52, 4 March 2022β Dario Crespi (Talk | contribs | block)β . . (5,789 bytes) (+1)β . . (undo) (cur | prev) 13:50, 4 March 2022β Dario Crespi (Talk | contribs | block)β . . (5,788 bytes) (+93)β . . (+link al manuale) (undo) (cur | prev) 09:15, 31 December 2021β Iopensa (Talk | contribs | block)β . . (5,695 bytes) (+45)β . . (undo) (cur | prev) 09:06, 31 December 2021β Iopensa (Talk | contribs | block)β . . (5,650 bytes) (+26)β . . (undo) (cur | prev) 08:44, 31 December 2021β Iopensa (Talk | contribs | block)β . . (5,624 bytes) (+71)β . . (Aggiungo link alla pagina direttivo) (undo) (cur | prev) 20:02, 29 September 2017β Nemo (Talk | contribs | block)β m . . (5,553 bytes) (-2)β . . (^_^) (undo) (cur | prev) 20:01, 29 September 2017β Nemo (Talk | contribs | block)β . . (5,555 bytes) (-646)β . . (HTTPS non c'Γ¨. Per la veritΓ non vedo l'utilitΓ di reindirizzare chi va in modifica.) (undo) (cur | prev) 12:45, 27 August 2017β Laurentius (Talk | contribs | block)β . . (6,201 bytes) (+457)β . . (sidebar anche per lo staff) (undo) (cur | prev) 09:22, 15 April 2017β Saverio.G (Talk | contribs | block)β m . . (5,744 bytes) (+73)β . . (aggiunta link a sezione direttivo) (undo) (cur | prev) 18:36, 30 January 2017β Laurentius (Talk | contribs | block)β . . (5,671 bytes) (+539)β . . (aggiungo sezione del menΓΉ per il direttivo) (undo) (cur | prev) 14:57, 30 January 2017β Nemo (Talk | contribs | block)β . . (5,132 bytes) (-116)β . . (tolgo pagina superata) (undo) (cur | prev) 13:11, 24 September 2015β Nemo (Talk | contribs | block)β . . (5,248 bytes) (+116)β . . (Collegamento a Associazione:Attribuzione di compiti a volontari, richiesto da Giuliana.) (undo) (cur | prev) 18:30, 13 April 2015β Laurentius (Talk | contribs | block)β . . (5,132 bytes) (+74)β . . (formattazione delle etichette del menu) (undo) (cur | prev) 12:45, 19 May 2014β CristianCantoro (Talk | contribs | block)β . . (5,058 bytes) (+980)β . . (undo) (cur | prev) 08:46, 16 May 2014β Gvf (Talk | contribs | block)β . . (4,078 bytes) (-1)β . . (Cambio gruppo per visualizzazione sidebar soci da users a Soci) (undo) (cur | prev) 15:52, 17 December 2013β CristianCantoro (Talk | contribs | block)β . . (4,079 bytes) (-4)β . . (undo) (cur | prev) 15:49, 17 December 2013β CristianCantoro (Talk | contribs | block)β . . (4,083 bytes) (-5)β . . (undo) (cur | prev) 15:43, 17 December 2013β CristianCantoro (Talk | contribs | block)β . . (4,088 bytes) (+206)β . . (+redirect) (undo) (cur | prev) 07:42, 26 March 2012β Laurentius (Talk | contribs | block)β . . (3,882 bytes) (-885)β . . (pulisco) (undo) (cur | prev) 07:36, 26 March 2012β Laurentius (Talk | contribs | block)β . . (4,767 bytes) (+103)β . . (prova per monobook) (undo) (cur | prev) 21:20, 25 March 2012β Laurentius (Talk | contribs | block)β . . (4,664 bytes) (-3)β . . (funziona!) (undo) (cur | prev) 21:19, 25 March 2012β Laurentius (Talk | contribs | block)β . . (4,667 bytes) (+1)β . . (prova) (undo) (cur | prev) 21:17, 25 March 2012β Laurentius (Talk | contribs | block)β . . (4,666 bytes) (+1)β . . (correggo) (undo) (cur | prev) 21:15, 25 March 2012β Laurentius (Talk | contribs | block)β . . (4,665 bytes) (+894)β . . (test...) (undo) (cur | prev) 21:01, 25 March 2012β Laurentius (Talk | contribs | block)β . . (3,771 bytes) (+3)β . . (test) (undo) (cur | prev) 20:59, 25 March 2012β Laurentius (Talk | contribs | block)β . . (3,768 bytes) (-18)β . . (prova) (undo) (cur | prev) 20:41, 25 March 2012β Laurentius (Talk | contribs | block)β . . (3,786 bytes) (+3,786)β . . (sidebar per soci)