Hello,
First off, thanks to all above posters for the instructions and the effort!
I too did have the same issue with missing api folder, server.js in bin instead of api, parsoid misconfiguration and other misc issues.
After a few days of head-to-wall relationship, I made it work properly without errors. Below are the steps I compiled that worked for me. Hopefully, it will be useful to others.
My environment:
- CentOS7.2.1511 with default LAMP stack minus the php, which is php7 from remi repo
- MediaWiki 1.27.1
- SElinux = enforcing
Based off the steps posted by thomei (thank you!) viewtopic.php?f=47&t=53223#p225372 here is what I did starting at Step 9. I omitted steps that worked fine for me.
Step 9) omitted the creation of api folder and localsettings.js which is required only for backward compatibility and for me, well, wasn't needed at all.
Instead, I configured config.yaml file (thanks hananrok) as follows:
edited(vim, nano, etc) config.yaml and located line starting with:Code: Select all
cd /opt/parsoid/ cp config.example.yaml config.yaml
The important lines to change were:Code: Select all
mwApis:
andCode: Select all
uri: 'http://yourwikiurl/api.php'
Step 10) did not use, since localsettings.js wasn't neededCode: Select all
domain: 'localhost' # optional
Step 13) did not use (needs experimentation)
Step 13.5) created policy and applied httpd_sys_content_t label to /var/www/html directory. (i use the default "html" directory). I really should have done this during LAMP install.Step 16) httpd_can_network_connect was already off for meCode: Select all
cd /var/www semanage fcontext -a -t httpd_sys_content_t "/html(/.*)?" restorecon -R -v html
Step 18) I modified ExecStart directive to point to where the server.js is currently located for me: /opt/parsoid/bin/server.js (as mentioned by above poster)Step 19 - 20) I was able to start parsoid service and pull it's page successfully at this pointCode: Select all
[Unit] Description=Mediawiki Parsoid web service on node.js Documentation=http://www.mediawiki.org/wiki/Parsoid Wants=local-fs.target network.target After=local-fs.target network.target [Install] WantedBy=multi-user.target [Service] Type=simple User=root Group=root WorkingDirectory=/opt/parsoid # EnvironmentFile=-/etc/parsoid/parsoid.env ExecStart=/usr/bin/node /opt/parsoid/bin/server.js KillMode=process Restart=on-success PrivateTmp=true StandardOutput=syslog
Step 21 - 25) Installed correct version of VisualEdior and UniversalLanguageSelector
This had me stumbled at first but then I realized that Git pulls VE and ULS for the latest version of MediaWiki 1.28
In my case, I am running the 1.27 so I had to get the correct version:Step 26 - 27) pasted the VisualEditor code into LocalSettings.phpCode: Select all
cd ~ wget https://extdist.wmflabs.org/dist/extensions/VisualEditor-REL1_27-9da5996.tar.gz tar -xvzf VisualEditor-REL1_27-9da5996.tar.gz cp -rv VisualEditor /var/www/mediawiki-installation/extensions/ wget https://extdist.wmflabs.org/dist/extensions/UniversalLanguageSelector-REL1_27-a274928.tar.gz tar -xvzf UniversalLanguageSelector-REL1_27-a274928.tar.gz cp -rv UniversalLanguageSelector /var/www/mediawiki-installation/extensions/
One change I had to do was remove the * from. Otherwise, i'd be getting a blank page when going to my wiki.so it became:Code: Select all
# Namespces for VE $wgVisualEditorNamespaces = array_merge( $wgContentNamespaces, array( * ) );
I restarted Parsoid and Apache services for good measure.Code: Select all
# Namespces for VE $wgVisualEditorNamespaces = array_merge( $wgContentNamespaces, array() );
Now, editing pages seem to be using VisualEditor.
I tested this on a Public Wiki and Private.
For Private Wiki I had to use additional lines in LocalSettings.php as per https://www.mediawiki.org/wiki/User:And ... oid_Server