This page used the Structured Discussions extension to give structured discussions. It has since been converted to wikitext, so the content and history here are only an approximation of what was actually displayed at the time these comments were made.
Please note that the Wikimedia Foundation does not provide support for installing VisualEditor on third-party wikis. However, if you have a question we may try to help.
Latest comment: 6 years ago1 comment1 person in discussion
I have just installed VE and it is working great. The only problem I am facing is that when I copy paste article from MS Word file VE does not properly format the references. Moreover, references are not clickable either. Any solution to that? 39.53.109.151 (talk) 03:03, 14 January 2020 (UTC)Reply
Pages with slashes (/) in title result in 404 error
Latest comment: 5 years ago2 comments2 people in discussion
RESOLVED
OP resolved his own issue and posted the answer
The following discussion is closed. Please do not modify it. Subsequent comments should be made on the appropriate discussion page. No further edits should be made to this discussion.
It appears visual editor does not work with pages that have slashes in their titles. When trying to save edits to these pages, or create a new page with a slash in the title, it results in an "apierror-visualeditor-docserver-http: HTTP 404" error. Watching the parsoid logs, you can see that the request never even makes it to parsoid if this is the case.
I recently updated a wiki which already has a bunch of pages with slashes in the titles which have not posed an issue until now. Is there a workaround or a planned fix for this? Dstoeltz (talk) 17:37, 14 January 2020 (UTC)Reply
I've just solved this for my wiki. The request isn't even getting as far as Restbase, let alone Parsoid. To fix it you need to have:
AllowEncodedSlashes NoDecode
in your Apache configuration. Without that, Apache rejects any urls with encoded slashes. Also, you need to add the nocanon directive on the end of the ProxyPass line. Prh47bridge (talk) 17:43, 27 April 2020 (UTC)Reply
The discussion above is closed. Please do not modify it. No further edits should be made to this discussion.
Thank you for pointing me to the right documentation, I assume Parsoid 0.11.0 is compatible for MediaWiki 1.33 or greater, although it will be end-of-life in June 2021 at the same date with MediaWiki 1.31 LTS (and with Node10).
HTTPError 406 Not acceptable "requested_version":"1.6.0","existing_version":"2.0.0"
Parsoid 0.10.0 is breaking the current MediaWiki 1.31 LTS with RESTBase installed locally (master branch), is there any workaround to avoid it? S0ring (talk) 08:26, 27 January 2020 (UTC)Reply
Yes, the content version compatibility checks are done by RESTBase, so you don't notice the breakage until it's installed. You shouldn't use such a new version of Parsoid, but instead the one that emits version 1.6.0 of the DOM, which is the content type that VisualEditor for 1.31 supports; apparently this is Parsoid 0.9.0 according to those notes, sorry. Jdforrester (WMF) (talk) 18:27, 28 January 2020 (UTC)Reply
How to use {{#related:SITE}} or {{#description2:thats a description}}
Latest comment: 6 years ago4 comments2 people in discussion
Hey, could anyone please tell me the name of the file that contains the rules for formatting the text? For example, Visual Editor keeps adding spaces after * and |, and inserts a free line under headers, plus adds underscores to the name of files. Where exactly can I modify this behavior? 79.119.106.13 (talk) 14:49, 29 January 2020 (UTC)Reply
Latest comment: 6 years ago5 comments2 people in discussion
The following discussion is closed. Please do not modify it. Subsequent comments should be made on the appropriate discussion page. No further edits should be made to this discussion.
The current instructions suggest a workaround for forwarding cookies:
It seems like this solution is worse than the problem it is solving, as this will allow private wikis to be readable over the Parsoid port. When the browser visits that port, it will query the MediaWiki API with $_SERVER['REMOTE_ADDR'] set to 127.0.0.1. Of course, the Parsoid port could be closed to outside traffic. But it still seems like a bad idea and definitely should be noted in the instructions. Any thoughts? Ike Hecht19:06, 3 February 2020 (UTC)Reply
Latest comment: 6 years ago2 comments2 people in discussion
Hi, I recently installed MediaWiki on an Ubuntu virtual system with the apache2, php7.2, and mysql-server packages installed. The normal installation. All is well until I tried installing the VisualEditor. I first downloaded the package and moved it to the correct directory, then enabled it in the LocalSettings.php file. I took a break for a few days for personal things, then returned to my project to find that Parsoid needed to be installed. I did the installation instructions for Parsoid on a Debian/Ubuntu installation, and changed the uri variable in the config.yaml file of Parsoid to localhost, since that is where the api.php file is. I left the domain variable the same and returned to the VisualEditor page to do a full check of the instructions so that I knew I was done. I saw that I needed to change a few settings so that users would have a smoother experience, and I needed to link Parsoid to the VisualEditor. I did all that and reloaded the Parsoid service and the apache2 server. Finally, I returned top the localhost page in my browser to find that when I tried to switch to VisualEditor, it gave me the error "Error loading data from server: apierror-visualeditor-docserver-http-error: http-request-error." I checked a bit of the docs but coudn't find anything. Anybody know how to help? If you need anything just ask and I can tell you.
Hello, please provide the relevant parts of your configuration (parsoid/config.yaml, LocalSettings.php), also the versions of MediaWiki and Parsoid. Thus we can say what should be changed, otherwise someone must reproduce all the documentation for you. Spas.Z.Spasov (talk) 13:07, 13 February 2020 (UTC)Reply
Latest comment: 6 years ago5 comments3 people in discussion
RESOLVED
Needed to set a configuration variable for it
The following discussion is closed. Please do not modify it. Subsequent comments should be made on the appropriate discussion page. No further edits should be made to this discussion.
VisualEditor is already enabled on the main namespace, but "your signature" in "insert" tab is greyed out, and users cannot insert ~~~~ signatures. I just want to enable it. 104.194.203.94 (talk) 01:44, 20 February 2020 (UTC)Reply
The "Your signature" item allows you to insert a signature that you use on the project. It will be greyed out (not selectable) when you are editing a type of page (a "namespace"), such as an article, where signatures should not be inserted.
Latest comment: 6 years ago4 comments2 people in discussion
There's been a lot of questions on Support_desk about how to setup the php port of parsoid (instead of using the parsoid node.js service). There seems to be no instructions for how to do so. It would be great if someone could document that. Bawolff (talk) 14:02, 26 February 2020 (UTC)Reply
Latest comment: 6 years ago2 comments2 people in discussion
RESOLVED
Extension version of VE used was incompatible
The following discussion is closed. Please do not modify it. Subsequent comments should be made on the appropriate discussion page. No further edits should be made to this discussion.
My VisualEditor stopped working after an upgrade to Mediawiki 1.34.
When "Edit" is clicked on, I can see the shadow of VisualEditor and Loading Bar showing up and then quickly disappeared (forced close).
Unlike most situations, there is no error message, and the browser just stuck at the page I intended to edit.
This is my setup:
macOS Catalina (v 10.15.3)
MAMP (version 5.5)
MediaWiki 1.34
VisualEditor (REL1_34)
Parsoid 0.10.0 (set up from a virtual machine)
Google Chrome Version 80.0.3987.122 (also tried Safari Version 13.0.5 and Firefox 73.0.1)
Parsoid seems to work fine from the port 8142, and I never got to the point of actually loading from Parsoid, so I don't think this is the issue but feel free to let me know otherwise. Also, I have tried ``REL1_34``, ``REL1_33``,``REL1_32``,``REL1_31`` versions of the extension, neither worked.
The only error messages I can pull out are those from the Google Chrome Console, so I will leave them here in case there is some helpful information.
DevTools failed to parse SourceMap: chrome-extension://cfhdojbkjhnklbpkdaibdccddilifddb/include.postload.js.map
VisualEditor failed to load: Error: Unknown module: mediawiki.api.messages
load.php?lang=en&modules=jquery&skin=vector&version=1xgm5:51 jQuery.Deferred exception: Cannot set property 'section' of undefined TypeError: Cannot set property 'section' of undefined
load.php?lang=en&modules=jquery&skin=vector&version=1xgm5:51 jQuery.Deferred exception: Cannot read property 'on' of undefined TypeError: Cannot read property 'on' of undefined
load.php?lang=en&modules=jquery&skin=vector&version=1xgm5:51 jQuery.Deferred exception: Cannot read property 'on' of undefined TypeError: Cannot read property 'on' of undefined
Your version of VisualEditor is incompatbile with your version of MediaWiki. The mediawiki.api.messages module was provided by MediaWiki until MW 1.33. You should upgrade VisualEditor (and all your other extensions) to the 1.34-compatible versions. Jdforrester (WMF) (talk) 19:52, 2 March 2020 (UTC)Reply
The discussion above is closed. Please do not modify it. No further edits should be made to this discussion.
VisualEditor does not refresh page after saving changes
Latest comment: 6 years ago1 comment1 person in discussion
I have a rather weird issue. After saving changes with VE (2017 WE), instead of redirecting to https://wiki.com/w/Page, it stayed at https://wiki.com/w/Page?action=edit. Any idea why? The redirect issue happens when visiting https://wiki.com/index.php?title=Page&action=edit as well.
Can you tell me that I need to set up a visual editor or it's a different version? PonPon 14:11, 28 March 2020 (UTC)
VisualEditor is not compatible with the current MediaWiki core (version 1.34.0), it requires: >= 1.35.0PHP Fatal error: Uncaught ExtensionDependencyError: VisualEditor is not compatible with the current MediaWiki core (version 1.34.0), it requires: >= 1.35.0
Latest comment: 5 years ago2 comments2 people in discussion
The following discussion is closed. Please do not modify it. Subsequent comments should be made on the appropriate discussion page. No further edits should be made to this discussion.
PHP Fatal error: Uncaught ExtensionDependencyError: VisualEditor is not compatible with the current MediaWiki core (version 1.34.0), it requires: >= 1.35.0 109.230.45.242 (talk) 13:26, 9 April 2020 (UTC)Reply
Latest comment: 5 years ago3 comments2 people in discussion
The following discussion is closed. Please do not modify it. Subsequent comments should be made on the appropriate discussion page. No further edits should be made to this discussion.
Our hosting provider has disabled this function. We them asked to enable it but they refused. Creating new pages is fine but when i try to edit pages i get:
internal_api_error_Exception: Exception caught: PHP cURL function curl_multi_init missing.
Since REL1_32 (for T139169), there's been a fallback to a non-parallel system that doesn't use curl if it's unavailable, but that was written assuming curl was intact. :-)
Latest comment: 5 years ago1 comment1 person in discussion
hello! I loaded the extension in LocalSettings.php file, when I clicked edit, Visual Editor's interface popped for one second, and asked if I will switch to VisualEditor, but I missed it and clicked on something else..I am stuck with the plain editing interface.
I tried to remove the VisualEditor from /var/lib/extensions/ and re-upload again and load LocalSettings.php again, but the notification never pops up..
Latest comment: 5 years ago1 comment1 person in discussion
On my wiki I've got it set up that VisualEditor is the default editor, for the ease of use of the members. The problem is, with $wgEmailConfirmToEdit set, the VisualEditor doesn't alert users that they need to confirm their email before editing.
Users will go to edit a page without confirming their email, and the VisualEditor just loads with everything grayed out and no explanation as to why. If you switch to the "edit source" tab with the built-in wikitext editor, it displays "You must confirm your email address before editing pages". This also extends to any other permissions messages that are normally displayed in the built-in wikitext editor.
Is there a way to add those permissions alerts to the VisualEditor, similar to how the alert about editing from an IP address displays? My current workaround is using a site wide dismissable notification telling users to confirm email before editing since VisualEditor doesn't display anything. Saxlover98 (talk) 17:47, 21 May 2020 (UTC)Reply
Latest comment: 5 years ago2 comments2 people in discussion
I have a template which works fine but generates broken output with raw HTML in VisualEditor.
How to configure my template to have managed output in the VisualEditor? Is there some magic word, function, or wikitext syntax like noinclude, includeonly, etc. ? Czech.Fox (talk) 15:13, 25 May 2020 (UTC)Reply
Latest comment: 5 years ago1 comment1 person in discussion
It would be so useful to restrict edits of wiki table to a data type ie. boolean or date. So sorting would become a lot more reliable and not mucked up by am incorrect entry. 49.198.223.203 (talk) 10:05, 28 May 2020 (UTC)Reply
Latest comment: 5 years ago1 comment1 person in discussion
Is it possible to prevent certain categories from being suggested by the VisualEditor in the categories menu? For example, categories that are supposed to be added by templates, not manually? Garuda3 (talk) 10:04, 29 May 2020 (UTC)Reply
Latest comment: 5 years ago2 comments2 people in discussion
*The git submodule update --init command is vital, as MediaWiki-VisualEditor needs the core VisualEditor submodule to work. If you do not use this command, VisualEditor will fail to work.
Right so you are on shared hosting and this is a requirement. You come to this page looking for a solution on a shared host but then are left right back with a requirement to run a command line. Shouldn't this just say "it is not possible to get visual editing on shared hosting"? WayneGlenton (talk) 10:00, 31 May 2020 (UTC)Reply
Latest comment: 5 years ago1 comment1 person in discussion
Thank you all for your assistance in this issue. Our Current Configuration is:
Component
Version
Mediawiki
1.34.0
Parsoid
11
VisualEditor
0.1.1 (74116a7) 18:02, 23 December 2019
PHP
7.2.31 (apache2handler)
MariaDB
5.5.65-MariaDB
We installed VisualEditor with Parsoid over HTTPS using Stunnel. We have tested Parsoid over HTTPS through Stunnel using CURL. The correct response was received. We have also tested the VisualEditor using CURL. Also, a correct response is received.
Our error is:
Error loading data from server: apierror-visualeditor-docserver-http: HTTP 500. Would you like to retry?
& in the mediawiki debug log.
[VisualEditor] ApiVisualEditor::requestRestbase: Received HTTP 500 from RESTBase (We do not have RESTBase installed. We are a private wiki)
Our current config for Stunnel, Parsoid and LocalSettings is below:
Latest comment: 5 years ago1 comment1 person in discussion
[x] I am using the VisualEditor extension to edit the wikimedia pages
[x] On typing " [[ " the popup shows to add internal and external links to the wikimedia page. This pop has a dynamic height depending on which page it is opened, varying from 80px to 208px.
[x] I searched the php files, but I couldn’t find the related code for the popup window. I also tried to specify the height in CSS files, but it is not doing anything
Latest comment: 5 years ago1 comment1 person in discussion
After way too long troubleshooting VE-Parsoid-LDAP I thought I'd post what finally worked.
We have a private wiki (1.21 on Windows/Apache) that we wanted to upgrade to Ubuntu 20/Apache. I went through the normal migration steps. Relevant version info:
Apache: 2.4.41
MySQL: 8.0.20
PHP: 7.4.3 (php-curl 7.68.0)
MediaWiki: 1.31
VisualEditor REL1_31
Parsoid 0.9.0all (according to the compat matrix VE extension these should work together)
I Installed extension Auth_remoteuser (version REL1_31)
I setup Apache conf for a virtual host with LDAP authentication to our AD and then the relevant line in the <Location> section
Require valid-user
This seemed to break the handoff between VE and Parsoid. Edit source worked fine while invoking VE via Edit threw up this message each time:
"Error loading data from server: apierror-visualeditor-docserver-http: HTTP 500"
[Retry|Cancel]
I tried pretty much every suggestion on the internet, including suggestions about the 500 error on this page, but nothing worked. Debugging with curl statements worked with authentication and -u and without (and no -u). With authentication and the -u option I could see my username getting passed along inside MediaWiki variables.
None of the changes to LocalSettings.php mentioned on the extension page (forwarding cookies) worked. (I didn't try installing NetworkAuth and mapping 127.0.0.1 to the parsoid user. That was probably next.)
Looking at the Parsoid and Apache logs I could see that the request just wanted getting authenticated.
What ended up working for me was to whitelist localhost by adding the line
Require ip 127.0.0.1
just after require valid-user in the Apache conf. After an Apache restart everything came up fine and VE stopped getting a 500 internal error.
NOTE: I'd already tried an "Allow from 127.0.0.1" along with "Satisfy any" but this didn't work for either LDAP authentication or for Parsoid.
Since this was a bit of a frustrating exercise I thought I'd post the solution that worked for me. Any comments about what's going on here would be greatly appreciated. Dmccarty2 (talk) 18:09, 9 July 2020 (UTC)Reply
Latest comment: 5 years ago4 comments3 people in discussion
I can't get the VisualEditor to work on our MediaWiki. Whenever you click 'Edit' you can "see" the progress bar for fractions of a second and then it disappears.
I went through all of the troubleshooting tips of both VisualEditor and Parsoid but nothing has helped so far.
These are my versions:
MediaWiki: 1.34.1
VisualEditor: 0.1.1 (74116a7), downloaded via ExtensionDistributor for MediaWiki 1.34
Parsoid: 0.11.0
Parsoid appears to be working. (For the private wiki I used the workaround to allow read and edit for all users where REMOTE_ADDR is 127.0.0.1).
The browser console has the following output:
jQuery.Deferred exception: target is undefined activateTarget/<@URL/w/load.php?lang=de&modules=ext.visualEditor.desktopArticleTarget.init%7Cext.visualEditor.progressBarWidget%2CsupportCheck%2CtargetLoader%2CtempWikitextEditorWidget%2Ctrack%2Cve&skin=vector&version=8zjxi:8:174
{"name":"parsoid","hostname":"divis-web","pid":11121,"level":30,"logType":"info","wiki":"wiki$0","title":"Hardware","oldId":null,"reqId":null,"userAgent":"VisualEditor-MediaWiki/1.34.1","msg":"started wt2html","longMsg":"started wt2html","levelPath":"info","time":"2020-07-13T06:47:37.813Z","v":0}
{"name":"parsoid","hostname":"divis-web","pid":11121,"level":30,"logType":"info","wiki":"wiki$0","title":"Hardware","oldId":3785,"reqId":null,"userAgent":"VisualEditor-MediaWiki/1.34.1","msg":"completed wt2html in 82.2188150882721ms","longMsg":"completed wt2html in 82.2188150882721ms","levelPath":"info","time":"2020-07-13T06:47:37.885Z","v":0}
The only relevant error in error.log is
[Mon Jul 13 08:38:50.822221 2020] [php7:error] [pid 5488] [client ::1:34172] script '/var/www/html/api.php' not found or unable to stat
But this is probably because I copied your link without adapting it to my setup (...localhost/w/api.php...)
<!DOCTYPE html>
<html class="client-nojs" lang="de" dir="ltr">
<head>
<meta charset="UTF-8"/>
<title>MediaWiki-API-Ergebnis – DIVIS Wiki</title>
<nowiki><script>document.documentElement.className="client-js";RLCONF={"wgCanonicalNamespace":"Special","wgCanonicalSpecialPageName":"ApiHelp","wgNamespaceNumber":-1,"wgPageName":"Spezial:API-Hilfe","wgTitle":"API-Hilfe","wgCurRevisionId":0,"wgRevisionId":0,"wgArticleId":0,"wgIsArticle":!1,"wgIsRedirect":!1,"wgAction":"view","wgUserName":null,"wgUserGroups":["*"],"wgCategories":[],"wgBreakFrames":!1,"wgPageContentLanguage":"de","wgPageContentModel":"wikitext","wgSeparatorTransformTable":[",\t.",".\t,"],"wgDigitTransformTable":["",""],"wgDefaultDateFormat":"dmy","wgMonthNames":["","Januar","Februar","März","April","Mai","Juni","Juli","August","September","Oktober","November","Dezember"],"wgMonthNamesShort":["","Jan.","Feb.","Mär.","Apr.","Mai","Jun.","Jul.","Aug.","Sep.","Okt.","Nov.","Dez."],"wgRelevantPageName":"Spezial:API-Hilfe","wgRelevantArticleId":0,"wgRequestId":"fcdd936fb40936c611d5a78c","wgCSPNonce":!1,"wgIsProbablyEditable":!1,"wgRelevantPageIsProbablyEditable":!1,</nowiki>
"wgVisualEditor":{"pageLanguageCode":"de","pageLanguageDir":"ltr","pageVariantFallbacks":"de"},"wgEditSubmitButtonLabelPublish":!1};RLSTATE={"site.styles":"ready","noscript":"ready","user.styles":"ready","user":"ready","user.options":"loading","user.tokens":"loading","mediawiki.apipretty":"ready","mediawiki.legacy.shared":"ready","mediawiki.legacy.commonPrint":"ready","mediawiki.skinning.interface":"ready","ext.visualEditor.desktopArticleTarget.noscript":"ready"};RLPAGEMODULES=["site","mediawiki.page.startup","mediawiki.page.ready","ext.visualEditor.desktopArticleTarget.init","ext.visualEditor.targetLoader"];</script>
<script>(RLQ=window.RLQ||[]).push(function(){mw.loader.implement("user.options@1wzrr",function($,jQuery,require,module){/*@nomin*/mw.user.options.set({"variant":"de"});
});mw.loader.implement("user.tokens@tffin",function($,jQuery,require,module){/*@nomin*/mw.user.tokens.set({"editToken":"+\\","patrolToken":"+\\","watchToken":"+\\","csrfToken":"+\\"});
});});</script>
<link rel="stylesheet" href="/w/load.php?lang=de&amp;amp;amp;amp;amp;modules=ext.visualEditor.desktopArticleTarget.noscript%7Cmediawiki.apipretty%7Cmediawiki.legacy.commonPrint%2Cshared%7Cmediawiki.skinning.interface&amp;amp;amp;amp;amp;only=styles&amp;amp;amp;amp;amp;skin=apioutput"/>
<script async="" src="/w/load.php?lang=de&amp;amp;amp;amp;amp;modules=startup&amp;amp;amp;amp;amp;only=scripts&amp;amp;amp;amp;amp;raw=1&amp;amp;amp;amp;amp;skin=apioutput"></script>
<meta name="generator" content="MediaWiki 1.34.1"/>
<meta name="robots" content="noindex,nofollow"/>
<link rel="shortcut icon" href="/favicon.ico"/>
<link rel="search" type="application/opensearchdescription+xml" href="/w/opensearch_desc.php" title="DIVIS Wiki (de)"/>
<link rel="EditURI" type="application/rsd+xml" href="https://cloud.divis.eu/w/api.php?action=rsd"/>
<link rel="alternate" type="application/atom+xml" title="Atom-Feed für „DIVIS Wiki“" href="/w/index.php?title=Spezial:Letzte_%C3%84nderungen&amp;amp;amp;amp;amp;feed=atom"/>
<!--[if lt IE 9]><script src="/w/resources/lib/html5shiv/html5shiv.js"></script><![endif]-->
</head>
<body class="mediawiki ltr sitedir-ltr capitalize-all-nouns mw-hide-empty-elt ns--1 ns-special mw-special-ApiHelp page-Spezial_API-Hilfe rootpage-Spezial_API-Hilfe skin-apioutput action-view">
<div class="mw-body" role="main">
<h1 class="firstHeading">MediaWiki-API-Ergebnis</h1>
<div class="mw-body-content">
<div><div class="api-pretty-header"><p>This is the HTML representation of the JSON format. HTML is good for debugging, but is unsuitable for application use.
</p><p>Specify the <var>format</var> parameter to change the output format. To see the non-HTML representation of the JSON format, set <a rel="nofollow" class="external text" href="https://cloud.divis.eu/w/api.php?action=visualeditor&amp;amp;amp;amp;amp;format=json"><kbd>format=json</kbd></a>.
</p><p>See the <a href="https://www.mediawiki.org/wiki/API" class="extiw" title="mw:API">complete documentation</a>, or the <a href="/wiki/Spezial:API-Hilfe/main" title="Spezial:API-Hilfe/main">API help</a> for more information.
</p></div><pre class="api-pretty-content">{
"error": {
"code": "nopage",
"info": "The \"page\" parameter must be set.",
"*": "See https://cloud.divis.eu/w/api.php for API usage. Subscribe to the mediawiki-api-announce mailing list at <https://lists.wikimedia.org/mailman/listinfo/mediawiki-api-announce> for notice of API deprecations and breaking changes."
}
}
I am having this exact same issue. I upgraded to 1.35 (since the Visual-editor documentation seems to have already been migrated towards it) and am getting a super cryptic error that directs me to the mailinglist.
{"error":{"code":"apierror-visualeditor-docserver-http","info":"HTTP 404","docref":"See https://wiki.commishes.com/api.php for API usage. Subscribe to the mediawiki-api-announce mailing list at <https://lists.wikimedia.org/mailman/listinfo/mediawiki-api-announce> for notice of API deprecations and breaking changes."}}
Latest comment: 5 years ago1 comment1 person in discussion
For users that have issue with VE template insertion and templates not being searchable, make sure you are not using the Title Key extension, at least until the bug in that extension is fixed (if it gets fixed). It will cause prefixsearch via Special:ApiSandbox to stop recognizing templates, files etc which can cause issues with other extensions like VE and Template Wizard:
Latest comment: 5 years ago1 comment1 person in discussion
I got Visual Editor, parsoid and mathoid to work, al last.
When you edit a page it works all right.
But when you try to create a page the create tab of Visual Editor does not show. You can create the page with wikieditor or source or whatever, save it and edit it in Visual Editor, but when you are creating the page, the create tab won't show.
Latest comment: 5 years ago1 comment1 person in discussion
I constantly get 403 errors on a private wiki set up using the release candidate 1. If I allow anonymous read access then it works correctly. How do I give parsoid read access now that it's bundled in the PHP itself? 2001:8004:2768:D37:701D:2BB7:E895:5BD8 (talk) 07:15, 1 August 2020 (UTC)Reply
Latest comment: 5 years ago1 comment1 person in discussion
I've got Visual Editor and Template Data installed on my wiki but I'm having an issue with them. I'm not sure which one is causing it.
The template uses a page field. The template fields load, but when searching it's intermittently showing blank text instead of the text of the page. Desbrina1 (talk) 19:51, 4 August 2020 (UTC)Reply
Error contacting the Parsoid/RESTBase server (HTTP 404)
Latest comment: 5 years ago12 comments3 people in discussion
RESOLVED
Reported on phabricator:T261921. Specific to Apache. Solved by adding AllowEncodedSlashes NoDecode in VirtualHost section.
The following discussion is closed. Please do not modify it. Subsequent comments should be made on the appropriate discussion page. No further edits should be made to this discussion.
Installed Mediawiki 1.35 rc2, so new Visual Editor Parsoid PHP.
When I modify an page in the Main namespace, Visual Editor works fine.
But when creating or modifying a page in the User namespace, or when creating a page in the Main namespace, I get the following error: Error contacting the Parsoid/RESTBase server (HTTP 404).
Now reading the extension instructions it doesn't seem that I need to setup a RESTBase server, unless I want to avoid problems when switching between wikitext and Visual Editor.
Been doing some further testing after reinstalling Mediawiki 1.35 rc2, and now the Main namespace works for modifying and creating pages, but the User namespace still doesn't work for either creating or modifying pages with Visual Editor. 185.69.145.64 (talk) 09:32, 27 August 2020 (UTC)Reply
I had a hard time also to configure VE on MW 1.35.0-rc.2, with the error you mentionned when trying to edit a existing page in the main namespace. It turns out that the following line must be in LocalSettings.php:
And the domain in $wgVirtualRestConfig['modules']['parsoid']['domain'] must be the same as the one in $wgServer (but $wgVirtualRestConfig is auto-configured, so this applies only if you explicitely changed it). ~ Seb35[^_^]16:15, 2 September 2020 (UTC)Reply
Seb35, thank you very much for the suggestion!
Unfortunately it doesn't solve the issue I am having. I did try downloading the latest git version of Parsoid and adding that version via `wfLoadExtension( 'Parsoid', "$PARSOID_INSTALL_DIR/extension.json" );` though, as explained here: Parsoid/PHP, but didn't help either. 148.252.133.18 (talk) 17:12, 2 September 2020 (UTC)Reply
I did pinpoint that the error is coming from file ApiParsoidTrait.php line 160:
// error null, code not 200
$this->getLogger()->warning(
__METHOD__ . ": Received HTTP {code} from RESTBase",
<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN"> <html><head> <title>404 Not Found</title> </head><body> <h1>Not Found</h1> <p>The requested URL was not found on this server.</p> <hr> <address>Apache/2.4.38 (Debian) Server at localhost Port 80</address> </body></html>
The page Parsoid/PHP is a bit old given it evolves quickly around this topic with the release of 1.35 (see phabricator:T248186 and linked tasks). In my case I used the tarball, and it seems my issue was different than yours.
Latest comment: 5 years ago1 comment1 person in discussion
How to solve problem?
Error loading data from server: no_vrs: The VirtualRESTService for the document server is not defined; see https://www.mediawiki.org/wiki/Extension:VisualEditor. Would you like to retry? Ss.sss16 (talk) 08:21, 16 September 2020 (UTC)Reply
Moving from node.js to PHP with upcoming MW v1.35 upgrade
Latest comment: 5 years ago3 comments2 people in discussion
I'm currently doing prep for an upgrade to the upcoming v1.35 on a private enterprise wiki. For those of us currently using the node.js version of Parsoid, are there any actions we should be taking once we upgrade to cleanup the node.js setup? Removing the $wgVirtualRestConfig['modules']['parsoid']... from localsettings.php seems logical, as that would seem to be covered by the default setup now. Beyond that, is there anything I should be updating, removing, disabling, etc.?
You may need to do some tweaking on your URL Rewrite if you are using nice short urls.
VisualEditor/PHP will contact wiki/rest.php or w/rest.php when you go into visual editing.
If you are already using rewrites to make nice short URLs, you may find that - your rewrite rule will make the call to rest.php redirect to index.php, which gives a 404.
If you just ignore redirecting call to rest.php, your visual editor will work but cannot load page contents - it is accessing rest.php/yourdomain.name/v3/.... to load the page content, which cannot be ignored by checking rest.php.
The solution is, check the HTTP_USER_AGENT - VisualEditor make its access with UA: VisualEditor-MediaWiki/1.35.0. Add the bold line to every rewrite rules you defined for mediawiki (I'm assuming you are using apache2, tweak this accordingly if you are using other service):
This will not make any rewrite to calls from VisualEditor/PHP and make it successfully access page contents and load it without affect other short URLs.
No other modifications in LocalSettings.php, just remove those restbase settings related to parsoid/JS and you can shut parsoid/JS down.
We are indeed using Apache2 (RHEL7, PHP 7.2.9 - will be upgrading as part of the process), but are not doing any short URLs. Glad to hear I can shut down the JS! Thank you for reaching out! DHillBCA (talk) 18:57, 8 October 2020 (UTC)Reply
but this returns a 404 on my server. Is the above URL the correct call url for VisualEditor and if so, how would I be able to tell nginx to not try and go to that location but pass those parameters to rest.php? 000Tom0000 (talk) 21:45, 25 September 2020 (UTC)Reply
So, i found out that VisualEditor does show and work when trying to create a page that does not yet exist - but it fails when trying to edit a page that exists. D3nnis3n (talk) 17:37, 26 September 2020 (UTC)Reply
Thats a different issue, though. They got the issue on saving. We don't even get that far out-of-the-box. Also looks like an issue for an older beta version and being on hold as well. D3nnis3n (talk) 00:16, 27 September 2020 (UTC)Reply
I can replicate that VisualEditor does show and work when trying to create a page that does not yet exist - but it fails when trying to edit a page that exists. 110.33.200.115 (talk) 02:22, 8 November 2020 (UTC)Reply
I'm able to reproduce the same error on a new installation. Perhaps there's something with the php version of parsoid that needs to be configured? Scripcat (talk) 20:41, 26 September 2020 (UTC)Reply
for the main wiki and all the other wikis of the wiki family (we're using them in subfolders /en, /de, etc.) made the Visual Editor actually open without that error.
For MediaWiki 1.35 and later, YOUR_WIKI_REST_ENDPOINT is the location of your wiki's rest.php. For example, MediaWiki's REST endpoint is mediawiki.org/w/rest.php. See REST API.
VisualEditor/PHP will contact wiki/rest.php or w/rest.php when you go into visual editing. If you are already using rewrites to make nice short URLs, you may find that - your rewrite rule will make the call to rest.php redirect to index.php, which gives a 404.
If you just ignore redirecting call to rest.php, your visual editor will work but cannot load page contents - it is accessing rest.php/yourdomain.name/v3/.... to load the page content, which cannot be ignored by checking rest.php.
The solution is, check the HTTP_USER_AGENT - VisualEditor make its access with UA: VisualEditor-MediaWiki/1.35.0. Add the bold line to every rewrite rules you defined for mediawiki (I'm assuming using apache2, tweak this accordingly if you are using other service):
No. I got too excited. It loads without an error message and it looks fine until you realize it hasn't loaded the actual page's contents. Trying to save any edits will then result in cURL 28 error. Scripcat (talk) 01:22, 28 September 2020 (UTC)Reply
VisualEditor/PHP will contact wiki/rest.php or w/rest.php when you go into visual editing. If you are already using rewrites to make nice short URLs, you may find that - your rewrite rule will make the call to rest.php redirect to index.php, which gives a 404.
If you just ignore redirecting call to rest.php, your visual editor will work but cannot load page contents - it is accessing rest.php/yourdomain.name/v3/.... to load the page content, which cannot be ignored by checking rest.php.
The solution is, check the HTTP_USER_AGENT - VisualEditor make its access with UA: VisualEditor-MediaWiki/1.35.0. Add the bold line to every rewrite rules you defined for mediawiki (I'm assuming you are using apache2, tweak this accordingly if you are using other service):
Anyway, I personally use short URLs. I added the line you suggested in my .htaccess and now I get "Error contacting the Parsoid/RESTBase server (HTTP 403)", instead of "Error contacting the Parsoid/RESTBase server (HTTP 404)" I was getting without it. Costas Athan (talk) 14:17, 3 October 2020 (UTC)Reply
I was getting the same error message (403, not 404) with a standard, out-of-the-box MW 1.35, I'm not using any redirects/rewrite rules that I am aware of. Setting $wgVisualEditorFullRestbaseURL makes VE load, but with no content...
On WM 1.35.0, with an nginx reverse proxy, having a similar issue with error "Error contacting the Parsoid/RESTBase server: http-request-error" when attempting to save VE documents, however I am not even getting a 404 and there is no activity in the NGINX error logs. Source code edits and saves are working without issue. An access to https://debian-guest.lan/rest.php suggests the redirection is correct (i.e., I receive what appears to be a response from the rest service); however https://debian-guest.lan/rest.php/v1/page/Main_Page/html (which I assume is the correct path) results in
messageTranslations: {
en: "Unable to fetch Parsoid HTML" },
httpCode: 500,
httpReason: "Internal Server Error"
One other datapoint: when I create a new page, for the first time, the entire process succeeds using VE through saving and everything. I immediately encounter problems as described above when I attempt to edit the existing page via VE.
One final datapoint: interestingly, when I disable https, everything works exactly as it should with rewrite rules otherwise untouched. Final update, this was due to not setting up the RootCA in the test VM; once that was done everything (finally) works in HTTPS. Leaving this here for future reference by others in case they need minimally working server/LocalSetting configuration.
full (this is a test VM) nginx and LocalSettings.php configs are available at the Pastebin links. Same behavior with with/out the trailing slash in "location /rest.php/" and with "rest.php?$query_string" instead of "rest.php?$args" Bjsdaiyu (talk) 16:15, 25 October 2020 (UTC)Reply
If anyone still struggles with VE 404 error on fresh install (1.36-alpha in my case):
I was able to get my VisualEditor 404s to go away by following a config similar to what 000Tom0000 posted earlier (and is also given on Parsoid#Development ). My setup: I'm using Nginx, MediaWiki 1.35, and I was receiving HTTP 404s on rest.php/* only on https and not http only.
Since my wiki was using a $wgScriptPath (e.g. site), my Nginx config was:
Running Ubuntu Server 20.04, MediaWiki 1.36.1, fresh install VisualEditor error, struggled with problem for couple weeks. Seems MediaWiki out-of-the-box install tends to work better with Apache2 vs nginx. Eventually VisualEditor worked, without errors, by installing additional php components as follows:
I installed all of the modules in this list I was missing and it didn't resolve the issue on my implementation... really a shame, can't deploy this server without a working visual editor. 71.235.161.204 (talk) 19:03, 8 November 2021 (UTC)Reply
I use mw 1.37.1 container image and behind the nginx. My visual editor always got
Visual Editor seems quite broken currently, there is a hell lot of people for which it does not work out of the box or not at all. Hope they will be looking at that soon. D3nnis3n (talk) 19:19, 30 September 2020 (UTC)Reply
Error contacting the Parsoid/RESTBase server (HTTP 415)
{"message":"A Content-Type header must be supplied with a request payload.","error":"no-content-type","httpCode":415,"httpReason":"Unsupported Media Type"}
The exact same setup works on my local machine when running with localhost. Same OS, Debian 10.6. Same packages. The only difference is that this error is when deploying on the AWS cloud.
Could it have anything to do with the base ref having to be localhost on the POST message?
Could it be that it should be http and not https, my EC2 instances only have port 80 open, I believe the load balancer forwards http to the EC2 instances?Edmond Media (talk) 20:40, 1 October 2020 (UTC)Reply
I tied hacking the file /var/www/html/w/extensions/VisualEditor/includes/ApiParsoidTrait.php with the following:
$request['body']['html'] = '<!doctype html><html><head><base href="localhost/w/"><base href="localhost/w/"></head><body><p>Test Text for Test PAGE</p></body></html>';
After a new install, I got HTTP 5xx errors. Based on other suggestions, I added an SSL certificate, but then I got HTTP 415 errors instead. I tried other suggestions, but this seems to have actually worked. OurOakland (talk) 23:40, 8 July 2022 (UTC)Reply
For those who stumble upon this, specifically I changed the URL in $wgServer from http: to https:
## The protocol and server name to use in fully-qualified URLs
Sigh. Not sure what else changed (I've been trying different map extensions), but I'm back to HTTP 500 errors from the Visual Editor. OurOakland (talk) 21:30, 11 July 2022 (UTC)Reply
Narrowed this down to pages that I've added a map to for display by Extension:Maps. For example, if I add {{#display_map:145 Athol Avenue, Oakland, CA|zoom=15}} to a test page using edit source, then I get HTTP 500 errors after that when using the Visual Editor. OurOakland (talk) 22:48, 11 July 2022 (UTC)Reply
I have fixed the error by changing http: to https: in the LocalSetting.php file.
...while replacing YOUR_SERVER_IP with the server's IP address. You can get this using curl, for example:
curl ifconfig.me
Maybe they'll fix it
There is an open ticket for this issue where you can express your opinion on this.
I've just finished upgrading from MW 1.33 to 1.35. I have the following VisualEditor-relevant options in my LocalSettings.php file:
// Enable by default for everybody
$wgDefaultUserOptions['visualeditor-enable'] = 1;
// Set VisualEditor as the default
$wgDefaultUserOptions['visualeditor-editor'] = "visualeditor";
When I try to edit a page, VisualEditor tries to load, but then spits out the following error:
Error contacting the Parsoid/RESTBase server: http-bad-status
Looking in the console, this is error code apierror-visualeditor-docserver-http-error.
I'm not sure what this means but it sounds like not only is something wrong but the error handler is receiving an unsupported status code? Any help appreciated. Chitinlink (talk) 19:05, 2 October 2020 (UTC)Reply
VisualEditor/PHP will contact wiki/rest.php or w/rest.php when you go into visual editing. If you are already using rewrites to make nice short URLs, you may find that - your rewrite rule will make the call to rest.php redirect to index.php, which gives a 404.
If you just ignore redirecting call to rest.php, your visual editor will work but cannot load page contents - it is accessing rest.php/yourdomain.name/v3/.... to load the page content, which cannot be ignored by checking rest.php.
The solution is, check the HTTP_USER_AGENT - VisualEditor make its access with UA: VisualEditor-MediaWiki/1.35.0. Add the bold line to every rewrite rules you defined for mediawiki (I'm assuming you are using apache2, tweak this accordingly if you are using other service):
This will not make any rewrite to calls from VisualEditor and make it successfully access page contents and load it without affect other short URLs. LapisLazuli33 (talk) 09:59, 3 October 2020 (UTC)Reply
My wiki is not set up to have a short URL. My URLs look like this: https://wiki.whatever/index.php/PageTitle
I have the following VisualEditor related options set:
wfLoadExtension( 'Parsoid', 'vendor/wikimedia/parsoid/extension.json' );
$wgGroupPermissions['user']['writeapi'] = true;
// Enable by default for everybody
$wgDefaultUserOptions['visualeditor-enable'] = 1;
// Set VisualEditor as the default
$wgDefaultUserOptions['visualeditor-editor'] = "visualeditor";
The Extension:VisualEditor page as of right now has a banner at the top that says "This extension comes with MediaWiki 1.35 and above. Thus you do not have to download it again. However, you still need to follow the other instructions provided.". The other instructions I need to follow are not exactly clear, honestly...
Further down the page on a section I didn't follow, there's a warning, saying that RESTBase should not be installed on private wikis. Is RESTBase installed on my wiki just by virtue of VisualEditor being bundled with 1.35? Again, I'm getting a RESTBase error when I try to edit pages. Chitinlink (talk) 14:45, 5 October 2020 (UTC)Reply
I've removed the line you mentioned, and confirmed my LocalSettings.php doesn't touch $wgVirtualRestConfig.
As before, I continue to have the same issue: VE loads when creating a new page, but when editing an existing one, throws: "Error contacting the Parsoid/RESTBase server: http-bad-status" Chitinlink (talk) 04:52, 20 October 2020 (UTC)Reply
The "VE can't contact Parsoid/RESTBase" error is rather generic and it mentions two possible causes (choose the one that applies to you). This doesn't mean you have RESTBase installed, and you probably don't. Ciencia Al Poder (talk) 20:21, 5 October 2020 (UTC)Reply
As Technoabyss, I find the description rather confusing. Could you please tell, Ciencia Al Poder, is an additional RestBase installation needed for a 1.35 or not? For me, i am getting an Error contacting the Parsoid/RESTBase server: http-request-error with my 1.35 installation. Actually, this directly points to a missing RestBase but my assumption was that the VisualEditor works out of the box. Aschroet (talk) 18:45, 8 October 2020 (UTC)Reply
...however, if you happen to configure something related to $wgVirtualRestConfig in your LocalSettings (which may be set for other extensions, like math), then MediaWiki will connect only to RESTBase Ciencia Al Poder (talk) 15:34, 9 October 2020 (UTC)Reply
Same exact error for me. That response code , somewhat useless as it is (state what url/port/anything really has failed to be reached, we're clearly getting to api.php, but what is being tried from there?), sounds more like it's trying to reach something at an old location. Have you managed to get any further here? 50.204.98.114 (talk) 21:07, 2 November 2020 (UTC)Reply
I do, my upgrade has been from 1.15 to 1.35, so more prone to issues I'd believe. I'm running the new wiki on fresh 20.04 and fwiw the visual editor worked for saving new pages and editing before I restored and updated the database (without errors).
Being that the error is so vague I want to believe there's something stale or failed in there causing this issue, but mediawiki's debug log doesn't throw any obvious errors. I suppose for now I'm waiting for someone else to figure this out or 1.36. Unless there's someone here who happens to know if update.php doesn't run something needed for the new visualeditor config to work.
If I had any other insight to add, I do get a different error (There is no revision with ID 0.) by editing source on an existing page and moving back to the visual editor, then hitting try again when failed to load. 50.204.98.114 (talk) 21:43, 2 November 2020 (UTC)Reply
Well I got it. For me at least. I had $wgGroupPermissions['*']['read'] = false; set in my LocalSettings.php which appears to cause this. Does this mean the visualeditor is actually a user? If so, what group/user can I allow read permissions to fix this but still keep read limited to groups of my choosing? 50.204.98.114 (talk) 17:39, 3 November 2020 (UTC)Reply
I have this error and I don't have a private wiki. It only shows up for a particularly large page. Most pages are able to be edited properly. Metalliqaz (talk) 20:10, 29 November 2020 (UTC)Reply
I've solved too, like Sidnaught, by adding following lines into LocalSettings.php
Well, I fixed it following the same instructions. We've also got some attention on the issue I opened, so maybe at some point this workaround will no longer be necessary. Chitinlink (talk) 17:12, 1 December 2020 (UTC)Reply
Keep in mind that the fix needs to be at the very end of your configuration, after you've set your other $wgGroupPermissions variables. Otherwise, it'll just get overridden. Jeffrey Wang08:02, 20 April 2021 (UTC)Reply
Hi @Woozle, I saw your recent edit to the summary. I've changed it back to the previous version because specifying the client's browser IP address is incorrect. The reason we use the server's IP is because the server is making cURL requests to itself. Logically, specifying the client's IP doesn't really make any sense either—it stands to reason that if they are editing with VisualEditor, they already have edit permissions. Jeffrey Wang20:21, 11 July 2021 (UTC)Reply
I think perhaps some more explanation is needed, then, because this is inconsistent with the workaround code given:
$_SERVER['REMOTE_ADDR'], which this example uses, is "The IP address from which the user is viewing the current page." i.e. the browser/client
$_SERVER['SERVER_ADDR'] is "The IP address of the server under which the current script is executing."
...so if this works as you say, wouldn't you want to use the latter?
I also verified that Apache is in fact being accessed from my client machine, and not from the machine serving it, by inserting some code into LocalSettings which logs the value of $_SERVER['REMOTE_ADDR']. When I attempted to save a page through VisualEditor, all the IP addresses logged were in fact my client IP, not the server's IP. Woozle (talk) 20:56, 11 July 2021 (UTC)Reply
What I've said is perfectly consistent with the workaround code given, so you'll want to use the former.
When the browser makes requests to MediaWiki, it's authorized to edit using the user's permissions. In this case, it's simple: the browser is the client and the server is the server.
When PHP Parsoid needs to communicate with MediaWiki, it needs to access the MediaWiki API to either read, write, or both. (Not sure how this is exactly done yet in PHP Parsoid, which is why I guess the prevailing solution is to go ahead and grant both permissions.) In this case, Parsoid is the client making the requests to MediaWiki's API, and Parsoid now runs from the same server as MediaWiki. Therefore, in this case, the server is its own client. Apparently, when they released PHP Parsoid, they neglected to test how Parsoid is supposed to access the MediaWiki API if the wiki doesn't allow anonymous read/edit. This is the problem that this code snippet attempts to resolve. Since Parsoid doesn't have a "username" or some sort of API key that gives it special powers to do stuff, I guess this is the workaround that is required for now.
Why does Parsoid need to do internal talking to MediaWiki? Well, there's a lot of stuff that can't be done from the client side. They will need to do their own communication behind closed doors, and the browser is not privy to these communications.
This fix doesn't attempt to provide to fix an access issue for the end user, but rather for Parsoid accessing the MediaWiki API. Nothing is wrong with the browser-web server relationship, but something is wrong with the Parsoid-MW API interface. That's why we don't even consider the browser in this case. Hope that makes sense.
In response to: "When I attempted to save a page through VisualEditor, all the IP addresses logged were in fact my client IP, not the server's IP."
I'm assuming this is the Apache access log. What endpoint is logged as being accessed?
I would like to note that using the server IP, not the client IP, has worked for the rest of the commenters and the hundreds of wikis at MyWikis using VisualEditor. Please elaborate on how it would be possible to allow all client IPs to edit without allowing IPs not yet logged into MediaWiki. Jeffrey Wang00:14, 12 July 2021 (UTC)Reply
Okay, I think I understand what you're getting at: when dealing with Parsoid internal API requests, the server acts as the client.
I think I was confused because this doesn't match the behavior I'm seeing -- but it's possible there are other reasons for that: from what I can tell, the rest.php entry-point is (for some reason) rejecting requests from my browser (returning a 404 or 405 in its JSON response, depending on what is sent), so possibly the code never gets to the point where Parsoid makes its internal request, and therefore I don't see those requests in my logs.
I'm abandoning this issue for now as being non-critical-path, but I may get back to it at some point if it's not fixed upstream soonish.
After everything in this thread failed. I was able to fix this by fixing my nginx config to allow path arguments to the rest.php script (wiki/rest.php/path/arguments)
Note that XXX must be the server address as seen when it creates outgoing requests to itself. It may be 127.0.0.1 and not a public IP, depending on how it's configured Ciencia Al Poder (talk) 08:48, 24 December 2021 (UTC)Reply
This is the at-the-end-of-LocalSettings.php workaround that worked for me:
# To be added at the very bottom of /opt/meza/src/roles/mediawiki/templates/LocalSettings.php.j2 to allow VE to work in 35.x when meza_auth_type is "viewer-read" and apache is 100% localhost behind an SSL terminator/load-balancer/proxy front-end (like haproxy)
# Define and calculate "remote_ip_test" based on hierarchy of what we know about the requestor's origin from the request header
# Result: "remote_ip_test" is 127.0.0.1 if-and-only-if it is truly an internal server-side request
if (!empty($_SERVER['HTTP_CLIENT_IP'])) { $remote_ip_test = $_SERVER['HTTP_CLIENT_IP']; }
elseif (!empty($_SERVER['HTTP_X_FORWARDED_FOR'])) { $remote_ip_test = $_SERVER['HTTP_X_FORWARDED_FOR']; }
elseif (isset($_SERVER['REMOTE_ADDR'] ) ) { $remote_ip_test = $_SERVER['REMOTE_ADDR']; }
# If the request is truly an internal server-side request, then open the wiki up for full access
if (isset($remote_ip_test) && $remote_ip_test == '127.0.0.1') {
$wgGroupPermissions['*']['read'] = true;
$wgGroupPermissions['*']['edit'] = true;
$wgGroupPermissions['*']['writeapi'] = true;
}
I've tried everything on this page that I could and so far nothing is working for existing pages. The visual editor loads for new pages but dies with the error on existing pages. This is after a new install and XML import of a previous wiki.
I have my wiki behind a pfSense box, so it has a public ip on 1:1 NAT to a private IP. I've obviously tried the code at the top of this page with public, private, and local loopback 127.0.0.1 addresses, but to no effect. I've also tried Revansx's code as well. I'm running Ubuntu 20.04 and apache2.
curl ifconfig.me shows my public IP, while ip a shows my private and local loopback IPs.
Any other ideas on what could be preventing this from working for me?
If you are experiencing this problem only on existing pages, but are able to create a new page and add a heading/paragraph and save it again, the problem may be a glitch in the wiki formatting itself.
In my case after switching from the basic code-only editor to VisualEditor, any page that included a preformatted textblock that itself also contained URLs seemed to throw this error. I removed the offending block(s) and replaced them with INSERT → MORE → CODE BLOCK and the problem went away.
I did not have to alter any other permissions or options even with a private wiki, it was just an odd parsing/content issue with some preformatted blocks. I have nothing special in LocalSettings.php, the following works fine (for private):
My private wiki (v1.35) runs in an AWS VPC and is exposed by an ALB (Application Load Balancer). The only way I could get this to work was to use the ALBs private IP addresses rather than the servers IP address. This is obviously a problem. Since all traffic is coming from the load balancer every request is made to the server with these IPs. Is there a way for me to configure the host that Parsoid uses to make its requests?
Regardless of whether or not the wiki is private it seems ridiculous that I can't use a loopback to avoid network overhead, these requests should not have to leave my network if they are being made against my server.
I am having a hard time finding any substantial documentation for configuring Parsoid. The "Installation" section of the main page says "No configuration necessary if used on a single server.", but then doesn't provide any information about what configuration would be necessary if in a multi-server environment. Most of the information on that page seems to be targeted towards people developing Parsoid, not people using it.
What am I missing?
I found the following but I haven't been able to get it to work for me. I would rather not go down the path of creating a separate Parsoid server.
$wgVirtualRestConfig['modules']['parsoid'] = array(
// URL to the Parsoid instance.
// You should change $wgServer to match the non-local host running Parsoid
'url' => $wgServer . $wgScriptPath . '/rest.php',
// Parsoid "domain", see below (optional, rarely needed)
// 'domain' => 'localhost',
);
I tried using this to get Parsoid to stay within the server but no luck so far. It says "non-local host" but I am hoping I can trick it into calling itself locally using the loopback. I will probably have to dig into the code to figure how this actually works and if what I am trying to do is possible. Ajmichels (talk) 20:20, 10 March 2022 (UTC)Reply
I had a problem with mediawiki (v.138) in private wiki in AWS with an ALB.
The configuration of apache was only listening in 80 port. LoadBalancer end TLS connection and send conection to port 80 in Apache
When I try to open Visual Editor I was obtein "Parsoid/RESTBase server: http-bad-status"
I only get the "Error contacting the Parsoid/RESTBase server: http-bad-status", if I am using "nested" or structured pages.
It works for pages like TestPage, VideoCut, BestPractices (so "level 1") but not for pages like TestPage/Test1, TestPage/Hugo (so "level2").
When looking at the webserver (e.g. apache2) log files, it seams the rest.php URL is not build correctly.
In the good case the build rest.php send the following POST request:
POST /wiki/rest.php/localhost/v3/transform/html/to/wikitext/TestPage/12 HTTP/1.1" 200 521 "-" "VisualEditor-MediaWiki/1.38.2"
In the bad case the request looks like:
POST /wiki/rest.php/localhost/v3/transform/html/to/wikitext/TestPage%2FTest1 HTTP/1.1" 404 981 "-" "VisualEditor-MediaWiki/1.38.2"
It ends-up in a 404 instead of a successful 200. The problem seams to be the coded %2F (/) inside the Page-Path (TestPage/Test1 -> TestPage%2FTest1). Fmherschel (talk) 08:43, 16 July 2022 (UTC)Reply
Your web server is (incorrectly) URL-encoding the page portion of the URL, as if it were a URL parameter instead of a full path. Take a look at your rewrite rules or whatever configuration you have to handle /wiki/rest.php requests and configure it to not encode them. Ciencia Al Poder (talk) 10:08, 16 July 2022 (UTC)Reply
I am a bit confused, because I did not activated any re-write of URLs, because I did read in this forum already that this is not a good idea or at least needs to be configured in a proper way.
During my research I found that mod_rewrite is doing URL rewrites for apache2. I tried the following scenarios:
Still have de-activated mod_rewrite (-> still get the error)
Activating mod_rewrite but having 'RewriteEngine off' in the wiki root directory (.htaccess) (-> still get the error)
This is related to editing SubPages with VisualEditor, running on a Bitnami Wamp Stack on Windows 10. When you try to edit a page which title has a subpage like MyPage/MySubpage, than the error "Error contacting the Parsoid/RESTBase server (HTTP 404)" starts to happen if using VisualEditor, but don't happen when using Source Editor.
Update:
After checking possible solutions at StackOverflow (), I added a parameter to Apache conf. Specifically on the Bitnami installation folder:
I then started requesting the visual editor URL in a new tab, incrementally subtracting query parameters until I discovered that leaving off the json query parameter gives me a proper error output as expected from the debug options which were previously enabled.
(http obfuscated to evade spam filter) hxxp://<your domain>/api.php?action=visualeditor&format=json&paction=parse&page=Main_Page&uselang=en&formatversion=2
In other words, at some point I got to format=json, removed it, reloaded and got the following output:
I was using Docker, and I needed to install bcmath.
In docker, first you enter the Docker container (named "mediawiki" in my case, you may have a different name, or even a hashed id) and start a shell inside it like so:
docker exec -it mediawiki /bin/bash
Then, you install bcmath, like so:
docker-php-ext-install bcmath
Then, you exit, and you restart the container, like so:
docker restart mediawiki
Visual editing now works. This was necessary for me, because my Docker image runs on ARM 32-bit.
Note that e.g. x86 Ubuntu users running php 7.4 can install the package with:
Unless you provide all the steps you've tried to solve the problem (listed on this thread), the server software used and your configuration, nobody is able to help you to solve the problem.
Now this is really driving me nuts. When I create an article and edit it with the Visual Editor, everything works fine. BUT when I use in the article the word ".htaccess" (literally), this triggers the "Error contacting the Parsoid/RESTBase server (HTTP 403)". When changing ".htaccess" to "htaccess" (without period), everything works again as expected. Woot?! O.o Anyone else experienced this issue? ZelulaX (talk) 09:18, 18 November 2022 (UTC)Reply
VisualEditor fails with HTTP 403 errors on NameCheap hosting with Apache
Latest comment: 5 years ago4 comments3 people in discussion
RESOLVED
NameCheap uses Apache. HTTP 403 there is triggered by ModSecurity.
Contact support to resolve these security issues. Whitelisting / turning off ModSecurity can help.
The following discussion is closed. Please do not modify it. Subsequent comments should be made on the appropriate discussion page. No further edits should be made to this discussion.
I recently encountered this issue when deploying MediaWiki 1.35 + VisualEditor onto Namecheap Shared Hosting which uses Apache.
If you experience this error when attempting to save a page, it is likely that ModSecurity has triggered a warning. In order to resolve this issue I simply had to contact Namecheap support and request that they whitelist the security rules that were being triggered on my site, since then I have been able to use VisualEditor perfectly fine. Csharries (talk) 20:40, 5 October 2020 (UTC)Reply
Hello. I too am on Namecheap shared hosting (Apache). It is quite frustrating that everyone talks about this out-of-the-box issue, but there seems to be no clear solution. Would you be able to share your ticket number with me please (email?), so that I can try reaching out to namecheap, asking them if they can apply that fix for me? Rehman03:54, 9 October 2020 (UTC)Reply
Hello @Csharries, I cannot thank you enough for sharing the above. You are right. I did contact Namecheap and their ModSecurity WAF was the cause of the issue. Once they turned it off on all my test domains/subdomains, VE worked.
I cannot seem to create or edit in [at least] the User namespace though, but I guess that is a VE setting.
I doubt I'd be able to resolve this issue if you hadn't posted the above comment. So, thank you again.
For anyone wanting to contact Namecheap for the same issue, you may quote the ticket number QSE-776-10867. For others, just see if your hosting service have ModSecurity or another WAF enabled, and if they could turn it off (at least temporarily) for you to test.
Latest comment: 5 years ago2 comments2 people in discussion
On a fresh MediaWiki 1.35 install, I'm getting this error when I attempt to edit a page with the Visual Editor. With $wgDebugLogFile enabled, I get this in the log:
We upgraded wo MediaWiki 1.35 and can now use Visual Editor that comes built into MediaWiki. Everything works fine except when the page has Media: links, e.g. links to PDF files.
When editing a page with Media: links, the links are replaced by index.php?title=Media:.... on save even when the links themselves are not edited. If I try to edit the links, very strange things happen. If I create a new link Media:Link.pdf in the link editor, the link changes to =Media:link.pdf, or it just changes to a red link to the text of the link and the link itself is lost. Sometimes it cuts the word media to edia:Link.pdf. In all cases, the links are broken.
I could not see errors in the debug log.
Mediawiki is installed on a subdomain root, and all standard mediawiki features have worked fine for years.
Latest comment: 5 years ago3 comments2 people in discussion
RESOLVED
In my case, the issue was caused by the ModSecurity WAF used by Namecheap. Once they turned it off, VE worked.
The following discussion is closed. Please do not modify it. Subsequent comments should be made on the appropriate discussion page. No further edits should be made to this discussion.
Hello. After unsuccessfully searching for the answer, I decided to ask this here.
It seems like a number of wiki owners cannot get VisualEditor running out-of-the-box in MW 1.35.
Is this a known problem, and has a solution been shared anywhere?
Do go through that ticket again now. Most users have been able to get their installs working. But, based on the email thread and the other namecheap thread, it looks like you need to manually configure your private wiki usecase and also figure out namecheap issues. SSastry (WMF) (talk) 14:38, 15 October 2020 (UTC)Reply
Thank you for commenting. In my case, the issue was caused by the ModSecurity WAF used by Namecheap. I will share more details on the other threads. Rehman03:46, 17 October 2020 (UTC)Reply
The discussion above is closed. Please do not modify it. No further edits should be made to this discussion.
Error contacting the Parsoid-/RESTBase-Server (HTTP 403)
Latest comment: 4 years ago8 comments7 people in discussion
I do get the error "Error contacting the Parsoid-/RESTBase-Server (HTTP 403)", as soon as I want to edit with Visual Editor. As long as I work with the source code, everythings fine.
I recently updated from MediaWiki 1.34 to MW 1.35, my wiki is not private and i run the website via cPanel/NameCheap. As I could not find any solution to my problem in the past week, i am now hoping to find help in this forum.
As I am a noob to wikimedia, i installed no extensions (except VisualEditor via MW 1.35) and the only additions i wrote into my localsettings.php are the following:
wfLoadExtension( 'VisualEditor' );
$wgGroupPermissions['user']['writeapi'] = true;
$wgVisualEditorParsoidAutoConfig = true;
These changes are the result of my former investigation. Without these VE is not shown as an option to edit my wiki.
Furthermore, the Insert-options i get by editing via VisualEditor are only for tabulars, images and comments. Options for inserting formulae or graphs are missing. As i want to insert mathematical equations, please tell me how to get this option into my VE.
I am putting this out more widely as an answer to this issue as I had a LOT of trouble resolving it. Basically, on some (cPanel) hosted sites the Parsoid/RESTBase Server API communications are blocked by several ModSecurity rules. I had to contact my hosting tech support and get them to whitelist rules for my wiki one or two at a time, while generating new ModSecurity rule errors by attempting to edit using VisualEditor until we had found all the rules which were resulting in this error. NB: At some point during this process a few pages might start working - not throwing a 403 - but then test a few more pages as they might still trigger ModSecurity.
In my case the problem disappeared, when I removed the .htaccess file from the root folder of the server, which just allowed access from a specific IP address. GordonBernstein (talk) 20:28, 24 June 2021 (UTC)Reply
Latest comment: 5 years ago2 comments1 person in discussion
Hi all, can I turn off the notice "You have followed a link to a page that does not exist yet. To create the page, start typing in the box below (see the help page for more info). If you are here by mistake, click your browser's back button" I get when editing a new page. We have developed our own skin and now just want a blank page after clicking "Add new page", without a notice. It is unclear to the user, he/she just want to type text in a new page. Waanders (talk) 13:59, 16 October 2020 (UTC)Reply
Latest comment: 5 years ago1 comment1 person in discussion
Hi there! Can someone let me know how to switch off VisualEditor on mobile version of my site? (I use MobileFront end extension) Fokebox (talk) 16:53, 16 October 2020 (UTC)Reply
VisualEdit on ssl return error "Parsoid/RESTBase server: (curl error: 60)"
Yes same here on my test MediaWiki installation which is protected by a basic auth for the whole virtual host in nginx. If I delete the basic auth, everything is working fine. But I think there should be a way to use MediaWiki and VE behind a basic auth???
I also want to use MediaWiki behind a Basic Auth (in my case haproxy), and I am running into the same problem.
Is there any other possibility to use the VisualEditor with MediaWiki, behind Basic Auth? As "82.120.36.23" says, it's a security hole, you just need to change your user-agent to VisualEditor-Mediawiki/* and you can access the Wiki without any authentication. 193.80.211.83 (talk) 07:51, 21 June 2021 (UTC)Reply
Latest comment: 5 years ago1 comment1 person in discussion
The following discussion is closed. Please do not modify it. Subsequent comments should be made on the appropriate discussion page. No further edits should be made to this discussion.
Hello!
I just switched from MediaWiki 1.34 to 1.35, installed on Ubuntu Server 20.04, equiped with PHP 7.4, MqSQL 8 and Apache 2.4.46.
Everything went fine except Extension:VisualEditor. There were two troubles that took me about 3 hour and I decided to share this experience:
Initially VisualEditor didn't worked at all. When I did press the Edit button nothing happens.
I've solved this issue by removing extensions/VisualEditor and then install it again.
Editing of Sub Pages wasn't possible. I was receiving: "Error contacting the Parsoid/RESTBase server (HTTP 404)" each time.
I've solved this issue by adding the directiveAllowEncodedSlashes On within the Apache's VirtualHost configuration.
Latest comment: 3 years ago2 comments2 people in discussion
We have a private Wiki (updated drom 1.34 to 1.35) for our company (and I'm sure many companies have) which means:
- pages only visible for logged in users
- users are automatically logged in via Windows authentication
(To complicate things a bit more, we are using an IIS server which seems to do things a bit different.)
When I'm trying to use VisualEditor "out-of-the-box" I ran into some problems when editing a page:
- Parsoid/RESTbase Error 401 - because VisualEditor seems to run as Anonymous user (no wiki user problem) or user has no rights for folder
- when I disable Windows authentication and login manually as some user I get error 403.
I already did some recommended tuning like "forwardcookies" but without success. (I also set correct userrights like writeapi etc.).
So I think we really need a detailed instruction (or checklist) how to config MediaWiki 1.35 for using VisualEditor in private wikis.
Thanks in advance,
Marcel
PS: Which wiki folder does VisualEditor try to access when I'm running into the 401 error? It seems the Windows authentication of the logged in user is not passed to the IIS when trying to load VisualEditor. 80.152.132.238 (talk) 13:31, 2 November 2020 (UTC)Reply
Having a similar problem. After I implemented Windows Authentication, Visual Editor broke. Using Win2016, IIS, MediaWiki 1.35.5, PHP 7.4.13. Visual editor was working with recommended modifications to LocalSettings.php file. Then I turned on Windows Authentication and URL Authorization rules, and Visual Editor broke again. Gregzme17 (talk) 17:09, 17 March 2022 (UTC)Reply
Latest comment: 5 years ago1 comment1 person in discussion
I cannot find a document about how I can create my own extension using the VisualEditor.
My extension is very simple.
When "<mytag>" is shown in the EditPage, I replace with the different present.
When "<mytag>" is shown in the ViewPage, I replace with another text.
Basically, I'm hiding the original content encapsulated by "<mytag>"
It works well in "Edit Source" tag.
However, when it enters "Edit" as the VisualEditor, it shows like ViewPage, but when I click the text encapsulated by "<mytag>", it pops up the "Edit" with the original text. I want it to be the text like in EditPage in the "Edit Source" mode.
I wish there is a VisualEditor document for other extension for "Edit", "View", and "Save", but couldn't find it yet.
Latest comment: 5 years ago1 comment1 person in discussion
On clean 1.35 wiki with last version of VisualEditor, when you try to open it from moible through Chrome 86 - last version Chrome for Android - pops up a warning "You use borwser, oficially not supported by this editor". The text can be not excactly that because I user Russian local and just translated. Theme Timeless.
Latest comment: 5 years ago1 comment1 person in discussion
I'm having trouble with VisualEditor when I attempt to convert to markup. I can load the editor, and use it normally. However, when I attempt to save the page, or when I attempt to switch to source editing, I receive the following error box:
Something went wrong
[efc7a9f068c2562546e9c149] Caught exception of type Error
The bracketed hex string varies, even performing the same task (switch editors/save). Obviously, the varying hex string and vagueness of the rest make tracking down the issue difficult. Any ideas? Meltybits (talk) 14:53, 21 November 2020 (UTC)Reply
VisualEditor not compatible with SyntaxHighlight extension
Latest comment: 5 years ago9 comments2 people in discussion
I recently installed 1.35 and enabled VisualEditor. I am able to create/edit pages using the VE with the exception of anything that uses the SyntaxHighlight extension-- these pages won't even load. If I disable VE, I do not have this issue. Is anyone else experiencing this? JGTompkins (talk) 17:10, 15 December 2020 (UTC)Reply
Do you have the correct version of the SyntaxHighlight extension? The two extensions interact, but if you're using mis-matched versions they might well break like that. Jdforrester (WMF) (talk) 17:55, 15 December 2020 (UTC)Reply
Don't know if this adds any information, but when I go to save a new page that tries to use syntaxhighlight, I get "The server did not respond within the expected time." JGTompkins (talk) 14:58, 16 December 2020 (UTC)Reply
More information: Access log shows http 500 error when trying to load pages using the syntaxhighlight extension or when saving a new page that tries to use the extension. JGTompkins (talk) 18:45, 17 December 2020 (UTC)Reply
I have the same precise issue: an edited Table not letting me save whereas a blank table saves.
Internet has not been helpful so far. I may copy and paste my text cell by cell onto a new page, and save after each paste, to see if I can isolate what aspect of the Table is causing the error. 24.231.18.174 (talk) 22:40, 25 January 2021 (UTC)Reply
UPDATE: What a weird anomaly. I narrowed it down to parentheses and/or the underline code <u></u>.
From the source editor:
(<u>…</u>) and (<u>…)</u> saves just fine, whereas
<u>(…)</u> or <u>(…</u>) crashes the save, giving me an error "The server encountered an internal error or misconfiguration and was unable to complete your request."
When I create this syntax with the VisualEditor, then I get the HTTP 500 error like noted above, plus cannot switch to the source editor, which gives off this error: "Error loading data from server: Error contacting the Parsoid/RESTBase server (HTTP 500)."
Hitting the back button and shifting the left parenthesis outside <u> allows the page to save just fine.
However, if I attempt to simply de-underline from the VisualEditor (Command+U), the RESTBase error still pops up. So maybe de-underlining isn't removing the <u> code on the source side?
Regardless, it appears an open-ended left parenthesis (, with or without underlining, is the culprit for me.
*NOTE: Oops, forgot one detail: the underline code is inside the table. I just tested the <u>(…)</u> code outside the editor: when applied via the VisualEditor with COMMAND+U, it saves; when this code is pasted inside the source editor, it crashes the save, taking me to "The server encountered an internal error…"
VisualEditor works fine with https directly to Apache. However, with Hitch and Varnish in front of Apache we get this error message on trying to save an edit: "Error contacting the Parsoid/RESTBase server: http-bad-status". Hitch and Varnish work OK, at least things get cached. Hitch listens on port 443, Varnish listens on ports 80 (from web) and 8443 (from Hitch), Apache listens on port 8080 (from Varnish).
When I do "systemctl status hitch" after I have tried saving a VE edit, it lists two entries like this: "{backend} Socket error: Connection reset by peer". What could be the reason for this problem? Any help would be much appreciated. Henryfunk (talk) 10:32, 19 December 2020 (UTC)Reply