Jump to navigation Jump to search

About this board (talkcontribs)

Protip: When setting the config for multiple wikis if you get a duplicate key error it is essential that a line with:

- #

is between each of the uri/domain combinations under mwApis in config.yaml

Reply to "Multiple wikis"

HTTP 406 error when editing existing pages using Parsoid version 0.10.0

Hoefsldyla (talkcontribs)

Mediawiki 1.31.1

Parsoid 0.10.0

VisualEditor 1.31 as of 11/01/2019

Latest RESTBase as of 11/01/2019

NodeJS v8.10.0

Parsoid works fine by itself but if i try set it up in combination with RESTBase for the ability to switch from source code to visual editor

I get HTTP 406. (Failed to transform content, requested_version:1.6.0, existing_version:2.0.0)

It worked fine before I upgraded Parsoid from 0.9.0.

This post was hidden by Hoefsldyla (history)
Rajeshrajesh.35 (talkcontribs)

I am still getting error "apierror-visualeditor-docserver-http","info":"HTTP 406"

Using these configs:

OS : GNU bash, version 4.2.46(2)-release (x86_64-redhat-linux-gnu)

NAME="Red Hat Enterprise Linux Server"

VERSION="7.6 (Maipo)"

MediaWiki 1.31.1

VisualEditor 0.1.0 (6854ea0)22:33, 5 November 2018

"parsoid" : 0.10.0+git

Parso log:

"name": "parsoid",

"hostname": "",

"pid": 19229,

"level": 60,

"logType": "fatal/request",

"wiki": "Wiki2",

"title": "Bot",

"oldId": null,

"reqId": null,

"userAgent": "VisualEditor-MediaWiki/1.31.1",

"msg": "Not acceptable.\ntext/html; charset=utf-8; profile=\"\"\ntext/html; charset=utf-8; profile=\"/HTML/999.0.0\"\n",

"stack": "",

"httpStatus": 406,

"longMsg": "Not acceptable.\ntext/html; charset=utf-8; profile=\""\ntext/html; charset=utf-8; profile=\"/HTML/999.0.0\"\n",

"levelPath": "fatal/request",

"time": "2019-06-19T09:00:58.714Z",

"v": 0

Arlolra (talkcontribs)
Rajeshrajesh.35 (talkcontribs)

Thanks @Arlolra, i will try it once

Reply to "HTTP 406 error when editing existing pages using Parsoid version 0.10.0"

Rant: Managing parsoid debian package versions with apt

Summary by Arlolra

Parsoid is being ported to PHP where it will be distributed as part of core.

Ciencia Al Poder (talkcontribs)

So... there's no way to downgrade to parsoid 0.8.0 using apt.

> sudo apt-get install parsoid=0.8.0all
Reading package lists... Done
Building dependency tree
Reading state information... Done
E: Version '0.8.0all' for 'parsoid' was not found

> sudo apt-cache policy parsoid
  Installed: 0.9.0all
  Candidate: 0.9.0all
  Version table:
 *** 0.9.0all 500
        500 jessie-mediawiki/main amd64 Packages
        100 /var/lib/dpkg/status                                             

Why there's not a proper way to handle versions in wikimedia's debian repository?

The only way to downgrade is to download the deb from (and pray that nobody hacked it)

Note that apt-mark hold parsoid doesn't work when you're installing the package for the first time!

Legoktm (talkcontribs)

We use reprepro to create the Debian repository (not the full dak used by Debian) - I'm not sure whether it supports having multiple versions of a package.

Providing PGP signatures for (or some better management of older versions) is definitely something we should improve.

John Harry Lau (talkcontribs)

