Parsoid 0.9.0 update brings 406 Not Acceptable docserver error in VisualEditor REL_30 on Mediawiki 1.30

Some of my mediawiki instances broke when editing a page with VisualEditor on REL_30 today bringing HTTP 416 Errors related to Parsoid.

Strangely this error only occured when editing  existing pages, simplyfied as curl below:

 

After a while I found that parsoid announced the behavoiur on there github rep:

This release requires clients (VE, etc.) to return a 1.6.0 and greater HTML version string in the header. If not, Parsoid will return a HTTP 406. This can be fixed by updating VE (or relevant clients) to a more recent version.

Unfortunately I used their .deb repository  releases.wikipedia.org which didn’t provide the 0.8.0 package for reverting the update. And since I’ve already updated  -marking it on hold in apt was no longer an option.

After reading a bit through the source code the solution I found until the next mediawiki stable versions arrives can be followed by editing the

and switch this line:

to that

It’s not pretty, but for now it solved my issues.