First url preserves the wgAction but the second does not:
- http://en.wikipedia.org/w/index.php?title=Special:Random&action=edit
- http://en.wikipedia.org/w/index.php?title=Special:RandomInCategory/Living_people&action=edit
Because apparently they were written differently. Making the following change to ./specials/SpecialRandomInCategory.php seems to succeed:
@@ -142,11 +142,13 @@ class SpecialRandomInCategory extends FormSpecialPage { $this->category->getText() ); return Status::newFatal( $msg ); } - $this->getOutput()->redirect( $title->getFullURL() ); + $query = $this->getRequest()->getValues(); + unset( $query['title'] ); + $this->getOutput()->redirect( $title->getFullURL($query) ); } /** * Choose a random title. * @return Title|null Title object (or null if nothing to choose from)