Last modified: 2014-05-25 08:08:35 UTC

Wikimedia Bugzilla is closed!

Wikimedia migrated from Bugzilla to Phabricator. Bug reports are handled in Wikimedia Phabricator.
This static website is read-only and for historical purposes. It is not possible to log in and except for displaying bug reports and their history, links might be broken. See T67720, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 65720 - Fatal hook error on first run
Fatal hook error on first run
Status: RESOLVED INVALID
Product: MediaWiki extensions
Classification: Unclassified
BetaFeatures (Other open bugs)
REL1_23-branch
All All
: Unprioritized critical (vote)
: ---
Assigned To: Nobody - You can work on this!
:
Depends on:
Blocks: 65735
  Show dependency treegraph
 
Reported: 2014-05-24 08:29 UTC by Ian Kelling
Modified: 2014-05-25 08:08 UTC (History)
6 users (show)

See Also:
Web browser: Firefox
Mobile Platform: ---
Assignee Huggle Beta Tester: ---


Attachments

Description Ian Kelling 2014-05-24 08:29:09 UTC
Upon loading a page, I get this error after turning on some debug options.

Catchable fatal error: Argument 3 passed to BetaFeaturesHooks::getBetaFeaturesLink() must be an instance of SkinTemplate, none given in <my-mw-path>/extensions/BetaFeatures/BetaFeaturesHooks.php on line 317

It happens with REL1_23 and mediawiki/REL1_23 . 
It doesn't happen with REL1_22 and mediawiki/REL1_23.
It doesn't happen with master and mediawiki/master.

It appears to be a small change which mediawiki/REL1_23 is not ready for, but mediawiki/master. Reverting the change works. I'm submitting a patch through gerrit shortly.
Comment 1 Gerrit Notification Bot 2014-05-24 08:47:15 UTC
Change 135189 had a related patch set uploaded by Ian Kelling:
Revert hook change REL1_23 is not ready for

https://gerrit.wikimedia.org/r/135189
Comment 2 Gerrit Notification Bot 2014-05-24 23:15:54 UTC
Change 135189 abandoned by Jforrester:
Revert hook change REL1_23 is not ready for

Reason:
The master branch of extensions are intended to work with master of MediaWiki; for compatibility with previous versions of MediaWiki, use historic branches of the extension (in this case, REL1_23 – https://git.wikimedia.org/log/mediawiki%2Fextensions%2FBetaFeatures/refs%2Fheads%2FREL1_23).

https://gerrit.wikimedia.org/r/135189
Comment 3 Kunal Mehta (Legoktm) 2014-05-24 23:19:54 UTC
I1116fd64ea0beac148ee75ea4ec050741fc2c3b7 (the core change) is in 1.23, so it should work...
Comment 4 Ian Kelling 2014-05-25 00:56:04 UTC
I think my original diagnosis of the cause is wrong. I didn't figure it out thoroughly, just reverted some code and things seemed to work, but they probably don't really work quite right.

To Kunal's comment, the change you pointed shows passing 2 arguments, while the function causing the error recieves 3 arguments (which my patch changes to 2). That seems a likely cause. It doesn't explain why it happens in 1.23 but not master. I don't think my patch is the right solution, and was sent to the wrong branch anyways. I'd like to see if someone else would take a shot at fixing it, who is a little better at php/mediawiki codebase.
Comment 5 Kunal Mehta (Legoktm) 2014-05-25 04:22:07 UTC
I just tested it with BetaFeatures on REL1_23, and core at REL1_23, and it worked fine for me.

What kind of caching do you have setup? Try disabling it and see if it works?

(In reply to Ian Kelling from comment #4)
> To Kunal's comment, the change you pointed shows passing 2 arguments, while
> the function causing the error recieves 3 arguments (which my patch changes
> to 2). 

If you look at https://gerrit.wikimedia.org/r/#/c/95776/1/includes/SkinTemplate.php,cm there are 3 arguments being passed: $personal_urls, $title, and $this (the SkinTemplate instance).
Comment 6 Ian Kelling 2014-05-25 08:08:35 UTC
I was reading the 3 argument's wrong, thank you.

I figured it out. My local branch was tracking the wrong remote branch. Thank you, sorry for the bad bug.

Note You need to log in before you can comment on or make changes to this bug.


Navigation
Links