<?xml version="1.0"?>
<rss xmlns:dc="http://purl.org/dc/elements/1.1/" version="2.0">
  <channel>
    <title>Transition Technology: Ticket #799: MediaWiki Visual Editor broken from Parsoid update</title>
    <link>http://localhost:8080/trac/ticket/799</link>
    <description>&lt;p&gt;
After updating Parasoid on &lt;a class="new ticket" href="http://localhost:8080/trac/ticket/692#comment:102" title="maintenance: Debian Updates (new)"&gt;ticket:692#comment:102&lt;/a&gt; the &lt;a class="wiki" href="http://localhost:8080/trac/wiki/MediaWiki"&gt;MediaWiki&lt;/a&gt; visual editor now generates this error:
&lt;/p&gt;
&lt;blockquote class="citation"&gt;
&lt;p&gt;
Error loading data from server: parsoidserver-http-bad-status: 500. Would you like to retry?
&lt;/p&gt;
&lt;/blockquote&gt;
</description>
    <language>en-us</language>
    <image>
      <title>Transition Technology</title>
      <url>/trac/chrome/site/TransitionNetwork-Logo-Web-Small.jpg</url>
      <link>http://localhost:8080/trac/ticket/799</link>
    </image>
    <generator>Trac 0.12.5</generator>
    <item>
      
        <dc:creator>chris</dc:creator>

      <pubDate>Tue, 21 Oct 2014 10:58:39 GMT</pubDate>
      <title>hours, totalhours changed</title>
      <link>http://localhost:8080/trac/ticket/799#comment:1</link>
      <guid isPermaLink="false">http://localhost:8080/trac/ticket/799#comment:1</guid>
      <description>
          &lt;ul&gt;
            &lt;li&gt;&lt;strong&gt;hours&lt;/strong&gt;
                changed from &lt;em&gt;0.0&lt;/em&gt; to &lt;em&gt;0.5&lt;/em&gt;
            &lt;/li&gt;
            &lt;li&gt;&lt;strong&gt;totalhours&lt;/strong&gt;
                changed from &lt;em&gt;0.0&lt;/em&gt; to &lt;em&gt;0.5&lt;/em&gt;
            &lt;/li&gt;
          &lt;/ul&gt;
        &lt;p&gt;
There is this bug regarding the error message:
&lt;/p&gt;
&lt;ul&gt;&lt;li&gt;&lt;a class="ext-link" href="https://bugzilla.wikimedia.org/show_bug.cgi?id=63149"&gt;&lt;span class="icon"&gt;​&lt;/span&gt;https://bugzilla.wikimedia.org/show_bug.cgi?id=63149&lt;/a&gt;
&lt;/li&gt;&lt;/ul&gt;&lt;p&gt;
And lots of other people issues like this:
&lt;/p&gt;
&lt;ul&gt;&lt;li&gt;&lt;a class="ext-link" href="https://www.mediawiki.org/wiki/Thread:Extension_talk:VisualEditor/parsoidserver-http-bad-status:_500"&gt;&lt;span class="icon"&gt;​&lt;/span&gt;https://www.mediawiki.org/wiki/Thread:Extension_talk:VisualEditor/parsoidserver-http-bad-status:_500&lt;/a&gt;
&lt;/li&gt;&lt;/ul&gt;&lt;p&gt;
In the &lt;tt&gt;/var/log/parsoid/parsoid.log&lt;/tt&gt; we have lots of errors like this:
&lt;/p&gt;
&lt;pre class="wiki"&gt;[info][localhost/Sandbox?oldid=933] started parsing
[fatal/request][localhost/Sandbox?oldid=933] undefined is not a function
TypeError: undefined is not a function
    at TreeBuilder.resetState (/usr/lib/parsoid/src/lib/mediawiki.HTML5TreeBuilder.node.js:61:17)
    at new TreeBuilder (/usr/lib/parsoid/src/lib/mediawiki.HTML5TreeBuilder.node.js:28:7)
    at ParserPipelineFactory.makePipeline (/usr/lib/parsoid/src/lib/mediawiki.parser.js:231:17)
    at ParserPipelineFactory.makePipeline (/usr/lib/parsoid/src/lib/mediawiki.parser.js:227:17)
    at ParserPipelineFactory.getPipeline (/usr/lib/parsoid/src/lib/mediawiki.parser.js:363:15)
    at ParserPipelineFactory.parse (/usr/lib/parsoid/src/lib/mediawiki.parser.js:311:20)
    at /usr/lib/parsoid/node_modules/prfun/lib/index.js:436:24
    at new Promise (/usr/lib/parsoid/src/node_modules/es6-shim/es6-shim.js:1228:11)
    at /usr/lib/parsoid/node_modules/prfun/lib/index.js:419:14
    at /usr/lib/parsoid/src/api/routes.js:152:62
