Last modified: 2014-02-26 12:55:25 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 T45752, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 43752 - revision display on Schema:NoSuchPage triggers message parsing warning
revision display on Schema:NoSuchPage triggers message parsing warning
Status: RESOLVED FIXED
Product: Analytics
Classification: Unclassified
EventLogging (Other open bugs)
unspecified
All All
: Unprioritized minor
: ---
Assigned To: Ori Livneh
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2013-01-09 00:53 UTC by spage
Modified: 2014-02-26 12:55 UTC (History)
8 users (show)

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


Attachments

Description spage 2013-01-09 00:53:26 UTC
If you set your wiki to display warnings, visiting a non-existent schema page (on the machine that holds the schemas for event logging) triggers

  Warning: Invalid message parameter: a:1:{s:3:"raw";N;} in .../includes/Message.php on line 625

This is coming from the onBeforePageDisplay code in JsonSchemaHooks.php to show the subtitle "Revision nnnn":

            $out->addSubtitle( $out->msg( 'eventlogging-revision-id' )
                // We use 'rawParams' rather than 'numParams' to make it
                // easy to copy/paste the value into code.
                ->rawParams( $out->getRevisionId() )
The Schema page ends up displaying "Revision [INVALID]", which is fine, but the message parsing code is unhappy when the getRevisionId() is NULL (bug?!)

The stack in Message.php is 
  extractParam()
  replaceParameters()
  toString()
  escaped()

The simplest fix is to cast the revision ID to an integer in JsonSchemaHooks.php line 106:
                ->rawParams( (integer) $out->getRevisionId() )
which results in displaying "Revision 0" on a new schema page.
Comment 1 Ori Livneh 2013-01-09 08:32:51 UTC
Thanks for the report! Change 42920 in Gerrit.
Comment 2 Andre Klapper 2014-02-26 12:55:25 UTC
[moving from MediaWiki extensions to Analytics product - see bug 61946]

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


Navigation
Links