Last modified: 2014-05-25 08:08:35 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.
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
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
I1116fd64ea0beac148ee75ea4ec050741fc2c3b7 (the core change) is in 1.23, so it should work...
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.
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).
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.