&lt;/pre&gt;&lt;p&gt;
However creating a new page worked fine:
&lt;/p&gt;
&lt;ul&gt;&lt;li&gt;&lt;a class="ext-link" href="https://wiki.transitionnetwork.org/Sandbox2"&gt;&lt;span class="icon"&gt;​&lt;/span&gt;https://wiki.transitionnetwork.org/Sandbox2&lt;/a&gt;
&lt;/li&gt;&lt;/ul&gt;&lt;p&gt;
But when trying to edit it:
&lt;/p&gt;
&lt;blockquote class="citation"&gt;
&lt;p&gt;
Error loading data from server: parsoidserver-http-bad-status: 500. Would you like to retry?
&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;
And this in &lt;tt&gt;/var/log/parsoid/parsoid.log&lt;/tt&gt;:
&lt;/p&gt;
&lt;pre class="wiki"&gt;[info][localhost/Sandbox2?oldid=946] started parsing
[fatal/request][localhost/Sandbox2?oldid=946] undefined is not a function
TypeError: undefined is not a function
    at TreeBuilder.resetState (/usr/lib/parsoid/src/lib/mediawiki.HTML5TreeBuilder.node.js:61:17)
    at new TreeBuilder (/usr/lib/parsoid/src/lib/mediawiki.HTML5TreeBuilder.node.js:28:7)
    at ParserPipelineFactory.makePipeline (/usr/lib/parsoid/src/lib/mediawiki.parser.js:231:17)
    at ParserPipelineFactory.makePipeline (/usr/lib/parsoid/src/lib/mediawiki.parser.js:227:17)
    at ParserPipelineFactory.getPipeline (/usr/lib/parsoid/src/lib/mediawiki.parser.js:363:15)
    at ParserPipelineFactory.parse (/usr/lib/parsoid/src/lib/mediawiki.parser.js:311:20)
    at /usr/lib/parsoid/node_modules/prfun/lib/index.js:436:24
    at new Promise (/usr/lib/parsoid/src/node_modules/es6-shim/es6-shim.js:1228:11)
    at /usr/lib/parsoid/node_modules/prfun/lib/index.js:419:14
    at /usr/lib/parsoid/src/api/routes.js:152:62
&lt;/pre&gt;&lt;p&gt;
In &lt;a class="ext-link" href="irc://irc.freenode.org/#mediawiki-pars"&gt;&lt;span class="icon"&gt;​&lt;/span&gt;irc://irc.freenode.org/#mediawiki-pars&lt;/a&gt; restarting Parsoid was suggested, this is something I had already tried:
&lt;/p&gt;
&lt;pre class="wiki"&gt;/etc/init.d/parsoid stop
/etc/init.d/parsoid start
Started Parsoid server on port 8142
&lt;/pre&gt;
      </description>
      <category>Ticket</category>
    </item><item>
      
        <dc:creator>chris</dc:creator>

      <pubDate>Tue, 21 Oct 2014 11:17:12 GMT</pubDate>
      <title></title>
      <link>http://localhost:8080/trac/ticket/799#comment:2</link>
      <guid isPermaLink="false">http://localhost:8080/trac/ticket/799#comment:2</guid>
      <description>
        &lt;p&gt;
I think I'll raise this on the Mediawiki bugzilla, this is the version that is installed:
&lt;/p&gt;
&lt;pre class="wiki"&gt;dpkg -l parsoid
Desired=Unknown/Install/Remove/Purge/Hold
| Status=Not/Inst/Conf-files/Unpacked/halF-conf/Half-inst/trig-aWait/Trig-pend
|/ Err?=(none)/Reinst-required (Status,Err: uppercase=bad)
||/ Name                 Version         Architecture    Description
+++-====================-===============-===============-==============================================
ii  parsoid              0.1.15          amd64           Web service converting HTML+RDFa to MediaWiki
&lt;/pre&gt;
      </description>
      <category>Ticket</category>
    </item><item>
      
        <dc:creator>chris</dc:creator>

      <pubDate>Tue, 21 Oct 2014 11:28:55 GMT</pubDate>
      <title>hours, totalhours changed</title>
      <link>http://localhost:8080/trac/ticket/799#comment:3</link>
      <guid isPermaLink="false">http://localhost:8080/trac/ticket/799#comment:3</guid>
      <description>
          &lt;ul&gt;
            &lt;li&gt;&lt;strong&gt;hours&lt;/strong&gt;
                changed from &lt;em&gt;0.0&lt;/em&gt; to &lt;em&gt;0.11&lt;/em&gt;
            &lt;/li&gt;
            &lt;li&gt;&lt;strong&gt;totalhours&lt;/strong&gt;
                changed from &lt;em&gt;0.5&lt;/em&gt; to &lt;em&gt;0.61&lt;/em&gt;
            &lt;/li&gt;
          &lt;/ul&gt;
        &lt;p&gt;
