Page MenuHomePhabricator

Parsoid/PHP fails for transforms for new pages with slashes in the title
Closed, DuplicatePublic

Description

First spotted in T229074#5642948. When creating new pages with titles containing slashes, Parsoid/PHP returns a 500 with the following stack trace:

Error from line 32 of /srv/deployment/parsoid/deploy-cache/revs/7e86f835f6ae15749b3665620891f5ec8d03311f/src/src/Wt2Html/PageConfigFrame.php: Call to a member function getContent() on null

Backtrace:

#0 /srv/deployment/parsoid/deploy-cache/revs/7e86f835f6ae15749b3665620891f5ec8d03311f/src/src/Config/Env.php(255): Parsoid\Wt2Html\PageConfigFrame->__construct(Parsoid\Config\Env, MWParsoid\Config\PageConfig, MWParsoid\Config\SiteConfig)
#1 /srv/deployment/parsoid/deploy-cache/revs/7e86f835f6ae15749b3665620891f5ec8d03311f/src/extension/src/Rest/Handler/ParsoidHandler.php(338): Parsoid\Config\Env->__construct(MWParsoid\Config\SiteConfig, MWParsoid\Config\PageConfig, MWParsoid\Config\DataAccess, array)
#2 /srv/deployment/parsoid/deploy-cache/revs/7e86f835f6ae15749b3665620891f5ec8d03311f/src/extension/src/Rest/Handler/TransformHandler.php(85): MWParsoid\Rest\Handler\ParsoidHandler->createEnv(string, integer, NULL)
#3 /srv/mediawiki/php-master/includes/Rest/Router.php(315): MWParsoid\Rest\Handler\TransformHandler->execute()
#4 /srv/mediawiki/php-master/includes/Rest/Router.php(285): MediaWiki\Rest\Router->executeHandler(MWParsoid\Rest\Handler\TransformHandler)
#5 /srv/mediawiki/php-master/includes/Rest/EntryPoint.php(116): MediaWiki\Rest\Router->execute(MediaWiki\Rest\RequestFromGlobals)
#6 /srv/mediawiki/php-master/includes/Rest/EntryPoint.php(83): MediaWiki\Rest\EntryPoint->execute()
#7 /srv/mediawiki/php-master/rest.php(31): MediaWiki\Rest\EntryPoint::main()
#8 /srv/mediawiki/w/rest.php(3): require(string)
#9 {main}

This happened for the end point /w/rest.php/en.wikipedia.beta.wmflabs.org/v3/transform/html/to/wikitext/User%3AMobrovac-WMF%2Fsandbox (User:Mobrovac-WMF/sandbox doesn't exist).

Everything is fine when editing existing pages with slashes (try VE-editing User:Mobrovac-WMF/proba on the same site, which does exist) or creating new pages without slashes in the title.