Finally! After 1 year with pc reset, I got parsoid with no npm erroors (warnings doesn't effect it too much)! Now, because I need to get parsoid live with visual editor without keeping the device on, I found 2 hosting providers (plans for free), well yeah, I will use them for visual editor live, but how?

Arlolra (talkcontribs)

Unfortunately we cannot provide this level of service. If you're experiencing specific issues, we'd be happy to try and help get you through it but we aren't familiar enough with those environments to provide a tutorial.

Reply to "Tutorial for heroku/"

The Parsoid Guide needs updating and better formatting

Thedonquixotic (talkcontribs)

Hi, I'm new to using Mediawiki but I just wanted to comment and say that I think the Parsoid guide is poorly written and needs some serious improvements. It's constantly sidetracked by notes on obsolete options, or alternative installation issues etc, which results in a very confusing stream of information to parse.

I was unable to install Parsoid correctly following the official guide but I found this one much easier to follow:

While the one linked is only for a specific OS and server type, I think it is a better example of how a Parsoid installation tutorial should be structured. The current one is very muddy and the structure of it is not consistent, at least to the eyes of a newbie like me. I am a newbie, but I think I have a decent understanding of technical information writing and the current shape of the article is not a good example of that.

Arlolra (talkcontribs)

I'm sorry for the assessment of the documentation. It is community maintained so there's an opportunity for you to contribute improvements, if possible.

Setting up Parsoid has been a thorn in many a MediaWiki developers side and is one motivating factor in porting Parsoid from JavaScript to PHP, to be included in core.

Hopefully that will ease the burden of many peoples' setup moving forward.

I appreciate the feedback.

Reply to "The Parsoid Guide needs updating and better formatting"
Summary by Arlolra

User disappeared

Kwmedaw1 (talkcontribs)

Hello. i was following this step : Parsoid/Setup#Windows

and I'm struggling with installation.

  • Here's my log files :

I already tried :

  • npm install -g abbrev@1.0.9
  • npm install -g abbrev
  • npm cache clean
  • npm cache verify
  • npm install parsoid --no-optional
  • npm install --no-optional

and also..

  • delete package-lock.jspn and reinstall


  • i couldn't find folder '.staging'
  • my OS is Windows 10

Thank you!

Arlolra (talkcontribs)

/usr/lib/parsoid/none_modoles/lib/ folder not being created

Summary by Arlolra

User disappeared

Vaerchi (talkcontribs)


I followed the instructions from here to configure repository and install parsoid, and I see a few odd things, 1, /var/log/parsoid is owned by the parsoid user and group, and I have to change it to parsoid:adm and give the adm group read permissions to see the parsoid.log file, and 2, when i try to start the parsoid log service I get the message:

{"name":"parsoid","hostname":"wiki","pid":1220,"level":30,"levelPath":"info/service-runner","msg":"master(1220) initializing 1 workers","time":"2018-10-19T20:04:52.048Z","v":0}

{"name":"parsoid","hostname":"wiki","pid":1231,"level":60,"err":{"message":"Cannot find module '/usr/lib/parsoid/node_modules/lib/index.js'","name":"Error","stack":"Error: Cannot find module '/usr/lib/parsoid/node_modules/lib/index.js'\n    at Function.Module._resolveFilename (module.js:547:15)\n    at Function.Module._load (module.js:474:25)\n    at Module.require (module.js:596:17)\n    at require (internal/module.js:11:18)\n    at Worker._requireModule (/usr/lib/parsoid/node_modules/service-runner/lib/base_service.js:342:30)\n    at Worker._requireModule (/usr/lib/parsoid/node_modules/service-runner/lib/base_service.js:362:29)\n    at Worker._requireModule (/usr/lib/parsoid/node_modules/service-runner/lib/base_service.js:362:29)\n    at (/usr/lib/parsoid/node_modules/service-runner/lib/worker.js:168:25)\n    at tryCatcher (/usr/lib/parsoid/node_modules/bluebird/js/release/util.js:16:23)\n    at MappingPromiseArray._promiseFulfilled (/usr/lib/parsoid/node_modules/bluebird/js/release/map.js:61:38)\n    at MappingPromiseArray.PromiseArray._iterate (/usr/lib/parsoid/node_modules/bluebird/js/release/promise_array.js:114:31)\n    at MappingPromiseArray.init (/usr/lib/parsoid/node_modules/bluebird/js/release/promise_array.js:78:10)\n    at MappingPromiseArray._asyncInit (/usr/lib/parsoid/node_modules/bluebird/js/release/map.js:30:10)\n    at Async._drainQueue (/usr/lib/parsoid/node_modules/bluebird/js/release/async.js:138:12)\n    at Async._drainQueues (/usr/lib/parsoid/node_modules/bluebird/js/release/async.js:143:10)\n    at Immediate.Async.drainQueues (/usr/lib/parsoid/node_modules/bluebird/js/release/async.js:17:14)","code":"MODULE_NOT_FOUND","moduleName":"lib/index.js","levelPath":"fatal/service-runner/worker"},"msg":"Cannot find module '/usr/lib/parsoid/node_modules/lib/index.js'","time":"2018-10-19T20:04:52.838Z","v":0}

{"name":"parsoid","hostname":"wiki","pid":1220,"level":40,"message":"first worker died during startup, continue startup","worker_pid":1231,"exit_code":1,"startup_attempt":1,"levelPath":"warn/service-runner/master","msg":"first worker died during startup, continue startup","time":"2018-10-19T20:04:53.849Z","v":0}

The /usr/lib/parsoid/none_modules/lib folder does not seem to exist

Running ubuntu Ubuntu 18.04.1 LTS

Thank you,

Arlolra (talkcontribs)

How did you install Parsoid? With apt-get? (talkcontribs)


  854  apt-get install software-properties-common

  855  root apt-get install software-properties-common

  856  sudo apt-get install software-properties-common

  857  sudo apt install dirmngr

  858  sudo apt-key advanced --keyserver --recv-keys 90E9F83F22250DD7

  859  sudo apt install apt-transport-https

  860  sudo apt update && sudo apt install parsoid

Arlolra (talkcontribs)

And what command are you issuing to start the service?

Code block not visible with VisualEditor when using https

Summary by Arlolra

User disappeared

SpaetzleBinLinsen (talkcontribs)


I followed the hints found in "Extension:VisualEditor#Parsoid over HTTPS". It works pretty well. The only problem I'm confronted with is that after inserting a code block element only "<>" is shown when done. If I save the document and reopen it for editing nothing of the code blocks can be seen. I need to use the source code editor then.

Does anybody hav a hint whats wrong here and how to solve the issue?



Whatamidoing (WMF) (talkcontribs)

I don't really know. But, there was another recent thread that had some odd behaviors, which were resolved by turning on "selective serialization" with RESTbase. Does that sound like it might be relevant?

SpaetzleBinLinsen (talkcontribs)

This sounds more as there is a problem, that some spaces are deleted.

I do not loose the code blocks they are just not shown when opening the wiki page with the VisualEditor. If I use source code editing anything is as it should be.

But I would give it a try. Can somebody explain how the "selective serialization" is turned on?

BTW. My Setup ist mediawiki 1.31-alpha, parsoid 0.9

SSastry (WMF) (talkcontribs)

This is the visual editor, so obviously, you won't see markup but the rendering of markup. If you want to see and edit markup, you have to use source code editing. So, can you be a bit more specific about the problem with "code blocks"? 1. What is the code block you insert in VE? 2. What is the code that you see in wikitext editor?

Arlolra (talkcontribs)

This doesn't sound a like an issue that requires selective serialization to resolve. That only comes into play when saving a page.

Can you clarify what you mean by a code block element?

Cannot GET /localhost/mywiki/v3/transform/wikitext/to/html

Summary by Arlolra

urls with "transform" in the path only accept POST requests

Emske (talkcontribs)


I've been having trouble issuing the wikitext to html command for a whole MediaWiki page. I've tried out the parse.js program on small text, but I need to be able to convert wikitext to html for a whole page. In the long-run, I'll need to be able to do it for several pages.

I tried recreating the command listed in>_HTML_requests:


by using :


where 'localhost/mywiki' is the path to my wiki's main page (I have another page, titled 'Sandbox', located at localhost/mywiki/index.php/Sandbox that I'd like to run wikitext to html on).

