Page MenuHomePhabricator

MassEditRegex changes pages content model to "wikitext" when editing a page
Open, Needs TriagePublic


When used to edit pages with a page content model other than 'wikitext', MassEditRegex automatically changes it to 'wikitext'.
Here I describe this issue in relation to Extension:Proofread Page extension. Pages generated by this extension, stored in the Page namespace, have the specific content model 'proofread-page'. The content model is changed when these pages are edited by MassEditRegex. This causes a major issue in the extension functioning.

Event Timeline

Loman87 created this task.Jan 16 2018, 10:32 AM
Restricted Application added a subscriber: Aklapper. · View Herald TranscriptJan 16 2018, 10:32 AM
Loman87 updated the task description. (Show Details)Jan 16 2018, 10:36 AM
Kghbln added a subscriber: Kghbln.Jan 16 2018, 1:57 PM

@Loman87 Thanks a lot for createing this issue. Just for the sake of completeness. Could you please specify the versions of MediaWiki, MassEditRegex, ProofreadPage and PHP you are using on your wiki.

Kghbln renamed this task from MassEditRegex changes pages content model to MassEditRegex changes pages content model "wikitext" when editing a page.Jan 16 2018, 1:57 PM
Kghbln renamed this task from MassEditRegex changes pages content model "wikitext" when editing a page to MassEditRegex changes pages content model to "wikitext" when editing a page.Jan 16 2018, 2:01 PM

You're welcome!

MediaWiki 1.27.4
PHP 7.0.22-0ubuntu0.16.04.1 (apache2handler)

Proofread Page – (af0a7ec) 00:57, 5 May 2016
MassEditRegex – 8.0.3 (ca4642e) 17:27, 7 December 2016

Thanks a lot. So you are hopping from REL to REL which is perfectly fine. Could you try upgrading MassEditRegex to the latest version 8.3.0 and verify that the issue is still around? I do not expect a change in behavior still we should make sure that the issue is still around.

I tried with MassEditRegex 8.3.0 version and the issue still occurs.
For the sake of completeness, months ago I posted a related issue occured using Extension:Replace Text. The situation was the same: I wanted to add categories to pages in Page namespace. In this case the extension seemed to successfully complete the task, but instead it didn't do anything. Yaron Koren told me that 'Replace Text can only deal with pages that are defined as holding wikitext'.

I don't know if this could help, since I am not aware about the similarities between these two extensions (I just know that both use Regular expressions, but I don't know how).

Thanks for trying. It may very well be that this is not a bug but a feature request. I guess we are not in the hands of @Malvineous

It could be useful to include some Extension:Proofread_Page developers, couldn't be? The issue is related to the specific content model used by this extension

So if the page content model is CSS, JavaScript, json or plaintext (all four provided by MediaWiki core) you do not observe this behavior?

I didn't try, I am sorry :(

No worries. It sounded like you had tried it. If it does not work either we have proof that we are currently restricted to wikitext as the page content model.

Can you try editing MediaWiki:Common.css or another page to see if you get the same problem? It's been a while since I've worked on this extension but from memory it does not change the page content model, it simply issues an 'edit' request to the MediaWiki API. Possibly the bug could be in the Proofread Page extension not hooking the edit API correctly, especially if the problem exists with other page editing extensions too.

I tried and at the beginning it seemed to work fine with MediaWiki:Common.css. But after a page refresh I noticed the same problem. If in proofread page there is a message that informs the user of the content model change, in this case no information is provided (and this is really bad in my opinion). However anyone can notice the content model change since the default MediaWiki:Common.css layout is missing.

Obviously (I didn't mention it before, but I imagined it was kind of implicit), to repair the page (both in Mediawiki and Page namespaces) I had to use Special:ChangeContentModel: trying to restore an older version of the page using the diff/history tool does not solve the issue.