Page MenuHomePhabricator

sr:Модул:No globals/док has the wrong content model
Closed, ResolvedPublic

Description

https://sr.wikipedia.org/wiki/%D0%9C%D0%BE%D0%B4%D1%83%D0%BB:No_globals/%D0%B4%D0%BE%D0%BA has the wrong content model ("Scribunto") instead of "wikitext".

But using Special:ChangeContentModel doesn't seem to be able to fix it either, it errors with "No changes were requested.".

Event Timeline

SD0001 subscribed.

The page is also non-editable. The error message seems self-contradicting:

You cannot edit this revision because its content model is wikitext, which differs from the current content model of the page Scribunto.

The problem is probably that the page_content_model field does not agree with the content model in the revision table.

My guess is that someone who has editcontentmodel access on the wiki might be able to fix this by trying to make an edit through the API with an explicit content model parameter of wikitext. At one point that worked, although later refactoring may have broken it.

The problem is probably that the page_content_model field does not agree with the content model in the revision table.

Yes.

I ran a script and found 152 pages in module namespace having the same issue, with majority being on srwiki (I only checked module namespace and SUL wikis):

elwiktionary: Kleida/τεκμηρίωση
elwiktionary: Table-el-1/τεκμηρίωση
elwiktionary: eo-infl/τεκμηρίωση
euwiki: Cycling_race/doc
hywiktionary: h3/data
hywiktionary: lang/data
iowiki: Anchor/doc
iowiki: Arguments/doc
iowiki: Category_handler/doc
iowiki: Documentation/config/doc
iowiki: Documentation/doc
iowiki: Hatnote/doc
iowiki: List/doc
iowiki: Lua_banner/doc
iowiki: Namespace_detect/config/doc
iowiki: Namespace_detect/data/doc
iowiki: Namespace_detect/doc
iowiki: Navbar/doc
iowiki: Navbox/doc
iowiki: No_globals/doc
iowiki: Parameter_names_example/doc
iowiki: Sidebar/doc
iowiki: TableTools/doc
iowiki: Yesno/doc
ocwiki: Wikidata/doc
pnbwiki: Portal/images/دیگر
pnbwiki: Portal/images/عرفیت
pnbwiki: Portal/images_٢
pswiki: Convert/data/doc
pswiki: Convert/doc
pswiki: Documentation/doc
pswiki: Infobox_military_conflict/doc
pswiki: Location_map/doc
pswiki: Location_map/info/doc
pswiki: Message_box/configuration/doc
pswiki: Ns_has_subpages/doc
pswiki: Numeral_converter/doc
pswiki: Wikidata/تتبع/doc
pswiki: Wikidata2/P54/doc
pswiki: WikidataListe/doc
sdwiki: Color_contrastT186943
sewiki: Reply_to/doc
sewiki: Wd/doc
srwiki: Age/док
srwiki: Asbox/док
srwiki: Asbox_stubtree/док
srwiki: Bananas/док
srwiki: BananasArgs/док
srwiki: Category_handler/config/док
srwiki: Category_handler/док
srwiki: Check_for_unknown_parameters/док
srwiki: Citation/CS1/COinS/sandbox/док
srwiki: Citation/CS1/COinS/док
srwiki: Citation/CS1/Configuration/sandbox/док
srwiki: Citation/CS1/Configuration/док
srwiki: Citation/CS1/Date_validation/sandbox/док
srwiki: Citation/CS1/Date_validation/док
srwiki: Citation/CS1/Identifiers/sandbox/док
srwiki: Citation/CS1/Identifiers/док
srwiki: Citation/CS1/Suggestions/sandbox/док
srwiki: Citation/CS1/Suggestions/док
srwiki: Citation/CS1/Utilities/sandbox/док
srwiki: Citation/CS1/Utilities/док
srwiki: Citation/CS1/Whitelist/sandbox/док
srwiki: Citation/CS1/Whitelist/док
srwiki: Citation/CS1/sandbox/док
srwiki: Convert/data/sandbox/док
srwiki: Convert/data/док
srwiki: Convert/documentation/conversion_data/док
srwiki: Convert/documentation/conversion_data_introduction/док
srwiki: Convert/extra/sandbox/док
srwiki: Convert/extra/док
srwiki: Convert/makeunits/док
srwiki: Convert/sandbox/док
srwiki: Convert/show/док
srwiki: Convert/tester/док
srwiki: Convert/text/sandbox/док
srwiki: Convert/text/док
srwiki: Convert/док
srwiki: ConvertNumeric/док
srwiki: Date/док
srwiki: Delink/док
srwiki: Demo/док
srwiki: Details/док
srwiki: Documentation/config/док
srwiki: Effective_protection_expiry/док
srwiki: Effective_protection_level/док
srwiki: Further-lat/док
srwiki: Gaps/док
srwiki: Hatnote-inline/док
srwiki: Hatnote/док
srwiki: HelloWorld/док
srwiki: Icon/data/док
srwiki: Icon/док
srwiki: If_empty/док
srwiki: In5/док
srwiki: Indent/док
srwiki: Infobox/док
srwiki: InfoboxImage/док
srwiki: List/док
srwiki: Location_map/data/Canada/док
srwiki: Location_map/data/док
srwiki: Lua_banner/док
srwiki: Main-lat/док
srwiki: Main/док
srwiki: Message_box/configuration/док
srwiki: Message_box/док
srwiki: Middleclass/док
srwiki: Namespace_detect/док
srwiki: Navbar/док
srwiki: No_globals/док
srwiki: NumberSpell/док
srwiki: Official_website-lat/док
srwiki: Official_website/док
srwiki: Pagelist/док
srwiki: Protection_banner/config/док
srwiki: Purge/док
srwiki: Random/док
srwiki: Redirect/док
srwiki: Redirect_hatnote-lat/док
srwiki: Redirect_hatnote/док
srwiki: ScribuntoUnit/sandbox/док
srwiki: ScribuntoUnit/док
srwiki: Section_link/док
srwiki: See_also-lat/док
srwiki: See_also/док
srwiki: Separated_entries/док
srwiki: SportsReference/док
srwiki: String/док
srwiki: StringReplace/док
srwiki: StripToNumbers/док
srwiki: Su/док
srwiki: TableTools/док
srwiki: TimeAgo/док
srwiki: UnitTests/док
srwiki: Unsubst/док
srwiki: Video_game_reviews/data/док
srwiki: Video_game_reviews/док
srwiki: WeatherBox/sandbox/док
srwiki: Wikidata/date/док
srwiki: Wikidata/док
srwiki: WikidataCheck/док
srwiki: Yesno/док
srwiki: Пречица/док
srwiki: Пронађи_изворе/autodoc/config/док
srwiki: Пронађи_изворе/autodoc/док
srwiki: Пронађи_изворе/док
thwiktionary: zh/data/Jyutping_word/documentation
thwiktionary: zh/data/dial-pron/documentation
thwiktionary: zh/data/ltc-pron/documentation
thwiktionary: zh/data/och-pron-ZS/documentation
zhwiki: Awk

