Page MenuHomeMiraheze

NukeDPL unable to delete any page on lysophorm.miraheze.org
Closed, ResolvedPublic

Description

Using the NukeDPL extension to delete any number of pages (even a single, simple test page) results in a non-descriptive error and does not delete any pages.

The error reads (the wiki is in pt-br) as follows:

[8dfbd2dcd17955b6c391a43c] 2024-02-08 20:10:16: Exceção fatal do tipo “Error”

Meaning just "Fatal exception of type Error".

Tested NukeDPL with both DynamicPageList and DynamicPageList3.

Event Timeline

/wiki/Especial:NukeDPL?action=delete   Error: Call to undefined method Article::doDelete()

Stack:

from /srv/mediawiki/1.41/extensions/NukeDPL/includes/SpecialNukeDPL.php(98)
#0 /srv/mediawiki/1.41/extensions/NukeDPL/includes/SpecialNukeDPL.php(32): SpecialNukeDPL->doDelete(array, string)
#1 /srv/mediawiki/1.41/includes/specialpage/SpecialPage.php(727): SpecialNukeDPL->execute(NULL)
#2 /srv/mediawiki/1.41/includes/specialpage/SpecialPageFactory.php(1621): MediaWiki\SpecialPage\SpecialPage->run(NULL)
#3 /srv/mediawiki/1.41/includes/MediaWiki.php(357): MediaWiki\SpecialPage\SpecialPageFactory->executePath(string, RequestContext)
#4 /srv/mediawiki/1.41/includes/MediaWiki.php(960): MediaWiki->performRequest()
#5 /srv/mediawiki/1.41/includes/MediaWiki.php(613): MediaWiki->main()
#6 /srv/mediawiki/config/initialise/entrypoints/index.php(100): MediaWiki->run()
#7 /srv/mediawiki/config/initialise/entrypoints/index.php(95): wfIndexMain()
#8 {main}

This line looks to be the offender.

Looks like it should be replaced with something like:

$wikiPage = $this->services->getWikiPageFactory()->newFromId( $id);

$deletePage = $this->services->getDeletePageFactory()->newDeletePage( $wikiPage, RequestContext::getMain()->getUser() );

$deletePage->setSuppress( true )->deleteIfAllowed( '' );

Initially got 318 pages from a query, it timed out and nothing was deleted. Changed query and got ~50 pages - worked.

Paladox claimed this task.