Page MenuHomePhabricator

An error has occurred while processing HTML/wikitext conversion - Fatal exception of type "Flow\Exception\WikitextException"
Closed, DuplicatePublic

Description

The prev link (i.e. here) for the last entry at https://zh.wikipedia.org/w/index.php?title=User_talk:Gakmo&action=history displays only an error message.

Error

An error has occurred while processing HTML/wikitext conversion.

Return to Wikipedia:首页.
[306620c6] 2015-10-26 22:44:49: Fatal exception of type "Flow\Exception\WikitextException"
2015-10-26 22:44:49 mw1258 zhwiki exception ERROR: [306620c6] /w/index.php?title=User_talk:Gakmo&action=compare-header-revisions&header_newRevision=sr2oxcnfxi5ca9x9   Flow\Exception\WikitextException from line 143 of /srv/mediawiki/php-1.27.0-wmf.3/extensions/Flow/includes/Parsoid/Utils.php: Conversion from 'html' to 'wikitext' was requested, but core's Parser only supports 'wikitext' to 'html' conversion {"exception_id":"306620c6"}

Clicking "Edit description" at https://zh.wikipedia.org/wiki/User_talk:Gakmo
shows this content in the text-area: Due to a technical error, this post could not be retrieved.

(But in read-view it shows this as the content: 既往讨论已于2015-10-19存档在User talk:Gakmo/存档 1。)


Gakmo reported the bug at https://www.mediawiki.org/wiki/Topic:Srahmurfaimvrnnm saying:

I tried to edit description on my talk page (zh:User talk:Gakmo) but encountered error message when I want to edit the wikitext saying Parsoid error. When I want to save, the message below appeared. How can I fix it? Many thanks.

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

Event Timeline

Quiddity raised the priority of this task from to Needs Triage.
Quiddity updated the task description. (Show Details)
Quiddity added a subscriber: Quiddity.
Restricted Application added a subscriber: Aklapper. · View Herald Transcript

Doesn't show up in console.

mattflaschen@terbium:~$ mwscript eval.php --wiki=zhwiki
> echo Flow\Parsoid\Utils::convert( 'html', 'wikitext', "<b>Foo</b>", Title::newMainPage() );
'''Foo'''
> echo Flow\Parsoid\Utils::convert( 'wikitext', 'html', "''Foo''", Title::newMainPage() );
<p id="mwAQ"><i id="mwAg">Foo</i></p>

Our integration of Parsoid/RESTBase refuses to convert the last revision to wikitext. The others are all fine for both HTML and wikitext:

> $pc = Flow\Collection\HeaderCollection::newFromId( Flow\Model\UUID::create( 'sr2mtzp3i2dbn5ks' ) );

> 

> $beforeRevid = Flow\Model\UUID::create( 'sr2oaldo6q9p58ho' );

> 

> $afterRevid = Flow\Model\UUID::create( 'sr2oxcnfxi5ca9x9' );

> 

> $firstRev = $pc->getRevision( $beforeRevid );

> 

> $secondRev = $pc->getRevision( $afterRevid );

> 

> echo $firstRev->getContent( 'html' );
<p about="#mwt1" typeof="mw:Transclusion" id="mwAQ" data-mw='{"parts":[{"template":{"target":{"wt":"从Wiki文本讨论页转换为Flow页面","href":"./Template:从Wiki文本讨论页转换为Flow页面"},"params":{"archive":{"wt":"User talk:Gakmo/存档 1"},"date":{"wt":"2015-10-19"}},"i":0}}]}'>既往讨论已于2015-10-19存档在<span class="flow-link-to-archive"><a rel="mw:WikiLink" href="./User_talk:Gakmo/存档_1" title="User talk:Gakmo/存档 1">User talk:Gakmo/存档 1</a></span>。</p>
> echo $secondRev->getContent( 'html' );
<p about="#mwt1" typeof="mw:Transclusion" id="mwAQ" data-mw='{"parts":[{"template":{"target":{"wt":"从Wiki文本讨论页转换为Flow页面","href":"./Template:从Wiki文本讨论页转换为Flow页面"},"params":{"archive":{"wt":"User talk:Gakmo/存档 1"},"date":{"wt":"2015-10-19"}},"i":0}}]}'>既往讨论已于2015-10-19存档在<span class="flow-link-to-archive"><a rel="mw:WikiLink" href="./User_talk:Gakmo/存档_1" title="User talk:Gakmo/存档 1">User talk:Gakmo/存档 1</a></span>。</p>
<meta typeof="mw:Includes/IncludeOnly" id="mwAg"/><meta typeof="mw:Includes/IncludeOnly/End" id="mwAw"/>
> 

> echo $firstRev->getContent( 'wikitext' );
{{从Wiki文本讨论页转换为Flow页面|archive = User talk:Gakmo/存档 1|date = 2015-10-19}}
> echo $secondRev->getContent( 'wikitext' );
Caught exception Flow\Exception\WikitextException: Conversion from 'html' to 'wikitext' was requested, but core's Parser only supports 'wikitext' to 'html' conversion
#0 /srv/mediawiki/php-1.27.0-wmf.3/extensions/Flow/includes/Parsoid/Utils.php(41): Flow\Parsoid\Utils::parser('html', 'wikitext', '<p about="#mwt1...', Object(Title))
#1 /srv/mediawiki/php-1.27.0-wmf.3/extensions/Flow/includes/Model/AbstractRevision.php(387): Flow\Parsoid\Utils::convert('html', 'wikitext', '<p about="#mwt1...', Object(Title))
#2 /srv/mediawiki/php-1.27.0-wmf.3/maintenance/eval.php(78) : eval()'d code(1): Flow\Model\AbstractRevision->getContent('wikitext')
#3 /srv/mediawiki/php-1.27.0-wmf.3/maintenance/eval.php(78): eval()
#4 /srv/mediawiki/multiversion/MWScript.php(97): require_once('/srv/mediawiki/...')
#5 {main}

The second is fine with direct http://parsoid-lb.eqiad.wikimedia.org/_html/ (unless there's some obscure issue lost in copy/paste translation).

Never mind, I did copy it wrong. I accidentally lost the meta line, which is actually the only change AFAICT.

Mattflaschen-WMF lowered the priority of this task from Unbreak Now! to High.Oct 27 2015, 12:34 AM
Mattflaschen-WMF raised the priority of this task from High to Unbreak Now!.Oct 27 2015, 1:57 AM
Mattflaschen-WMF lowered the priority of this task from Unbreak Now! to High.Nov 4 2015, 8:24 PM

Unassigned this for now since it's blocked externally.