Page MenuHomePhabricator

[Regression pre-wmf.6] Cannot create a new page on Beta cluster shows error "Error contacting the Parsoid/RESTBase server (HTTP 500)"
Closed, ResolvedPublic

Description

Trying to create a new page on Beta cluster shows the following error:
Error contacting the Parsoid/RESTBase server (HTTP 500)

Screenshot:

Parsoid/PHP Stack trace:

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

Backtrace:

#0 /srv/deployment/parsoid/deploy-cache/revs/f5160186ee49584b66945f7691044edfdac8d9e8/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/f5160186ee49584b66945f7691044edfdac8d9e8/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/f5160186ee49584b66945f7691044edfdac8d9e8/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}

Details

Related Gerrit Patches:
mediawiki/services/parsoid : masterAdd handling for new / missing pages in html2wt direction
mediawiki/services/parsoid : masterPHP: Don't assume the revision content exists

Event Timeline

Restricted Application added a subscriber: Aklapper. · View Herald TranscriptNov 12 2019, 10:21 PM

There is something strange going on. The stack trace is identical to T237666: Parsoid/PHP fails for transforms for new pages with slashes in the title:

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

Backtrace:

#0 /srv/deployment/parsoid/deploy-cache/revs/f5160186ee49584b66945f7691044edfdac8d9e8/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/f5160186ee49584b66945f7691044edfdac8d9e8/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/f5160186ee49584b66945f7691044edfdac8d9e8/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}

However, this is weird because when I was doing tests for the other ticket, creating new pages without slashes was fine and not it's not. Perhaps it's a misconfiguration issue on beta only?

Change 550667 had a related patch set uploaded (by Mobrovac; owner: Mobrovac):
[mediawiki/services/parsoid@master] PHP: Don't assume the revision content exists

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

mobrovac claimed this task.EditedNov 13 2019, 12:17 PM

The above patch fixes the issue. I have applied it in beta and tested it, and it works as advertised - now pages can be created using VE (including those with slashes in their titles).

ssastry reassigned this task from mobrovac to Arlolra.Nov 13 2019, 9:10 PM
ssastry triaged this task as High priority.
Arlolra removed Arlolra as the assignee of this task.Nov 13 2019, 9:27 PM
ssastry claimed this task.Nov 13 2019, 11:25 PM

Change 550863 had a related patch set uploaded (by Subramanya Sastry; owner: Subramanya Sastry):
[mediawiki/services/parsoid@master] Add handling for new / missing pages in html2wt direction

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

Change 550667 abandoned by Subramanya Sastry:
PHP: Don't assume the revision content exists

Reason:
In favour of https://gerrit.wikimedia.org/r/550863

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

Change 550863 merged by jenkins-bot:
[mediawiki/services/parsoid@master] Add handling for new / missing pages in html2wt direction

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

ssastry closed this task as Resolved.Nov 14 2019, 9:08 PM

This fix is now on beta and I verified it works by creating https://en.wikipedia.beta.wmflabs.org/wiki/T238161_test

Restricted Application added a project: User-Ryasmeen. · View Herald TranscriptNov 14 2019, 9:08 PM