Page MenuHomePhabricator

Not possible to search and replace using "Extension:Replace Text" in namespace Page created by "Extension:Proofread Page"
Open, Needs TriagePublic


When I try to use "Extension:Replace Text" to search and replace in namespace NS_PROOFREAD_PAGE created by "Extension:Proofread Page", I get following error message:

replaceText: Wiki page "Page:Foo.pdf/39" does not hold regular wikitext.

I think the issue is in file ReplaceTextJob.php on line 79 with following code:

			if ( $this->title->getContentModel() !== CONTENT_MODEL_WIKITEXT ) {
				$this->error = 'replaceText: Wiki page "' .
					$this->title->getPrefixedDBkey() . '" does not hold regular wikitext.';
				return false;

Event Timeline

Extension:Replace_Text only works on pages content with content model "wikitext". ProofreadPage Page: pages are using an other content model ("proofread-page"). Extension:Replace_Text might be extended to support ProofreadPage content models to.

It would have been great if Extension:Replace_Text could be expanded to handle content model "proofread-page". I have a lot of pages in namespace NS_PROOFREAD_PAGE that I want to search and replace in.

Given that "proofread-page" can be easily parsed as wikitext (eg with AWB) it seems like a fairly straightforward request: what issues are this with just also allowing the "proofread-page" content model, while leaving the rest of the Extenios:Replace_Text code unchanged