Page MenuHomePhabricator

Article title starting with slash ("/")triggers: TypeError: Cannot read property 'ns' of undefined
Closed, ResolvedPublic

Description

For example:
http://parsoid.wmflabs.org/zh//dev/null gives an error:

TypeError: Cannot read property 'ns' of undefined at
Function.Title.fromPrefixedText
(/data/project/parsoid/js/lib/mediawiki.Title.js:59:40) at
MWParserEnvironment.reset
(/data/project/parsoid/js/lib/mediawiki.parser.environment.js:216:20) at
Function.MWParserEnvironment.getParserEnv
(/data/project/parsoid/js/lib/mediawiki.parser.environment.js:280:7) at
parserEnvMw (/data/project/parsoid/js/api/ParserService.js:432:22) at
callbacks
(/data/project/parsoid/js/node_modules/express/lib/router/index.js:164:37)
at interParams (/data/project/parsoid/js/api/ParserService.js:428:2) at
callbacks
(/data/project/parsoid/js/node_modules/express/lib/router/index.js:164:37)
at param
(/data/project/parsoid/js/node_modules/express/lib/router/index.js:138:11)
at pass
(/data/project/parsoid/js/node_modules/express/lib/router/index.js:145:5) at
Router._dispatch
(/data/project/parsoid/js/node_modules/express/lib/router/index.js:173:5)

This seems to impact all wikis.


Version: unspecified
Severity: normal

Details

Reference
bz56691

Event Timeline

bzimport raised the priority of this task from to Needs Triage.Nov 22 2014, 2:13 AM
bzimport added a project: Parsoid.
bzimport set Reference to bz56691.
  • Bug 57086 has been marked as a duplicate of this bug. ***

From bug 57086:#c0:


http://localhost:8000/enwiki//dev/null

The crash here seems to be because env.reset( pageName ) is trying to use the

page namespace before env.setPageSrcInfo( src ) sets the meta data.

Change 98718 had a related patch set uploaded by GWicke:
Bug 56691: Handle page names starting with a slash

https://gerrit.wikimedia.org/r/98718

Change 98718 merged by jenkins-bot:
Bug 56691: Handle page names starting with a slash

https://gerrit.wikimedia.org/r/98718

Scheduled for deployment tomorrow.

Change 101321 had a related patch set uploaded by GWicke:
Bug 56691: Handle page names starting with a slash

https://gerrit.wikimedia.org/r/101321

Change 101321 merged by GWicke:
Bug 56691: Handle page names starting with a slash

https://gerrit.wikimedia.org/r/101321