Page MenuHomePhabricator

Invalid parameter for message "parentheses"
Closed, ResolvedPublic

Description

Two somewhat different stacktraces

2013-12-30 13:35:03 mw1021 enwiki: Invalid parameter for message "parentheses": a:1:{s:3:"raw";N;}
#0 /usr/local/apache/common-local/php-1.23wmf7/includes/Message.php(786): Message->extractParam(Array)
#1 /usr/local/apache/common-local/php-1.23wmf7/includes/Message.php(580): Message->replaceParameters('($1)', 'before')
#2 /usr/local/apache/common-local/php-1.23wmf7/includes/Message.php(680): Message->toString()
#3 /usr/local/apache/common-local/php-1.23wmf7/includes/Linker.php(1589): Message->escaped()
#4 /usr/local/apache/common-local/php-1.23wmf7/includes/changes/ChangesList.php(422): Linker::commentBlock('???[[Category:M...', Object(Title))
#5 /usr/local/apache/common-local/php-1.23wmf7/includes/changes/OldChangesList.php(102): ChangesList->insertComment(Object(RecentChange))
#6 /usr/local/apache/common-local/php-1.23wmf7/includes/specials/SpecialWatchlist.php(426): OldChangesList->recentChangesLine(Object(RecentChange), NULL, 728)
#7 /usr/local/apache/common-local/php-1.23wmf7/includes/specialpage/SpecialPage.php(673): SpecialWatchlist->execute(NULL)
#8 /usr/local/apache/common-local/php-1.23wmf7/includes/SpecialPageFactory.php(488): SpecialPage->run(NULL)
#9 /usr/local/apache/common-local/php-1.23wmf7/includes/Wiki.php(298): SpecialPageFactory::executePath(Object(Title), Object(RequestContext))
#10 /usr/local/apache/common-local/php-1.23wmf7/includes/Wiki.php(596): MediaWiki->performRequest()
#11 /usr/local/apache/common-local/php-1.23wmf7/includes/Wiki.php(460): MediaWiki->main()
#12 /usr/local/apache/common-local/php-1.23wmf7/index.php(49): MediaWiki->run()
#13 /usr/local/apache/common-local/w/index.php(3): require('/usr/local/apac...')
#14 {main}

2013-12-30 09:39:15 mw1068 enwiki: Invalid parameter for message "parentheses": a:1:{s:3:"raw";N;}
#0 /usr/local/apache/common-local/php-1.23wmf7/includes/Message.php(786): Message->extractParam(Array)
#1 /usr/local/apache/common-local/php-1.23wmf7/includes/Message.php(599): Message->replaceParameters('([INVALID])', 'after')
#2 /usr/local/apache/common-local/php-1.23wmf7/includes/Message.php(680): Message->toString()
#3 /usr/local/apache/common-local/php-1.23wmf7/includes/Linker.php(1589): Message->escaped()
#4 /usr/local/apache/common-local/php-1.23wmf7/includes/changes/ChangesList.php(422): Linker::commentBlock('no reason not t...', Object(Title))
#5 /usr/local/apache/common-local/php-1.23wmf7/includes/changes/OldChangesList.php(102): ChangesList->insertComment(Object(RecentChange))
#6 /usr/local/apache/common-local/php-1.23wmf7/includes/specials/SpecialRecentchanges.php(494): OldChangesList->recentChangesLine(Object(RecentChange), false, 4)
#7 /usr/local/apache/common-local/php-1.23wmf7/includes/specials/SpecialRecentchanges.php(185): SpecialRecentChanges->webOutput(Object(ResultWrapper), Object(FormOptions))
#8 /usr/local/apache/common-local/php-1.23wmf7/includes/specialpage/SpecialPage.php(673): SpecialRecentChanges->execute('Pumila')
#9 /usr/local/apache/common-local/php-1.23wmf7/includes/SpecialPageFactory.php(488): SpecialPage->run('Pumila')
#10 /usr/local/apache/common-local/php-1.23wmf7/includes/Wiki.php(298): SpecialPageFactory::executePath(Object(Title), Object(RequestContext))
#11 /usr/local/apache/common-local/php-1.23wmf7/includes/Wiki.php(596): MediaWiki->performRequest()
#12 /usr/local/apache/common-local/php-1.23wmf7/includes/Wiki.php(460): MediaWiki->main()
#13 /usr/local/apache/common-local/php-1.23wmf7/index.php(49): MediaWiki->run()
#14 /usr/local/apache/common-local/w/index.php(3): require('/usr/local/apac...')
#15 {main}


Version: 1.23.0
Severity: normal

Details

Reference
bz59124

Event Timeline

bzimport raised the priority of this task from to Normal.Nov 22 2014, 2:36 AM
bzimport added a project: MediaWiki-Watchlist.
bzimport set Reference to bz59124.
bzimport added a subscriber: Unknown Object (MLST).
Yurik created this task.Dec 30 2013, 4:44 PM