In &lt;tt&gt;/web/wiki.transitionnetwork.org/www/LocalSettings.php&lt;/tt&gt; there are these settings:
&lt;/p&gt;
&lt;pre class="wiki"&gt;$wgDefaultUserOptions['visualeditor-enable'] = 1;
$wgVisualEditorParsoidURL = 'http://localhost:8142';
require_once("$IP/extensions/VisualEditor/VisualEditor.php");
require_once("$IP/extensions/Parsoid/Parsoid.php");
&lt;/pre&gt;&lt;p&gt;
This is the version of nodejs:
&lt;/p&gt;
&lt;pre class="wiki"&gt;dpkg -l nodejs
Desired=Unknown/Install/Remove/Purge/Hold
| Status=Not/Inst/Conf-files/Unpacked/halF-conf/Half-inst/trig-aWait/Trig-pend
|/ Err?=(none)/Reinst-required (Status,Err: uppercase=bad)
||/ Name                 Version         Architecture    Description
+++-====================-===============-===============-==============================================
ii  nodejs               0.10.29~dfsg-1~ amd64           evented I/O for V8 javascript
&lt;/pre&gt;&lt;p&gt;
The bug can also be triggered like this:
&lt;/p&gt;
&lt;pre class="wiki"&gt;lynx http://localhost:8142/localhost/Main_Page
[fatal/request][localhost/Main_Page?oldid=811] undefined is not a function
TypeError: undefined is not a function
    at TreeBuilder.resetState (/usr/lib/parsoid/src/lib/mediawiki.HTML5TreeBuilder.node.js:61:17)
    at new TreeBuilder (/usr/lib/parsoid/src/lib/mediawiki.HTML5TreeBuilder.node.js:28:7)
    at ParserPipelineFactory.makePipeline (/usr/lib/parsoid/src/lib/mediawiki.parser.js:231:17)
    at ParserPipelineFactory.makePipeline (/usr/lib/parsoid/src/lib/mediawiki.parser.js:227:17)
    at ParserPipelineFactory.getPipeline (/usr/lib/parsoid/src/lib/mediawiki.parser.js:363:15)
    at ParserPipelineFactory.parse (/usr/lib/parsoid/src/lib/mediawiki.parser.js:311:20)
    at /usr/lib/parsoid/node_modules/prfun/lib/index.js:436:24
    at new Promise (/usr/lib/parsoid/src/node_modules/es6-shim/es6-shim.js:1228:11)
    at /usr/lib/parsoid/node_modules/prfun/lib/index.js:419:14
    at /usr/lib/parsoid/src/api/routes.js:152:62
&lt;/pre&gt;&lt;p&gt;
The above URL is a 302:
&lt;/p&gt;
&lt;pre class="wiki"&gt;lynx -head -dump http://localhost:8142/localhost/Main_Page
HTTP/1.1 302 Moved Temporarily
X-Powered-By: Express
Vary: Accept-Encoding
Access-Control-Allow-Origin: *
Cache-Control: private,no-cache,s-maxage=0
Location: /localhost/Main_Page?oldid=811
Date: Tue, 21 Oct 2014 11:27:03 GMT
Connection: close
&lt;/pre&gt;&lt;p&gt;
And the URL redirected to is a 500 error:
&lt;/p&gt;
&lt;pre class="wiki"&gt;lynx -head -dump http://localhost:8142/localhost/Main_Page?oldid=811
HTTP/1.1 500 Internal Server Error
X-Powered-By: Express
Vary: Accept-Encoding
Access-Control-Allow-Origin: *
Cache-Control: s-maxage=2592000
content-revision-id: 811
Content-Type: text/plain; charset=UTF-8
Content-Length: 936
Date: Tue, 21 Oct 2014 11:27:57 GMT
Connection: close
&lt;/pre&gt;
      </description>
      <category>Ticket</category>
    </item><item>
      
        <dc:creator>chris</dc:creator>

      <pubDate>Tue, 21 Oct 2014 12:48:59 GMT</pubDate>
      <title>hours, totalhours changed</title>
      <link>http://localhost:8080/trac/ticket/799#comment:4</link>
      <guid isPermaLink="false">http://localhost:8080/trac/ticket/799#comment:4</guid>
      <description>
          &lt;ul&gt;
            &lt;li&gt;&lt;strong&gt;hours&lt;/strong&gt;
                changed from &lt;em&gt;0.0&lt;/em&gt; to &lt;em&gt;0.5&lt;/em&gt;
            &lt;/li&gt;
            &lt;li&gt;&lt;strong&gt;totalhours&lt;/strong&gt;
                changed from &lt;em&gt;0.61&lt;/em&gt; to &lt;em&gt;1.11&lt;/em&gt;
            &lt;/li&gt;
          &lt;/ul&gt;
        &lt;p&gt;
