Last modified: 2011-10-15 22:09:10 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 T33674, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 31674 - can't edit watchlist if it contains a page in the "Special" space
can't edit watchlist if it contains a page in the "Special" space
Status: RESOLVED FIXED
Product: MediaWiki
Classification: Unclassified
Watchlist (Other open bugs)
1.18.x
All All
: Normal normal (vote)
: ---
Assigned To: Nobody - You can work on this!
:
Depends on:
Blocks: 29876
  Show dependency treegraph
 
Reported: 2011-10-13 17:54 UTC by kipod
Modified: 2011-10-15 22:09 UTC (History)
3 users (show)

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


Attachments

Description kipod 2011-10-13 17:54:42 UTC
(at least one) older versions allowed entering pages in the "Special:" space (-1) into the watchlist. with version 1.18, trying to edit the watchlist looks for the corresponding talk page of all the pages in current list, and since "Special:" pages do not have talk pages associated with them, this creates the following exception when trying to use "View and edit watchlis":

the problem can be reproduced by using the API to insert a page in the "Special:" space into the watchlist, e.g. by running the following javascript code:

<code>
$.post(mw.util.wikiScript('api'), {action: 'watch', title: 'Special:Recentchanges', token: mw.user.tokens.get('watchToken')})
</code>

(you'll need to run it again with "unwatch" to make your watchlist editable again).

here is the exception:

<pre>
getTalk does not make any sense for given namespace -1
Backtrace:
#0 /usr/local/apache/common-local/php-1.18/includes/Namespace.php(84): MWNamespace::isMethodValidFor(-1, 'MWNamespace::ge...')
#1 /usr/local/apache/common-local/php-1.18/includes/Title.php(2850): MWNamespace::getTalk(-1)
#2 /usr/local/apache/common-local/php-1.18/includes/specials/SpecialEditWatchlist.php(182): Title->getTalkPage()
#3 /usr/local/apache/common-local/php-1.18/includes/specials/SpecialEditWatchlist.php(149): SpecialEditWatchlist->showTitles(Array, '?????????? ????...')
#4 [internal function]: SpecialEditWatchlist->submitRaw(Array)
#5 /usr/local/apache/common-local/php-1.18/includes/HTMLForm.php(279): call_user_func(Array, Array)
#6 /usr/local/apache/common-local/php-1.18/includes/HTMLForm.php(228): HTMLForm->trySubmit()
#7 /usr/local/apache/common-local/php-1.18/includes/HTMLForm.php(242): HTMLForm->tryAuthorizedSubmit()
#8 /usr/local/apache/common-local/php-1.18/includes/specials/SpecialEditWatchlist.php(76): HTMLForm->show()
#9 /usr/local/apache/common-local/php-1.18/includes/SpecialPageFactory.php(460): SpecialEditWatchlist->execute('raw')
#10 /usr/local/apache/common-local/php-1.18/includes/Wiki.php(224): SpecialPageFactory::executePath(Object(Title), Object(RequestContext))
#11 /usr/local/apache/common-local/php-1.18/includes/Wiki.php(624): MediaWiki->performRequest()
#12 /usr/local/apache/common-local/php-1.18/includes/Wiki.php(531): MediaWiki->main()
#13 /usr/local/apache/common-local/php-1.18/index.php(57): MediaWiki->run()
#14 /usr/local/apache/common-local/live-1.5/index.php(3): require('/usr/local/apac...')
#15 {main}
</pre>
Comment 1 kipod 2011-10-13 22:22:09 UTC
btw: i can suggest a "band-aid" patch that will not fix the underlying issue (pages in unwatchable "Special:" space in watchlist), but will eliminate the exception:
in SpecialEditWatchlist.php, just above 

$tools[] = Linker::link( $title->getTalkPage(), wfMsgHtml( 'talkpagelinktext' ) );

add

if( $title->getNamespace() !== NS_SPECIAL )
Comment 2 Max Semenik 2011-10-15 22:09:10 UTC
Fixed in r99914.

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


Navigation
Links