Talk:Parsoid

Jump to navigation Jump to search

About this board

Nickm84 (talkcontribs)

Has anybody been able to configure and run parsoid on a wikifarm that's sharing resources? I'm following the steps outlined in "the big switch" section which i've been able to get setup successfully. Manual:Wiki family


The problem is when editing pages with similar titles, for instance the Main_Page. When you edit the page from one wiki site, the other sites will show the same edited content from wiki1 when you edit their pages. I'm guessing this is because they're all using the same API. Is there any way around this?

Reply to "Wikifarm issues with parsoid"

"Did not find page revisions for" error. How can I solve this?

1
Summary by Parkyh1974

Sorry. After I make another page in english and make some change, it shows normally. So I think that's some other problem like

Parkyh1974 (talkcontribs)

I'm struggling to setup visualeditor.

I think I've set up parsoid almost done.

But when I try this as troubleshooting guide, it reponds this error.


curl -L http://localhost:8142/localhost/v3/page/html/Main_Page/

Did not find page revisions for Main_Page

What should I do?

Parsoid with AuthRemoteuser (private wiki)

8
Summary by Arlolra
2A02:A03F:48B8:BA00:FCD4:94B6:A36D:4719 (talkcontribs)

We have Kerberos enabled for apache which provides for every page the user. However as parsoid was not providing these credentials when connecting to http://localhost/wiki/api.php , the create/edit would fail.

We thought solving it by excluding the specific url http://localhost/wiki/api.php from authentication. However we now have the strange problem that when browsing to a page, the user is clearly logged in in the upper right corner, however when he clicks on edit, the visual editor complains about the user being 'anonymous' and consequently in the history only the ip address is logged instead of the username.

I have no clear understanding how parsoid provides the username to the api.php endpoint. What could be the issue here?

Arlolra (talkcontribs)
Mishter Jingles (talkcontribs)

Thanks for your answer.

I tried both links.

If I enable authentication in apache for http://localhost/wiki/api.php, then parsoid always gives :

"401 Unauthorized This server could not verify that you\nare authorized to access the document\nrequested.  Either you supplied the wrong\ncredentials (e.g., bad password), or your\nbrowser doesn't understand how to supply\nthe credentials required"

If I disable authentication in apache, parsoid "works" but the user is still 'anonymous'

Arlolra (talkcontribs)

After enabling authentication, you'd need to forward cookies. Did you try that?

Mszicsu (talkcontribs)
Starws (talkcontribs)

Hello!

Same configuration as Mishter Jingles

After enabling authentication, you'd need to forward cookies. Did you try that? - Yup!

Still ip address instead of the username while edit any page.


Apache:

<Location /mediawiki/api.php>

        Satisfy Any

</Location>


LocalSettings.php:

...

$wgGroupPermissions['*']['read'] = true;

$wgGroupPermissions['*']['edit'] = true;

...

PS:

Also tried with $wgSessionsInObjectCache = true; and $wgVirtualRestConfig['modules']['parsoid']['forwardCookies'] = true;

Parsoid and mediawiki hosted on same server.


PSS:

Next configuration doesn't work (read permissions error):


LocalSettings.php:

...

$wgGroupPermissions['*']['read'] = false;

$wgGroupPermissions['*']['edit'] = false;

...

if ( !isset( $_SERVER['REMOTE_ADDR'] ) OR $_SERVER['REMOTE_ADDR'] == '127.0.0.1' ) {

$wgGroupPermissions['*']['read'] = true;

$wgGroupPermissions['*']['edit'] = true;

}

#NetworkAuth

require_once "$IP/extensions/NetworkAuth/NetworkAuth.php";

$wgNetworkAuthUsers[] = [

        'iprange' => [ '127.0.0.1' ],

        'user'    => 'parsoid'

];

Arlolra (talkcontribs)
Meowoclock (talkcontribs)

Thanks all above for the help, I just wanted to chime in myself because this page was in top google results while troubleshooting.


I was setting up a similar config, for myself (just a intranet wiki using apache basic http auth to restrict a "open" wiki.)

I was struggling but eventually realized that


1. my apache needed to be configured as:


Apache:


<Location /mediawiki/api.php>

        Satisfy Any

</Location>


and


2.(as Arlolra mentioned) I needed to forward cookies.


Reply to "Parsoid with AuthRemoteuser (private wiki)"
216.255.253.87 (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

5
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": "ashsd.xxx.com",

"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

2
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
parsoid:
  Installed: 0.9.0all
  Candidate: 0.9.0all
  Version table:
 *** 0.9.0all 500
        500 https://releases.wikimedia.org/debian 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 https://people.wikimedia.org/~ssastry/parsoid/debs/ (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 https://people.wikimedia.org/~ssastry/parsoid/debs/ (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/glitch.io?"

The Parsoid Guide needs updating and better formatting

2
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: https://www.howtoforge.com/tutorial/how-to-install-visualeditor-for-mediawiki-on-centos-7/

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

and...

  • 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

4
Summary by Arlolra

User disappeared

Vaerchi (talkcontribs)

Hello,

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 P.map (/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?

66.103.132.84 (talkcontribs)

Yes,

  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 keys.gnupg.net --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?