This is the content of &lt;tt&gt;/etc/apt/sources.list.d/parsoid.list&lt;/tt&gt;:
&lt;/p&gt;
&lt;pre class="wiki"&gt;deb [arch=amd64] http://parsoid.wmflabs.org:8080/deb wmf-production main
&lt;/pre&gt;&lt;p&gt;
Check which versions we have cached and then install the old version:
&lt;/p&gt;
&lt;pre class="wiki"&gt;ls /var/cache/apt/archives/ | grep parsoid
parsoid_0.1.12_amd64.deb
parsoid_0.1.15_amd64.deb
apt-get install parsoid=0.1.12
&lt;/pre&gt;&lt;p&gt;
Now editing works OK again.
&lt;/p&gt;
&lt;p&gt;
I have opened a ticket about this issue on Bugzilla, &lt;a class="ext-link" href="https://bugzilla.wikimedia.org/show_bug.cgi?id=72304"&gt;&lt;span class="icon"&gt;​&lt;/span&gt;https://bugzilla.wikimedia.org/show_bug.cgi?id=72304&lt;/a&gt; following discussions on &lt;a class="ext-link" href="irc://irc.freenode.net/#mediawiki-pars"&gt;&lt;span class="icon"&gt;​&lt;/span&gt;irc://irc.freenode.net/#mediawiki-pars&lt;/a&gt;
&lt;/p&gt;
&lt;p&gt;
I have also disabled the repo for parsoid to prevent Munin sending alerts every 5 mins regarding new version of parsoid being available, via &lt;tt&gt;/etc/apt/sources.list.d/parsoid.list&lt;/tt&gt;:
&lt;/p&gt;
&lt;pre class="wiki"&gt;#deb [arch=amd64] http://parsoid.wmflabs.org:8080/deb wmf-production main
&lt;/pre&gt;
      </description>
      <category>Ticket</category>
    </item><item>
      
        <dc:creator>chris</dc:creator>

      <pubDate>Fri, 31 Oct 2014 18:29:52 GMT</pubDate>
      <title></title>
      <link>http://localhost:8080/trac/ticket/799#comment:5</link>
      <guid isPermaLink="false">http://localhost:8080/trac/ticket/799#comment:5</guid>
      <description>
        &lt;p&gt;
I have just checked if there is a new version of parsoid available, there isn't, for future reference this is how I checked:
&lt;/p&gt;
&lt;pre class="wiki"&gt;apt-get -V -s upgrade
  Reading package lists... Done
  Building dependency tree
  Reading state information... Done
  The following packages will be upgraded:
     parsoid (0.1.12 =&amp;gt; 0.1.15)
  1 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
  Inst parsoid [0.1.12] (0.1.15 . wmf-production:parsoid.wmflabs.org [amd64])
  Conf parsoid (0.1.15 . wmf-production:parsoid.wmflabs.org [amd64])
dpkg -s parsoid | grep Version
  Version: 0.1.12
