Page MenuHomePhabricator
Paste P955

Parsoid converting post in isolation
ActivePublic

Authored by Mattflaschen-WMF on Jul 14 2015, 3:23 AM.
mattflaschen@terbium:~/LQT_logs_2015-07-09$ mwscript eval.php --wiki=mediawikiwiki
> $parsoidContextTitle = Title::newFromText( 'Topic:Rsmwhyrgc56rq2vb' );
>
> $postTitle = Title::newFromText( "Thread:Extension_talk:Header_Tabs/Header_tabs_don't_show_when_ads_appear_on_webkit_browsers/reply_(3)" );
>
> $postRevision = Revision::newFromTitle( $postTitle );
>
> $content = $postRevision->getText( Revision::RAW );
>
> echo $content;
This is what I got from the inspection element report:
<pre>
Exception thrown by ext.headertabs: Cannot read property 'length' of null load.php?debug=false&lang=en&modules=jquery%2Cmediawiki&only=scripts&skin=monobook&version=20140311…:151
TypeError
message: "Cannot read property 'length' of null"
stack: (...)
get stack: function () { [native code] }
set stack: function () { [native code] }
__proto__: Error
load.php?debug=false&lang=en&modules=jquery%2Cmediawiki&only=scripts&skin=monobook&version=20140311…:151
log
</pre>
>
> echo Flow\Parsoid\Utils::convert( 'wikitext', 'html', $content, $parsoidContextTitle );
<body data-parsoid='{"dsr":[0,528,0,0]}' lang="en" class="mw-content-ltr sitedir-ltr ltr mw-body mw-body-content mediawiki" dir="ltr"><p data-parsoid='{"dsr":[0,54,0,0]}'>This is what I got from the inspection element report:</p>
<pre data-parsoid='{"stx":"html","strippedNL":true,"dsr":[56,528,5,6]}'>Exception thrown by ext.headertabs: Cannot read property 'length' of null load.php?debug=false&amp;lang=en&amp;modules=jquery%2Cmediawiki&amp;only=scripts&amp;skin=monobook&amp;version=20140311…:151
TypeError
message: "Cannot read property 'length' of null"
stack: (...)
get stack: function () { [native code] }
set stack: function () { [native code] }
__proto__: Error
load.php?debug=false&amp;lang=en&amp;modules=jquery%2Cmediawiki&amp;only=scripts&amp;skin=monobook&amp;version=20140311…:151
log
</pre></body>

Event Timeline

Mattflaschen-WMF changed the title of this paste from untitled to Parsoid converting post in isolation.
Mattflaschen-WMF updated the paste's language from autodetect to autodetect.