Talk:Parsoid

Jump to navigation Jump to search

About this board

Tealk (talkcontribs)
Reply to "Invalid domain"

Multiple wikis sharing the same parsoid service

3
LP371906 (talkcontribs)

Hi

i can't share multiple wikis on the same parsoid service.

"config.yaml" looks like that:


     mwApis:

- # First wiki

uri: 'http://wiki1.mysite.com/api.php'

  domain: 'wiki1.mysite.com'  # optional

- # If you have another wiki on a different domain

uri: 'http://wiki2.mysite.com/api.php'

domain: 'wiki2.mysite.com'  # optional


"Wiki1" is fully functionally

but in "wiki2" i can't edit a page. there is an error:

"apierror-visualeditor-docserver-http: HTTP 401"


i can do a change in "LocalSettings_wiki2.php" of Parsoid "Domain" to "wiki1.mysite.com". And now i can edit a page, but there is showing an other page of wiki1.

i have a LocalSettings.php who switch pages:

       switch ( $_SERVER['SERVER_NAME'] ) {

               case 'wiki1.mysite.com':

                       require_once 'LocalSettings_wiki1.php';

                       break;

    case 'wiki2.mysite.com':

                       require_once 'LocalSettings_wiki2.php';

                       break;


and my "LocalSettings_wiki2.php" is showing:

#Link with Parsoid

$wgVirtualRestConfig['modules']['parsoid'] = array(

   // URL to the Parsoid instance

   'url' => 'http://wiki2.mysite.com:8000',

   // Parsoid "domain", see below (optional)

   'domain' => 'wiki2.mysite.com',


LocalSettings_wiki1.php is almost similar, only "url" and "Domain" are different but also port 8000


can someone help?

thanks a lot!

PenDragyn21 (talkcontribs)

When I got this working, Parsoid had set its main service up on the top-level domain (localhost:8000 or mysite.com:8000). I believe the 'url' parameter in LocalSettings wants this value or where ever the shared instance of parsoid is running. Not the domain for your individual wikis.

First, with parsoid running, check to see if it's running on the TLD.

Either type 'curl http://mysite.com:8000' at a commandline or use a web browser to visit 'http://mysite.com:8000'. If that's where parsoid is running, you'll get back HTML code from the curl command or a 'Welcome to Parsoid' page.

If that works, change the 'url' in $wgVirtualRestConfig to just 'http://mysite.com:8000' in your LocalSettings_wiki1.php and _wiki2.php. (But leave your config.yaml as is.) See if that fixes the errors.


LP371906 (talkcontribs)

Hi PenDragyn21

i've change my LocalSettings Config to:


#Link with Parsoid

$wgVirtualRestConfig['modules']['parsoid'] = array(

   // URL to the Parsoid instance

   'url' => 'http://localhost:8000',

   // Parsoid "domain", see below (optional)

   'domain' => 'wiki2.mysite.com',

   // Parsoid "prefix", see below (optional)

   'prefix' => 'wiki2.mysite.com'

);

$wgVirtualRestConfig['modules']['parsoid']['forwardCookies'] = true;



but i think the Problem was "forwardCookies" = true.


many thanks!

Reply to "Multiple wikis sharing the same parsoid service"

Why does "node roundtrip-test.js "Main Page"" work, but "node roundtrip-test.js "Main Page" --domain http://<my wiki's domain>" does not?

1
TheMystics (talkcontribs)

I'm doing a new install on Windows 2012 and I haven't gotten visual editor to work on saved pages at all yet. I'm on MediaWiki 1.31.1, PHP 7.0.7 (apache2handler), MySQL 5.7.13-log, and VisualEditor 0.1.0 (6854ea0) 22:33, 5 November 2018.

I've gotten to the point where I can use visual editor to create pages, but I can't edit pages (due to a "Error loading data from server: apierror-visualeditor-docserver-http: HTTP 404. Would you like to retry?" error).

As a debugging step, I checked that I

1) Can run "node bin/roundtrip-test.js "Main Page"" in a command prompt with only expected errors,

2) "node bin/roundtrip-test.js "Main Page" --domain <my wiki's domain>" fails due to a 404 error,