&lt;/pre&gt;&lt;p&gt;
See also:
&lt;/p&gt;
&lt;ul&gt;&lt;li&gt;&lt;a class="ext-link" href="https://unix.stackexchange.com/questions/6284/check-package-version-using-apt-get-aptitude"&gt;&lt;span class="icon"&gt;​&lt;/span&gt;https://unix.stackexchange.com/questions/6284/check-package-version-using-apt-get-aptitude&lt;/a&gt;
&lt;/li&gt;&lt;/ul&gt;
      </description>
      <category>Ticket</category>
    </item><item>
      
        <dc:creator>chris</dc:creator>

      <pubDate>Thu, 04 Dec 2014 12:25:10 GMT</pubDate>
      <title>hours, totalhours changed</title>
      <link>http://localhost:8080/trac/ticket/799#comment:6</link>
      <guid isPermaLink="false">http://localhost:8080/trac/ticket/799#comment:6</guid>
      <description>
          &lt;ul&gt;
            &lt;li&gt;&lt;strong&gt;hours&lt;/strong&gt;
                changed from &lt;em&gt;0.0&lt;/em&gt; to &lt;em&gt;0.5&lt;/em&gt;
            &lt;/li&gt;
            &lt;li&gt;&lt;strong&gt;totalhours&lt;/strong&gt;
                changed from &lt;em&gt;1.11&lt;/em&gt; to &lt;em&gt;1.61&lt;/em&gt;
            &lt;/li&gt;
          &lt;/ul&gt;
        &lt;p&gt;
Update on &lt;a class="ext-link" href="https://phabricator.wikimedia.org/T74304#804703"&gt;&lt;span class="icon"&gt;​&lt;/span&gt;the MediaWiki ticket&lt;/a&gt; (now migrated from Bugzilla):
&lt;/p&gt;
&lt;blockquote class="citation"&gt;
&lt;p&gt;
We just released v0.2.0 to both npm and the Debian repository. Could you check if this issue is fixed?
&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;
So, edited &lt;tt&gt;/etc/apt/sources.list.d/parsoid.list&lt;/tt&gt; to remove comment at the start of the line:
&lt;/p&gt;
&lt;pre class="wiki"&gt;deb [arch=amd64] http://parsoid.wmflabs.org:8080/deb wmf-production main
&lt;/pre&gt;&lt;p&gt;
Ran the &lt;a class="wiki" href="http://localhost:8080/trac/wiki/AptitudeUpdateScript"&gt;AptitudeUpdateScript&lt;/a&gt; which upgraded Parsoid, kept the local &lt;tt&gt;/etc/mediawiki/parsoid/settings.js&lt;/tt&gt; file, this was recorded in the &lt;tt&gt;/root/Changelog&lt;/tt&gt;:
&lt;/p&gt;
&lt;pre class="wiki"&gt;2014-12-04      chris
        *       parsoid/wmf-production : updated
&lt;/pre&gt;&lt;p&gt;
Restarted Parsoid:
&lt;/p&gt;
&lt;pre class="wiki"&gt;/etc/init.d/parsoid restart
&lt;/pre&gt;&lt;p&gt;
Tried editing the &lt;a class="ext-link" href="https://wiki.transitionnetwork.org/Sandbox"&gt;&lt;span class="icon"&gt;​&lt;/span&gt;Sandbox&lt;/a&gt;, got this error:
&lt;/p&gt;
&lt;blockquote class="citation"&gt;
&lt;p&gt;
Error loading data from server: parsoidserver-http-bad-status: 500. Would you like to retry?
&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;
So reverting to the old version:
&lt;/p&gt;
&lt;pre class="wiki"&gt;apt-get install parsoid=0.1.12
&lt;/pre&gt;&lt;p&gt;
And posted &lt;a class="ext-link" href="https://phabricator.wikimedia.org/T74304#818645"&gt;&lt;span class="icon"&gt;​&lt;/span&gt;a comment on the new bug tracker&lt;/a&gt;, this comment took a while as getting an account sorted on the new bug tracked wasn't so straightforward...
&lt;/p&gt;
      </description>
      <category>Ticket</category>
    </item><item>
      
        <dc:creator>chris</dc:creator>

      <pubDate>Fri, 05 Dec 2014 01:38:48 GMT</pubDate>
      <title>hours, totalhours changed</title>
      <link>http://localhost:8080/trac/ticket/799#comment:7</link>
      <guid isPermaLink="false">http://localhost:8080/trac/ticket/799#comment:7</guid>
      <description>
          &lt;ul&gt;
            &lt;li&gt;&lt;strong&gt;hours&lt;/strong&gt;
                changed from &lt;em&gt;0.0&lt;/em&gt; to &lt;em&gt;0.25&lt;/em&gt;
            &lt;/li&gt;
            &lt;li&gt;&lt;strong&gt;totalhours&lt;/strong&gt;
                changed from &lt;em&gt;1.61&lt;/em&gt; to &lt;em&gt;1.86&lt;/em&gt;
            &lt;/li&gt;
          &lt;/ul&gt;
        &lt;p&gt;