I wonder why page_content_model was wrongly set though. Is this the same issue as T108663#1741046? :/ If so, might be worth resurrecting a modified version of https://phabricator.wikimedia.org/source/mediawiki/browse/REL1_43/maintenance/fixDefaultJsonContentPages.php;848a9f279f42ed0edb0c83bde65254585bc829cb but for Scribunto.

Trying to edit https://te.wikipedia.org/wiki/%E0%B0%AE%E0%B1%82%E0%B0%B8:Message_box gives "Scribunto module" content is not allowed on page మూస:Message box in slot "Main" which feels related but might be a distinct issue?

That's unrelated. That page is in template namespace, not module namespace. That shouldn't be possible.

My guess as to how it ended up in that state is that someone imported a template and its dependencies with "import to namespace" selected as "Template", and the import code in 2015 didn't check for content model mismatches.

My guess is that someone who has editcontentmodel access on the wiki might be able to fix this by trying to make an edit through the API with an explicit content model parameter of wikitext. At one point that worked, although later refactoring may have broken it.

It doesn't work without changing the text as the edit API short-circuits and returns a nochange response, but works fine if a dummy edit is made. I'm working through the above list now.

All done from the above list. It actually does work without making text changes if the page content model was correct and we want to set the revision content model to match that, but not the other way round.

Pppery assigned this task to SD0001.