Flow's Parsoid usage broken in test beta labs
Closed, ResolvedPublic

Description

Found in http://test.wikimedia.beta.wmflabs.org/w/index.php?title=Talk:ET20&action=history

  1. After LQT Conversion, the History page has the following entires:
  1. Click on 'undo' for 'Flow talk page manager edited the description' :
Error

An error has occurred while processing HTML/wikitext conversion.

Return to Main Page.

[f95b3154] /w/index.php?title=Talk:ET51&action=undo-edit-header&header_startId=so6m8umpffi1babv&header_endId=so6maugcundqbr48 Flow\Exception\WikitextException from line 142 of /srv/mediawiki/php-master/extensions/Flow/includes/Parsoid/Utils.php: Conversion from 'html' to 'wikitext' was requested, but core's Parser only supports 'wikitext' to 'html' conversion

Backtrace:

#0 /srv/mediawiki/php-master/extensions/Flow/includes/Parsoid/Utils.php(41): Flow\Parsoid\Utils::parser(string, string, string, Title)
#1 /srv/mediawiki/php-master/extensions/Flow/includes/Model/AbstractRevision.php(386): Flow\Parsoid\Utils::convert(string, string, string, Title)
#2 /srv/mediawiki/php-master/extensions/Flow/includes/Formatter/RevisionUndoViewFormatter.php(30): Flow\Model\AbstractRevision->getContent(string)
#3 /srv/mediawiki/php-master/extensions/Flow/includes/Block/Header.php(334): Flow\Formatter\RevisionUndoViewFormatter->formatApi(Flow\Formatter\FormatterRow, Flow\Formatter\FormatterRow, Flow\Formatter\FormatterRow, Flow\View)
#4 /srv/mediawiki/php-master/extensions/Flow/includes/Block/Header.php(206): Flow\Block\HeaderBlock->renderUndoApi(array)
#5 /srv/mediawiki/php-master/extensions/Flow/includes/View.php(177): Flow\Block\HeaderBlock->renderApi(array)
#6 /srv/mediawiki/php-master/extensions/Flow/includes/View.php(69): Flow\View->buildApiResponse(Flow\WorkflowLoader, array, string, array)
#7 /srv/mediawiki/php-master/extensions/Flow/includes/Actions/Action.php(100): Flow\View->show(Flow\WorkflowLoader, string)
#8 /srv/mediawiki/php-master/extensions/Flow/includes/Actions/Action.php(46): Flow\Actions\FlowAction->showForAction(string)
#9 /srv/mediawiki/php-master/includes/MediaWiki.php(458): Flow\Actions\FlowAction->show()
#10 /srv/mediawiki/php-master/includes/MediaWiki.php(255): MediaWiki->performAction(Article, Title)
#11 /srv/mediawiki/php-master/includes/MediaWiki.php(682): MediaWiki->performRequest()
#12 /srv/mediawiki/php-master/includes/MediaWiki.php(476): MediaWiki->main()
#13 /srv/mediawiki/php-master/index.php(41): MediaWiki->run()
#14 /srv/mediawiki/w/index.php(3): include(string)
#15 {main}
Etonkovidova updated the task description. (Show Details)
Etonkovidova raised the priority of this task from to Needs Triage.
Etonkovidova added a subscriber: Etonkovidova.
Restricted Application added a subscriber: Aklapper. · View Herald TranscriptSep 2 2015, 9:04 PM
Catrope renamed this task from History: 'Undo' for 'Flow talk page manager edited the description' produces Error page to Parsoid broken in beta labs.Sep 2 2015, 11:40 PM
Catrope triaged this task as Unbreak Now! priority.
Catrope claimed this task.
Catrope set Security to None.
Catrope renamed this task from Parsoid broken in beta labs to Flow's Parsoid usage broken in beta labs.

This is probably because beta labs's Parsoid config hasn't been updated for the v3 changes.

Change 235785 had a related patch set uploaded (by Catrope):
Correct URL to beta testwiki

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

Catrope renamed this task from Flow's Parsoid usage broken in beta labs to Flow's Parsoid usage broken in test beta labs.Sep 3 2015, 6:23 PM
Catrope removed a project: Patch-For-Review.
Catrope removed a subscriber: gerritbot.