Comment posted to the bug: &lt;a class="ext-link" href="https://phabricator.wikimedia.org/T74304#820330"&gt;&lt;span class="icon"&gt;​&lt;/span&gt;https://phabricator.wikimedia.org/T74304#820330&lt;/a&gt;
&lt;/p&gt;
      </description>
      <category>Ticket</category>
    </item><item>
      
        <dc:creator>chris</dc:creator>

      <pubDate>Sat, 20 Dec 2014 12:25:49 GMT</pubDate>
      <title>hours, totalhours changed</title>
      <link>http://localhost:8080/trac/ticket/799#comment:8</link>
      <guid isPermaLink="false">http://localhost:8080/trac/ticket/799#comment:8</guid>
      <description>
          &lt;ul&gt;
            &lt;li&gt;&lt;strong&gt;hours&lt;/strong&gt;
                changed from &lt;em&gt;0.0&lt;/em&gt; to &lt;em&gt;0.4&lt;/em&gt;
            &lt;/li&gt;
            &lt;li&gt;&lt;strong&gt;totalhours&lt;/strong&gt;
                changed from &lt;em&gt;1.86&lt;/em&gt; to &lt;em&gt;2.26&lt;/em&gt;
            &lt;/li&gt;
          &lt;/ul&gt;
        &lt;p&gt;
Question &lt;a class="ext-link" href="https://phabricator.wikimedia.org/T74304#820330"&gt;&lt;span class="icon"&gt;​&lt;/span&gt;posted on the bugtracker&lt;/a&gt;:
&lt;/p&gt;
&lt;blockquote class="citation"&gt;
&lt;blockquote&gt;
&lt;p&gt;
Is the error message still the same after a &lt;tt&gt;apt-get remove --purge&lt;/tt&gt; parsoid followed by &lt;tt&gt;apt-get install parsoid&lt;/tt&gt; ?
&lt;/p&gt;
&lt;/blockquote&gt;
&lt;/blockquote&gt;
&lt;p&gt;
So I edited &lt;tt&gt;/etc/apt/sources.list.d/parsoid.list&lt;/tt&gt; and uncommented this line:
&lt;/p&gt;
&lt;pre class="wiki"&gt;deb [arch=amd64] http://parsoid.wmflabs.org:8080/deb wmf-production main
&lt;/pre&gt;&lt;p&gt;
And ran:
&lt;/p&gt;
&lt;pre class="wiki"&gt;aptitude update
&lt;/pre&gt;&lt;p&gt;
Then backing up the Parsoid settings, first identify the files installed in &lt;tt&gt;/etc&lt;/tt&gt;:
&lt;/p&gt;
&lt;pre class="wiki"&gt;dpkg -L parsoid | grep ^/etc
/etc
/etc/mediawiki
/etc/mediawiki/parsoid
/etc/mediawiki/parsoid/settings.js
/etc/default
/etc/default/parsoid
/etc/init.d
/etc/init.d/parsoid
/etc/logrotate.d
/etc/logrotate.d/parsoid
&lt;/pre&gt;&lt;p&gt;
Then copy the config file:
&lt;/p&gt;
&lt;pre class="wiki"&gt;cp /etc/mediawiki/parsoid/settings.js /root/
&lt;/pre&gt;&lt;p&gt;
(with hindsight the same should have been done for &lt;tt&gt;/etc/default/parsoid&lt;/tt&gt;)
&lt;/p&gt;
&lt;p&gt;
Then uninstall, purge and reinstall:
&lt;/p&gt;
&lt;pre class="wiki"&gt;aptitude remove parsoid
aptitude purge parsoid
&lt;/pre&gt;&lt;p&gt;
I checked that the &lt;tt&gt;/etc/mediawiki/parsoid&lt;/tt&gt; directory had been removed, then reinstall:
&lt;/p&gt;
&lt;pre class="wiki"&gt;aptitude update
aptitude install parsoid
&lt;/pre&gt;&lt;p&gt;
Diff the old and new config files:
&lt;/p&gt;
&lt;pre class="wiki"&gt;diff /etc/mediawiki/parsoid/settings.js /root/settings.js | vim -
1d0
&amp;lt; "use strict";
20c19,21
&amp;lt;       parsoidConfig.setInterwiki( 'localhost', 'http://localhost/w/api.php' );
---
&amp;gt;       // chris
&amp;gt;       //parsoidConfig.setInterwiki( 'localhost', 'http://localhost/w/api.php' );
&amp;gt;       parsoidConfig.setInterwiki( 'localhost', 'http://wiki.transitionnetwork.org/api.php' );
27a29
&amp;gt;       //parsoidConfig.debug = true;
35a38
&amp;gt;       // chris
36a40
&amp;gt;       parsoidConfig.allowCORS = 'wiki.transitionnetwork.org';
&lt;/pre&gt;&lt;p&gt;
And change these lines:
&lt;/p&gt;
&lt;pre class="wiki"&gt;        parsoidConfig.setInterwiki( 'localhost', 'http://wiki.transitionnetwork.org/api.php' );
        parsoidConfig.allowCORS = 'wiki.transitionnetwork.org';