3) "node bin/roundtrip-test.js "Main Page" --apiURL http://<domain>/mediawiki/api.php" keeps trying to reconnect (even though http://<domain>/mediawiki/api.php brings me to the API page of my wiki), and

4) Doing both of #2 & #3 above's switches in the same command makes it keep trying to reconnect.

What can I do next to diagnose the issue so I can get Visual Editor up and running?

Reply to "Why does "node roundtrip-test.js "Main Page"" work, but "node roundtrip-test.js "Main Page" --domain http://<my wiki's domain>" does not?"

HTTP 406 error when editing existing pages using Parsoid version 0.10.0

2
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)
Reply to "HTTP 406 error when editing existing pages using Parsoid version 0.10.0"

upgrade from 9 to 10 resulted in curl error: 7

6
RobFantini (talkcontribs)

Hello, after the upgrade clicking on edit displayed:

   Error loading data from server: apierror-visualeditor-docserver-http-error: (curl error: 7) Couldn't connect to server. Would you like to retry?


/var/log/parsoid/parsoid.log ;

{"name":"parsoid","hostname":"wiki","pid":4318,"level":30,"levelPath":"info/service-runner","msg":"master(4318) initializing 2 workers","time":"2018-12-08T16:22:00.405Z","v":0}

{"name":"parsoid","hostname":"wiki","pid":4328,"level":60,"levelPath":"fatal/service-runner/worker","msg":"Cannot set property 'worker_id' of null","time":"2018-12-08T16:22:01.185Z","v":0}

{"name":"parsoid","hostname":"wiki","pid":4318,"level":40,"message":"first worker died during startup, continue startup","worker_pid":4328,"exit_code":1,"startup_attempt":1,"levelPath":"warn/service-runner/master","msg":"first worker died during startup, continue startup","time":"2018-12-08T16:22:02.196Z","v":0}



we are using Debian Stretch

MediaWiki         1.31.1 (a4c8065)  13:59, September 20, 2018

nodejs  Version: 4.8.2~dfsg-1

curl Version: 7.52.1-5+deb9u8


parsoid settings:

# cat /etc/mediawiki/parsoid/settings.js
'use strict';
exports.setup = function(parsoidConfig) {
        parsoidConfig.setMwApi({ uri: 'http://localhost/mediawiki/api.php'  , prefix: 'localhost', domain: 'localhost'  });
        parsoidConfig.useSelser = true;
};

Any suggestions to try to fix this appreciated!

Arlolra (talkcontribs)
RobFantini (talkcontribs)

thank you, so this fixed it

apt-get -t stretch-backports install nodejs
109.199.10.165 (talkcontribs)

Hello,


updating node.js to 8.11.1 will restore functionality of creating new pages, however editing of existing does not work: "apierror-visualeditor-docserver-http: HTTP 406"


any support in this matter will be appreciated.

Arlolra (talkcontribs)

Which version of Parsoid are you coming from?

Magol (talkcontribs)

I also get HTTP 406 when I edit existing pages using the latest Parsoid version (10.0.0)

Reply to "upgrade from 9 to 10 resulted in curl error: 7"
TheMystics (talkcontribs)
Reply to "Parsoid Troubleshooting guide"

Timeout in VisualEditor

4
Summary last edited by Ti infotrad 13:19, 13 December 2018 1 month ago

Possible solution described at Topic:Uqam69xv019t4r3m

217.86.209.28 (talkcontribs)

Hi, we have one very huge Page in one of our customers mediawiki. Editing this page will cause an alert windows after about 30 seconds witch says: "http". Not more. The Parsoid log says: ...started parsing... and then ...completed parsing in 37661 ms... so im guessing on a timeout problem. All other Pages load fast and fine. Is there a way to increase timeout? Thank you for every help and hint :-)