Turns out this was only broken on the test wiki in beta, not in English beta. I've submitted a patch that I think might fix this.

Mattflaschen-WMF lowered the priority of this task from Unbreak Now! to High.Sep 3 2015, 10:05 PM
Mattflaschen-WMF added a subscriber: Mattflaschen-WMF.

Change 235785 merged by jenkins-bot:
Correct URL to beta testwiki

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

Try to create a new topic:
3afe20d7] Exception Caught: Conversion from 'html' to 'wikitext' was requested, but core's Parser only supports 'wikitext' to 'html' conversion

Cannot post a reply on testwiki:
Unable to parse content due to a Parsoid failure.

and

[f625d2ab] Exception Caught: Conversion from 'html' to 'wikitext' was requested, but core's Parser only supports 'wikitext' to 'html' conversion

and

POST http://test.wikimedia.beta.wmflabs.org/w/api.php 500 (Internal Server Error)send @ load.php?
debug=false&lang=en&modules=jquery%2Cmediawiki&only=scripts&skin=vector&version=PUr9dIEB:140jQuery.extend.ajax @ load.php?
debug=false&lang=en&modules=jquery%2Cmediawiki&only=scripts&skin=vector&version=PUr9dIEB:134mw.
Api.ajax @ VM39:26mw.Api.post @ VM39:25mw.flow.ui.EditorSwitcherWidget.convertContent @ load.php?
debug=false&lang=en&modules=ext.echo.nojs%2Cui|ext.flow%2Cpopups|ext.flow.templating%2Cui|
…:214mw.flow.ui.EditorSwitcherWidget.switchEditor @ load.php?
debug=false&lang=en&modules=ext.echo.nojs%2Cui|ext.flow%2Cpopups|ext.flow.templating%2Cui|
…:213mw.flow.ui.EditorSwitcherWidget.onEditorSwitch @ load.php?
debug=false&lang=en&modules=ext.echo.nojs%2Cui|ext.flow%2Cpopups|ext.flow.templating%2Cui|…:216
..........

@Catrope did you find out about restarting it?

In T111249#1626624, @Mattflaschen wrote:

@Catrope did you find out about restarting it?

Subbu said it was restarted (as part of a regularly scheduled deployment) the other day, and AFAIK the issue persists.

Catrope removed Catrope as the assignee of this task.Sep 10 2015, 5:46 PM
Catrope added a subscriber: Catrope.

The following works just fine

ssastry@deployment-parsoid05:/srv/deployment/parsoid/deploy/src/tests$ curl http://localhost:8000/testwiki/Main_Page?oldid=2196
<!DOCTYPE html>
<html prefix="dc: http://purl.org/dc/terms/ mw: http://mediawiki.org/rdf/" about="http://test.wikimedia.beta.wmflabs.org/wiki/Special:Redirect/revision/2196"><head prefix="mwr: http://test.wikimedia.beta.wmflabs.org/wiki/Special:Redirect/"><meta property="mw:articleNamespace" content="0"/><link rel="dc:replaces" resource="mwr:revision/1803"/><meta property="dc:modified" content="2015-08-12T12:56:31.000Z"/><meta about="mwr:user/336" property="dc:title" content="Luke081515"/><link rel="dc:contributor" resource="mwr:user/336"/><meta property="mw:revisionSHA1" content="182eb03b1845e8475947b769535096c467cfc181"/><meta property="dc:description" content='Reset stable version settings for "Main Page"'/><meta property="mw:parsoidVersion" content="0"/><link rel="dc:isVersionOf" href="http://test.wikimedia.beta.wmflabs.org/wiki/Main_Page"/><title>Main_Page</title><base href="http://test.wikimedia.beta.wmflabs.org/wiki/"/><link rel="stylesheet" href="//test.wikimedia.beta.wmflabs.org/w/load.php?modules=mediawiki.legacy.commonPrint,shared|mediawiki.skinning.elements|mediawiki.skinning.content|mediawiki.skinning.interface|skins.vector.styles|site|mediawiki.skinning.content.parsoid|ext.cite.style&amp;only=styles&amp;skin=vector"/></head><body data-parsoid='{"dsr":[0,48,0,0]}' lang="en" class="mw-content-ltr sitedir-ltr ltr mw-body mw-body-content mediawiki" dir="ltr"><p data-parsoid='{"dsr":[0,26,0,0]}'>This is the Main Page.
...</p>