&lt;/pre&gt;&lt;p&gt;
Restart the server:
&lt;/p&gt;
&lt;pre class="wiki"&gt;/etc/init.d/parsoid restart
&lt;/pre&gt;&lt;p&gt;
And test editing the wiki, and we have the same error message:
&lt;/p&gt;
&lt;blockquote class="citation"&gt;
&lt;p&gt;
Error loading data from server: parsoidserver-http-bad-status: 500. Would you like to retry?
&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;
So downgrading again:
&lt;/p&gt;
&lt;pre class="wiki"&gt;apt-get install parsoid=0.1.12
&lt;/pre&gt;&lt;p&gt;
And commented the line in &lt;tt&gt;/etc/apt/sources.list.d/parsoid.list&lt;/tt&gt; to prevent upgrades and posted a &lt;a class="ext-link" href="https://phabricator.wikimedia.org/T74304#937749"&gt;&lt;span class="icon"&gt;​&lt;/span&gt;comment to the ticket&lt;/a&gt;.
&lt;/p&gt;
      </description>
      <category>Ticket</category>
    </item><item>
      
        <dc:creator>ed</dc:creator>

      <pubDate>Mon, 05 Jan 2015 14:58:37 GMT</pubDate>
      <title></title>
      <link>http://localhost:8080/trac/ticket/799#comment:9</link>
      <guid isPermaLink="false">http://localhost:8080/trac/ticket/799#comment:9</guid>
      <description>
        &lt;p&gt;
this is going on too long for a wiki that isn't being used - and TN moving to google docs means that it's even less likely to be used - so hold off on any work on this for now and let's discuss when we meet.
&lt;/p&gt;
      </description>
      <category>Ticket</category>
    </item><item>
      
        <dc:creator>chris</dc:creator>

      <pubDate>Thu, 05 Mar 2015 14:49:48 GMT</pubDate>
      <title>cc, status changed</title>
      <link>http://localhost:8080/trac/ticket/799#comment:10</link>
      <guid isPermaLink="false">http://localhost:8080/trac/ticket/799#comment:10</guid>
      <description>
          &lt;ul&gt;
            &lt;li&gt;&lt;strong&gt;cc&lt;/strong&gt;
              &lt;em&gt;ade&lt;/em&gt; added; &lt;em&gt;ed&lt;/em&gt; removed
            &lt;/li&gt;
            &lt;li&gt;&lt;strong&gt;status&lt;/strong&gt;
                changed from &lt;em&gt;new&lt;/em&gt; to &lt;em&gt;accepted&lt;/em&gt;
            &lt;/li&gt;
          &lt;/ul&gt;
        &lt;p&gt;
