Last modified: 2012-02-07 23:51:13 UTC
I found (at least) in Extension:WikiArticleFeeds the problem, that an url like &action=feed&feed=atom calls the hook with value action == nosuchaction . This is a deviation from previous behavious (I would say, serious). Pls. correct me, if I am wrong, or can you correct the problem in core ?
Analysis part: when using the (admittedly) deprecated, but still present UnknownAction hook, it returns currently 'nosuchaction' - and Extensions which hooks on an &action=feed value will fail because in wiki.php getAction() is called, and getActionName() returns $act == 'nosuchaction' . This overwrites the &action=xyz value the hook should have a chance to see, instead, it passes 'nosuchaction' to the hook. wiki.php: when called with &action=feed (as example; I added a debug output) 480 $act = $this->getAction(); /// $act = 'nosuchaction' and overwriting our 'feed' value 480a wfDebug( "Wiki:performAction:act = $act\n" ); 481 482 $action = Action::factory( $act, $page ); 483 if ( $action instanceof Action ) { 484 $action->show(); 485 wfProfileOut( __METHOD__ ); 486 return; 487 } 488 488a // the hook sees 'nosuchaction' instead of 'feed' 489 if ( wfRunHooks( 'UnknownAction', array( $act, $page ) ) ) { 490 $output->showErrorPage( 'nosuchaction', 'nosuchactiontext' ); 491 } 492 I am not courageous and competent enough to fix this in this very core part. Please can anyone of your core developers fix it ? The debug log proves my analysis: GET /phase3/index.php?title=Sandbox2&action=feed&feed=rss Wiki:performAction:act = nosuchaction <<< wrong; should be 'feed'
The problem is in Article:getActionName() , which returns 'nosuchaction' but the UnknownAction hook should be called _before_ an (internally) unknown action value gets overwritten.
Link added as reference on https://www.mediawiki.org/wiki/Manual:Hooks/UnknownAction - so that potential users of the deprecated hook are pointed to here.
fixed in r110716