<p data-parsoid='{"dsr":[28,48,0,0]}'><span class="mw-default-size" typeof="mw:Image" data-parsoid='{"optList":[],"dsr":[28,48,null,null]}'><a href="./File:Example.png" data-parsoid='{"a":{"href":"./File:Example.png"},"sa":{}}'><img resource="./File:Example.png" src="//upload.wikimedia.org/wikipedia/commons/7/70/Example.png" data-file-width="172" data-file-height="178" data-file-type="bitmap" height="178" width="172" data-parsoid='{"a":{"resource":"./File:Example.png","height":"178","width":"172"},"sa":{"resource":"File:Example.png"}}'/></a></span></p></body></html>

and also this

ssastry@deployment-parsoid05:/srv/deployment/parsoid/deploy/src/tests$ nodejs parse --page 'Main Page' --prefix testwiki --config ../../conf/wmf/betalabs.localsettings.js < /dev/null
<!DOCTYPE html>
<html prefix="dc: http://purl.org/dc/terms/ mw: http://mediawiki.org/rdf/"><head prefix="mwr: http://test.wikimedia.beta.wmflabs.org/wiki/Special:Redirect/"><meta property="mw:articleNamespace" content="0"/><meta property="mw:parsoidVersion" content="0"/><link rel="dc:isVersionOf" href="http://test.wikimedia.beta.wmflabs.org/wiki/Main%20Page"/><title></title><base href="http://test.wikimedia.beta.wmflabs.org/wiki/"/><link rel="stylesheet" href="//test.wikimedia.beta.wmflabs.org/w/load.php?modules=mediawiki.legacy.commonPrint,shared|mediawiki.skinning.elements|mediawiki.skinning.content|mediawiki.skinning.interface|skins.vector.styles|site|mediawiki.skinning.content.parsoid|ext.cite.style&amp;only=styles&amp;skin=vector"/></head><body data-parsoid='{"dsr":[0,48,0,0]}' lang="en" class="mw-content-ltr sitedir-ltr ltr mw-body mw-body-content mediawiki" dir="ltr"><p data-parsoid='{"dsr":[0,26,0,0]}'>This is the Main Page.
...</p>

<p data-parsoid='{"dsr":[28,48,0,0]}'><span class="mw-default-size" typeof="mw:Image" data-parsoid='{"optList":[],"dsr":[28,48,null,null]}'><a href="./File:Example.png" data-parsoid='{"a":{"href":"./File:Example.png"},"sa":{}}'><img resource="./File:Example.png" src="//upload.wikimedia.org/wikipedia/commons/7/70/Example.png" data-file-width="172" data-file-height="178" data-file-type="bitmap" height="178" width="172" data-parsoid='{"a":{"resource":"./File:Example.png","height":"178","width":"172"},"sa":{"resource":"File:Example.png"}}'/></a></span></p></body></html>

@mobrovac Is RESTBase configured for testwiki on beta labs?

@mobrovac Is RESTBase configured for testwiki on beta labs?

Yup, it is, otherwise a 404 would be given.

@mattflaschen I created a new topic and 3 replies right now .. http://test.wikimedia.beta.wmflabs.org/wiki/Topic:Spwqw5xg6e4lltso ... so, what still needs fixing?

Thanks. I tested a similar scenario to the one in the initial report, and it seems fixed now.

Checked on http://test.wikimedia.beta.wmflabs.org/ (including the initial issue with Undo for Flow talk page manager (Talk | contribs) edited the description)

GWicke moved this task from Backlog to In progress on the RESTBase board.Oct 3 2015, 1:39 AM
GWicke moved this task from In progress to Done on the RESTBase board.
Catrope closed this task as Resolved.Oct 9 2015, 7:39 PM
Catrope claimed this task.