There is still no answer regarding how to get the latest Parsiod working on Debian Wheezy, hovever I have setup a dedicated Parsiod server on Debian Jessie that we can use, see &lt;a class="ext-link" href="https://docs.webarch.net/wiki/MediaWiki#VisualEditor"&gt;&lt;span class="icon"&gt;​&lt;/span&gt;https://docs.webarch.net/wiki/MediaWiki#VisualEditor&lt;/a&gt; so I suggest:
&lt;/p&gt;
&lt;ul&gt;&lt;li&gt;Setting up &lt;a class="wiki" href="http://localhost:8080/trac/wiki/MediaWiki"&gt;MediaWiki&lt;/a&gt; to use the external Parsoid server at &lt;tt&gt;parsoid.webarch.net&lt;/tt&gt;
&lt;/li&gt;&lt;li&gt;Uninstalling Parsoid from &lt;a class="wiki" href="http://localhost:8080/trac/wiki/PenguinServer"&gt;PenguinServer&lt;/a&gt; (this should free up some RAM)
&lt;/li&gt;&lt;/ul&gt;
      </description>
      <category>Ticket</category>
    </item><item>
      
        <dc:creator>chris</dc:creator>

      <pubDate>Fri, 06 Mar 2015 15:00:49 GMT</pubDate>
      <title>hours, status, totalhours changed; resolution set</title>
      <link>http://localhost:8080/trac/ticket/799#comment:11</link>
      <guid isPermaLink="false">http://localhost:8080/trac/ticket/799#comment:11</guid>
      <description>
          &lt;ul&gt;
            &lt;li&gt;&lt;strong&gt;hours&lt;/strong&gt;
                changed from &lt;em&gt;0.0&lt;/em&gt; to &lt;em&gt;0.4&lt;/em&gt;
            &lt;/li&gt;
            &lt;li&gt;&lt;strong&gt;status&lt;/strong&gt;
                changed from &lt;em&gt;accepted&lt;/em&gt; to &lt;em&gt;closed&lt;/em&gt;
            &lt;/li&gt;
            &lt;li&gt;&lt;strong&gt;resolution&lt;/strong&gt;
                set to &lt;em&gt;fixed&lt;/em&gt;
            &lt;/li&gt;
            &lt;li&gt;&lt;strong&gt;totalhours&lt;/strong&gt;
                changed from &lt;em&gt;2.26&lt;/em&gt; to &lt;em&gt;2.66&lt;/em&gt;
            &lt;/li&gt;
          &lt;/ul&gt;
        &lt;p&gt;
On the Parsoid server I edited &lt;tt&gt;/etc/mediawiki/parsoid/settings.js&lt;/tt&gt; and added:
&lt;/p&gt;
&lt;pre class="wiki"&gt;        parsoidConfig.setInterwiki( 'wiki.transitionnetwork.org', 'http://wiki.transitionnetwork.org/api.php' );
        parsoidConfig.allowCORS = 'wiki.transitionnetwork.org';
&lt;/pre&gt;&lt;p&gt;
And then I edited the firewall rules, &lt;tt&gt;/etc/iptables/rules.v4&lt;/tt&gt; and added:
&lt;/p&gt;
&lt;pre class="wiki"&gt;# wiki.transitionnetwork.org
-A INPUT -p tcp --dport 8142 -s 81.95.52.111 -j ACCEPT
&lt;/pre&gt;&lt;p&gt;
Then restarted Parsiod and reloaded the firewall:
&lt;/p&gt;
&lt;pre class="wiki"&gt;service parsoid restart
iptables-restore &amp;lt; /etc/iptables/rules.v4
iptables -L | grep penguin
  ACCEPT     tcp  --  penguin.webarch.net  anywhere             tcp dpt:8142
&lt;/pre&gt;&lt;p&gt;
Then on &lt;a class="wiki" href="http://localhost:8080/trac/wiki/PenguinServer"&gt;PenguinServer&lt;/a&gt; I edited &lt;tt&gt;/web/wiki.transitionnetwork.org/www/LocalSettings.php&lt;/tt&gt; and changed these lines:
&lt;/p&gt;
&lt;pre class="wiki"&gt;// URL to the Parsoid instance
// MUST NOT end in a slash due to Parsoid bug
//$wgVisualEditorParsoidURL = 'http://localhost:8142';
$wgVisualEditorParsoidURL = 'http://parsoid.webarch.net:8142';
// Interwiki prefix to pass to the Parsoid instance
// Parsoid will be called as $url/$prefix/$pagename
$wgVisualEditorParsoidPrefix = 'wiki.transitionnetwork.org';
&lt;/pre&gt;&lt;p&gt;
This setup was tested via the &lt;a class="ext-link" href="https://wiki.transitionnetwork.org/Sandbox"&gt;&lt;span class="icon"&gt;​&lt;/span&gt;https://wiki.transitionnetwork.org/Sandbox&lt;/a&gt; page and all was working, so uninstalling Parsoid:
&lt;/p&gt;
&lt;pre class="wiki"&gt;aptitude remove parsoid
rm /etc/apt/sources.list.d/parsoid.list
&lt;/pre&gt;&lt;p&gt;
And the documentation, &lt;a class="wiki" href="http://localhost:8080/trac/wiki/MediaWiki#Parsoid"&gt;wiki:MediaWiki#Parsoid&lt;/a&gt; was updated, closing this ticket as fixed.
&lt;/p&gt;
      </description>
      <category>Ticket</category>
    </item>
 </channel>
</rss>