Page MenuHomePhabricator

Special:CreateClass fails due to PF_CreatePageJob.php: Class 'MediaWikiServices' not found
Closed, ResolvedPublicBUG REPORT

Description

Steps to Reproduce:
Try to create a new class

Actual Results:
This lovely error message:

[14cfff9d2b153a707899abc7] /wiki/Special:CreateClass Error from line 60 of /vagrant/mediawiki/extensions/PageForms/includes/PF_CreatePageJob.php: Class 'MediaWikiServices' not found

Backtrace:

#0 /vagrant/mediawiki/extensions/PageForms/specials/PF_CreateClass.php(134): PFCreatePageJob::createOrModifyPage(WikiPage, string, string, User)
#1 /vagrant/mediawiki/extensions/PageForms/specials/PF_CreateClass.php(213): PFCreateClass->createAllPages()
#2 /vagrant/mediawiki/includes/specialpage/SpecialPage.php(575): PFCreateClass->execute(NULL)
#3 /vagrant/mediawiki/includes/specialpage/SpecialPageFactory.php(611): SpecialPage->run(NULL)
#4 /vagrant/mediawiki/includes/MediaWiki.php(296): MediaWiki\Special\SpecialPageFactory->executePath(Title, RequestContext)
#5 /vagrant/mediawiki/includes/MediaWiki.php(900): MediaWiki->performRequest()
#6 /vagrant/mediawiki/includes/MediaWiki.php(527): MediaWiki->main()
#7 /vagrant/mediawiki/index.php(44): MediaWiki->run()
#8 /var/www/w/index.php(5): require(string)
#9 {main}

Expected Results:
Whatever the special page is supposed to do...

It seems PF_CreatePageJob.php is missing a use MediaWiki\MediaWikiServices; line.

Event Timeline

Restricted Application added a subscriber: Aklapper. · View Herald TranscriptMay 21 2020, 9:46 PM

Change 597879 had a related patch set uploaded (by Reedy; owner: Reedy):
[mediawiki/extensions/PageForms@master] Add use MediaWiki\MediaWikiServices

https://gerrit.wikimedia.org/r/597879

Reedy added a subscriber: Reedy.May 21 2020, 10:17 PM

It seems PF_CreatePageJob.php is missing a use MediaWiki\MediaWikiServices; line.

Not the only one

You're right; I found one more in PF_HelperFormAction.php. Should I just add it to the same patch?

You're right; I found one more in PF_HelperFormAction.php. Should I just add it to the same patch?

I've already made a patch ;)

Change 597879 had a related patch set uploaded (by Reedy; owner: Reedy):
[mediawiki/extensions/PageForms@master] Add use MediaWiki\MediaWikiServices

https://gerrit.wikimedia.org/r/597879

I just realized you uploaded a patch for this, as my patch never made it here. I must be doing something wrong with git-review.

Reedy, any ideas what I did wrong? My uploaded changes don't get linked to issues. They don't even get a bot review. For this issue I uploaded Change 597878, which never got linked, and I also uploaded https://gerrit.wikimedia.org/r/#/c/mediawiki/extensions/PageForms/+/597880/, which should have to linked to T253351. Any ideas what I'm doing wrong?

Reedy, any ideas what I did wrong? My uploaded changes don't get linked to issues.

@FreedomFighterSparrow: Follow https://www.mediawiki.org/wiki/Gerrit/Commit_message_guidelines - Bug T253352 must be Bug: T253352

Change 597878 had a related patch set uploaded (by Aklapper; owner: FreedomFighterSparrow):
[mediawiki/extensions/PageForms@master] PF_CreatePageJob: Add a missing "use" for MediaWiki\MediaWikiServices

https://gerrit.wikimedia.org/r/597878

Change 597878 abandoned by FreedomFighterSparrow:
PF_CreatePageJob: Add a missing "use" for MediaWiki\MediaWikiServices

Reason:
Change 597879 already done by Reedy

https://gerrit.wikimedia.org/r/597878

Change 597879 merged by jenkins-bot:
[mediawiki/extensions/PageForms@master] Add use MediaWiki\MediaWikiServices

https://gerrit.wikimedia.org/r/597879

Reedy closed this task as Resolved.May 22 2020, 4:54 PM
Reedy claimed this task.