a:1:{s:3:"raw";N;} sounds like a array with 'raw' => null and than the isset in Message.php will be false and the error is triggered.

I have no idea why Linker::commentBlock gets a null from Linker::formatComment.

The text on the second stacktrace should be "no reason not to link [[human]]s" (https://en.wikipedia.org/w/index.php?title=Chordate&diff=587967257&oldid=585538122)

Within Linker::formatComment, the $comment parameter that is ultimately returned passes through three different method calls that utilize preg_replace_callback:

  • Sanitizer::escapeHtmlAllowEntities
  • Linker::formatAutocomments
  • Linker::formatLinksInComment

preg_replace_callback is documented to return null on error in in no case is the return value checked.

One more:

2015-04-05 15:18:32 translatewiki.net translatewiki_net-bw_: [36d45f34] /w/i.php?title=Thread:Project:Translator/_370_370_–_370/reply_(2)&action=history ErrorException from line 1007 of /srv/mediawiki/tags/2015-04-02_12:14:30/includes/Message.php:
PHP Warning: Invalid parameter for message "parentheses": a:1:{s:3:"raw";N;}
#0 [internal function]: MWExceptionHandler::handleError(512, 'Invalid paramet...', '/srv/mediawiki/...', 1007, Array)
#1 /srv/mediawiki/tags/2015-04-02_12:14:30/includes/Message.php(1007): trigger_error('Invalid paramet...', 512)
#2 /srv/mediawiki/tags/2015-04-02_12:14:30/includes/Message.php(966): Message->extractParam(Array)
#3 /srv/mediawiki/tags/2015-04-02_12:14:30/includes/Message.php(733): Message->replaceParameters('([INVALID])', 'after')
#4 /srv/mediawiki/tags/2015-04-02_12:14:30/includes/Message.php(826): Message->toString()
#5 /srv/mediawiki/tags/2015-04-02_12:14:30/includes/Linker.php(1594): Message->escaped()
#6 /srv/mediawiki/tags/2015-04-02_12:14:30/includes/Linker.php(1616): Linker::commentBlock('Reply to [[Thre...', Object(Title), false)
#7 /srv/mediawiki/tags/2015-04-02_12:14:30/includes/actions/HistoryAction.php(662): Linker::revComment(Object(Revision), false, true)
#8 /srv/mediawiki/tags/2015-04-02_12:14:30/includes/actions/HistoryAction.php(536): HistoryPager->historyLine(Object(stdClass), NULL, false, true, true)
#9 /srv/mediawiki/tags/2015-04-02_12:14:30/includes/pager/IndexPager.php(448): HistoryPager->getEndBody()
#10 /srv/mediawiki/tags/2015-04-02_12:14:30/includes/actions/HistoryAction.php(208): IndexPager->getBody()
#11 /srv/mediawiki/tags/2015-04-02_12:14:30/includes/actions/FormlessAction.php(43): HistoryAction->onView()
#12 /srv/mediawiki/tags/2015-04-02_12:14:30/includes/MediaWiki.php(393): FormlessAction->show()
#13 /srv/mediawiki/tags/2015-04-02_12:14:30/includes/MediaWiki.php(271): MediaWiki->performAction(Object(Article), Object(Title))
#14 /srv/mediawiki/tags/2015-04-02_12:14:30/includes/MediaWiki.php(561): MediaWiki->performRequest()
#15 /srv/mediawiki/tags/2015-04-02_12:14:30/includes/MediaWiki.php(412): MediaWiki->main()
#16 /srv/mediawiki/tags/2015-04-02_12:14:30/index.php(46): MediaWiki->run()
#17 {main}

TTO added a subscriber: TTO.Feb 4 2017, 2:57 AM

T43308 appears to be https://en.wikipedia.org/w/index.php?title=Africville&diff=360541408&oldid=360540210

[[WP:AES|←]]Replaced content with '[[File:Africville and bridge.jpg|right|thumb|200px] {{coord|44|40|28.5|N|63|37|6.6|W|display=title}} [[Category:Communities in the Halifax Regional Municipali...'

The TWN one from above is

Reply to [[Thread:Project:Translator/ 370 370 – 370/reply|<span id="lt"><tt style="font-size:88%;line-height:1.2">[lt]</tt> [[Portal:lt|Lithuanian – lietuvių]]</span>]]

These are both rather pathological summaries, and T99346 (which dealt with certain kinds of strange summary syntax) has been resolved since the issues were reported.

Are errors of this type still showing up in the logs?

I have not seen that in translatewiki.net in a while. The url in my paste above does not reproduce it.

TTO added a subscriber: demon.Apr 26 2017, 5:31 AM

@demon, is this still in WMF logs? If not, we should close this.

demon added a comment.Apr 26 2017, 3:52 PM

Not to my knowledge

TTO closed this task as Resolved.Apr 27 2017, 1:08 AM

On the basis that it is no longer occurring.

mmodell changed the subtype of this task from "Task" to "Production Error".Aug 28 2019, 11:12 PM