Arlolra (talkcontribs)

Not sure, I think you should ask on the VE talk page. Alternatively, you can try setting up RESTBase in front of Parsoid, so that the parse is cached and VE loads it fast.

Whatamidoing (WMF) (talkcontribs)

How huge is "very huge"?

217.86.209.28 (talkcontribs)

In Plaintext we have 21801 Lines

Reply to "Timeout in VisualEditor"

Transclusion of tags is not being done correctly

5
Hwgen22 (talkcontribs)

Hi,


I am trying to use citation tool and Citoid with the VisualEditor to allow easy management of references on my MediaWiki instance.


When I insert a link, Citoid service retrieves correctly the content of the source and build a reference accordingly. However, the following is being added at the end of the reference:

"<templatestyles src="Module:Citation/CS1/styles.css"></templatestyles>"


It seems that Parsoid is directly responsible of this bug. Indeed, when I add a reference inside VisualEditor, a POST to the API is being made, which gives the following response:

https://pastebin.com/2JvAh9fL

As you can see, the content is not parsing the templatestyles tags as it should, thus, those are displayed in VisualEditor.

I don't know if the following issues are related, and if so, to what extent:

https://phabricator.wikimedia.org/T88019

https://phabricator.wikimedia.org/T188143

Notice that when I save the edit, the tags are dropped but the reference is still here, as it should.

Does someone know what is causing this issue, and how can I resolve it? Thank you in advance.

SSastry (WMF) (talkcontribs)

Is your wiki public? What versions of Parsoid, MW, and VE do you run?

Arlolra (talkcontribs)
Arlolra (talkcontribs)

Without the TemplateStyles extension, Parsoid won't recognize those tags so they won't be rendered as scripts and just output as literal text as you're seeing.

Hwgen22 (talkcontribs)

Hi @SSastry (WMF), hi @Arlolra,


Thank you for your responses.


Unfortunately, my wiki is hosted locally, on a virtual machine, as I am doing some configuration for now, prior to making it public.


I use MediaWiki 1.31.1, Parsoid 0.9.0 and VisualEditor 0.1.0 (6854ea0).


I already have TemplateStyles extension installed. At least, it shows in Special:Version (version 1.0 (e5da5c0)).


In Parser extension tags, I have the following: "<gallery>, <indicator>, <nowiki>, <pre>, <ref>, <references>, <templatedata> and <templatestyles>".


Can the order of invocation of extensions in LocalSettings.php be a problem? For your information, this is the order that I have:

Cite, ParserFunctions (with and without $wgPFEnableStringFunctions enabled, currently it is disabled), WikiEditor, VisualEditor, <VisualEditor configuration>, <parsoid configuration>, Scribunto, TemplateData, TemplateStyles, <TemplateStyles configutation>, Citoid, <Citoid configuration>.


If the order is not a problem, do you know what could cause such issue? Thank you very much for your help.

Reply to "Transclusion of tags is not being done correctly"

Check which version of parsoid is installed

3
Summary last edited by SSastry (WMF) 15:01, 29 November 2018 1 month ago

curl "http://localhost:8142/version" or http://localhost:$PORT/version where $PORT is the port Parsoid listens on

Kghbln (talkcontribs)

I think I saw this somewhere but I cannot remember where and cannot find it right now. How do I check for the version of parsoid I am currently running?

Kghbln (talkcontribs)

Ok. Go to `/usr/lib/parsoid/src`, open "package.json" and look for the version stated. However I have the strong feeling that there is a saner method around.

Legoktm (talkcontribs)

Installing Parsoid using the node.js App Manager cPanel provides

1
GlitchyPSI (talkcontribs)

Some web hosting providers (like Namecheap) have enabled the "Setup Node.js App" option in the options list, which is a weird version of Node that I assume is sandboxed

I ran the NPM Install, however I am getting an Permission Denied when trying to execute npm start

(ssh of course)

Reply to "Installing Parsoid using the node.js App Manager cPanel provides"