However, the above command I tried out returned the following:

Cannot GET /localhost/mywiki/v3/transform/wikitext/to/html

What is the proper implementation of this command? Or should I be doing something different?

Arlolra (talkcontribs)

The domain part of /:domain/v3/page/:format/:title/:revision? is supposed to correspond to what you've defined in your config.yaml

I imagine you've got something like,

mwApis: - uri: 'http://localhost/mywiki/api.php'

 domain: 'localhost'

In which case, you'd want to query,

http://localhost:8000/localhost/v3/page/html/Main_Page or http://localhost:8000/localhost/v3/page/html/Sandbox

Note that urls with "transform" in the path only accept POST requests.


Emske (talkcontribs)

Hi Arlolra,

Thank you so much for the swift response. The latter query appears to have worked. It displayed my Sandbox page in HTML.

However, I would like the HTML code dump (preferably in a txt file, but I think JSON would also work). Is there a way to output the actual HTML?

Thanks so much again!

Arlolra (talkcontribs)


node bin/parse.js --config --domain localhost --pageName Sandbox < /dev/null

Emske (talkcontribs)

I tried that; the system couldn't find the path specified (I'm guessing /dev/null, but I can look through the parsoid or node_modules directory to try a different path).

I tried executing without < /dev/null and got:

Waiting for stdin...

