Common Errors when installing VisualEditor/Parsoid in MediaWiki in CentOS 7
OK ok, here are all the errors I have during my installation.
My environment:
MediaWiki | 1.32.0 |
PHP | 7.3.6 (apache2handler) |
MariaDB | 5.5.60-MariaDB |
ICU | 62.1 |
Why do I have to use this environment ?
- 1.32.0 is the ONLY stable version now, the current latest one is NOT stable at all. Try it, you will know that.
- The tricky part in here is that the current version of VE (Visual Editor) is NOT compatible with 1.32.0. You have to download the previous stable one in https://www.mediawiki.org/wiki/Special:ExtensionDistributor/VisualEditor
- However, the current version of parsoid is compatible with any version of VE and MW.
Next, The setting of domain
inLocalSettings.php
and /opt/parsoid/config.yaml
must match, but you can use anything you want.
Next, you may have a ShortUrl setting by following https://shorturls.redwerks.org/ . If you have a problem to find the right path of api.php, just visit Special:Version
, in the section Entry point URLs
, you can find the path of api.php.
Next, the current version of Parsoid (0.10.0) does NOT work with Mediawiki 1.32.0 (the stable version). When you setup Flow, an extension for structural discussion, you will have the following error:
[XPMcxSE1FV@SI4uN7gzjogAAAAU] Exception caught: Request to parsoid for “wikitext” to “html” conversion of content connected to title “Topic:V0udrm1q2u5nayuv” failed: 406
Please note that, it only shows in your Talk page. It is because the latest version of Parsoid removed the following config:
ParsoidConfig.prototype.
strictAcceptCheck
So, the solution is uninstall 0.10.0, and install 0.9.0 with
ParsoidConfig.prototype.
strictAcceptCheck
= false
in parsoid/lib/config/parsoidconfig
Finally, I am using CentOS7 in Amazon Lightsail. It has a default setting called SELinux (https://en.wikipedia.org/wiki/Security-Enhanced_Linux). You probably don’t want to read it at all. So just go to /etc/selinux/config
and set SELINUX=disabled
. It will save you from tons of errors, including but not limited to:
- Error loading data from server: (curl error: 7) Couldn’t connect to server
- oldidnotfound: There is no revision with ID 0.
- VE works in some pages but not all.
- VE does not show up after reboot.
- php session id fail in
/var/log/httpd/access_log
(Yes, it solved this error and I don’t know why).