What input is it waiting on? I thought the Sandbox for the --page flag wouldn't covered that?

Arlolra (talkcontribs)

If you supply an input with the --pageName argument set, it parses the input in the context of the page. If no input is supplied, it'll fetch the source for that page. If you hit ctrl-c when it says "Waiting for stdin ..." it should do what you expect. Piping in < /dev/null is another way of achieving the same thing.

Adithyak1997 (talkcontribs)

npm WARN deprecated circular-json@0.3.1: CircularJSON is in maintenance only, flatted is its successor.

npm WARN deprecated formidable@1.0.17: Old versions of Formidable are not compatible with the current Node.js; Upgrade to 1.2.0 or later

npm WARN deprecated is-my-json-valid@2.16.0: catastrophic backtracking in regexes could potentially lead to REDOS attack, upgrade to 2.17.2 as soon as possible

npm WARN deprecated jade@0.26.3: Jade has been renamed to pug, please install the latest version of pug instead of jade

npm WARN deprecated kad-fs@0.0.4: Please upgrade to @kadenceproject/kadence - See

npm WARN deprecated kad-memstore@0.0.1: Please upgrade to @kadenceproject/kadence - See

npm WARN deprecated minimatch@0.3.0: Please update to minimatch 3.0.2 or higher to avoid a RegExp DoS issue

npm WARN deprecated nsp@2.8.1: The Node Security Platform service is shutting down 9/30 -

npm WARN deprecated joi@6.10.1: This version is no longer maintained. Please upgrade to the latest version.

npm WARN deprecated wreck@6.3.0: This version is no longer maintained. Please upgrade to the latest version.

npm WARN deprecated to-iso-string@0.0.2: to-iso-string has been deprecated, use @segment/to-iso-string instead.

npm notice created a lockfile as package-lock.json. You should commit this file.

npm WARN system32 No description

npm WARN system32 No repository field.

npm WARN system32 No license field.

Arlolra (talkcontribs)

Those look like warnings, not errors. In any case, Parsoid development to this point has been with npm v3 (or, possibly v4). See Parsoid/Upgrade packages

Adithyak1997 (talkcontribs)

Is this Parsoid currently working?I actually wanted to run Linter gadget.

Arlolra (talkcontribs)

I'm going to assume you mean the Linter extension, which requires Parsoid. It sounds like you may have installed it correctly, but you'll need to verify that it's configured and running.

Adithyak1997 (talkcontribs)

@Arlolra, I have a doubt. In the page Parsoid/Upgrade packages, my laptop cmd does not support the last code fragment. How can I then execute it in cmd? Also, is it mandatory that media wiki extension needs to be downloaded inorder to install Parsoid?

Arlolra (talkcontribs)

You can lint a page without the MediaWiki Linter extension installed but the results would be loggged to the command line. The two are meant to work in concert so that the results of linting are posted to MediaWiki for storage and displaying.

Reply to "Error while installing Parsoid"