Topic on VisualEditor/Feedback

Error contacting the Parsoid/RESTBase server (HTTP 404)

38
Costas Athan (talkcontribs)

I just updated to MediaWiki 1.35.0 yesterday.


Whenever I try to edit a page using the visual editor a progress bar starts to load and near the middle of the process the progress bar stops to fill itself and I get the message:

"Error contacting the Parsoid/RESTBase server (HTTP 404)"


I'm on shared hosting and I'm not running a RESTBase server, but from what I get it's not mandatory (https://www.mediawiki.org/wiki/Extension:VisualEditor#Switching_between_Wikitext_Editing_and_VisualEditor). I have set $wgVisualEditorAllowLossySwitching=false, by the way.


The wiki also has $wgGroupPermissions['*']['edit'] = false.

Any ideas?

Duhuh54 (talkcontribs)

If you set $wgGroupPermissions['*']['read'] = true, it might work.


I am in the same situation except that I want a to have $wgGroupPermissions['*']['read'] = false

2001:16B8:107E:2C00:D5D:F0B1:B7F0:FB51 (talkcontribs)

The documentation of VisualEditor sadly is still lacking. I am having the same problem, but there are no hints on how to fix this.

Costas Athan (talkcontribs)
Kachkaev (talkcontribs)
Costas Athan (talkcontribs)
41.138.70.210 (talkcontribs)

I am having the same issue.

This post was hidden by Costas Athan (history)
Awatkins1966 (talkcontribs)

Having the same problem. It seems that the option to make it a private wiki (need to login, University Intranet) causes it to get the error and fail:

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

The fix at the moment is to check via IP address, but that isn't going to work for me. Is there anything which I can add to LocalSettings.php which checks for Logged In user?

95.49.16.233 (talkcontribs)

When mediawiki 1.35 (from debian buster-backports) is behind reverse proxy, visualeditor does not work correctly because it does not use $wgInternalServer but uses $wgServer to make internal rest requests which is wrong (internal traffic should not travel to external). Please fix visualeditor logic to use $wgInternalServer for internal api calls.

Amglez (talkcontribs)

I am having the same isue. With a peculiarity. As I upgraded my wiki to 1.35, the old pages can be edited with VisualEditor, no problem, the new ones give me this 404 error (parsoid etc.).

Costas Athan (talkcontribs)
UGOBOSS777 (talkcontribs)

Any news on this?


I still can't save using VisualEditor, always getting that "Error contacting the Parsoid/RESTBase server (HTTP 404)".


My wiki is private and I need to keep it this way. Any workaround?

Hcadby (talkcontribs)

Having the same issue, using Mediawiki 1.35.1 on redhat. anyone got any solutions.

133.9.37.44 (talkcontribs)

same.

24.104.66.82 (talkcontribs)

Same, I've been searching for 20 hours now without a solid fix for this T_T

Robertgarrigos (talkcontribs)

I had this same problem. I fixed it by redirecting the default apache virtual site to my wiki directory.

85.65.48.171 (talkcontribs)

Same problem. I'm using private MediaWiki 1.35.1 with Nginx on Ubuntu server.

85.221.138.32 (talkcontribs)

Same, Ubuntu and Nginx.

73.143.16.93 (talkcontribs)

I get this error strictly when editing a page whose name contains a slash or other problematic character.

Ruut (talkcontribs)

Me too, I use slashes because of the mediawiki's subpages feature. Pages which have a slash give the error. All other pages work fine.

EelcoJD (talkcontribs)
Awatkins1966 (talkcontribs)

I had hopes it would work, but no.

Clarify I have:

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

$wgNamespacesWithSubpages was not set at all, but I added it "$wgNamespacesWithSubpages[NS_MAIN] = true;" but no difference.

Added:

<VirtualHost ....>

AllowEncodedSlashes NoDecode


Could it be related that wgNamespacesWithSubpages was not set?

Will have another play to double check. Has anyone else got it working?

Cheers

Awatkins1966 (talkcontribs)

Well, I moved the wiki to another system and it does work so it looks like "AllowEncodedSlashes NoDecode" may solve the problem. Guess my real site has some other coding which is messing it up. I don't think it is in apache.conf files so will have a closer look at any .htaccess files which may be read...

Awatkins1966 (talkcontribs)

Not seeing anything which could be change the "AllowEncodedSlashes" option. Our web server is behind a load balancer is there any chance that may be it? Is there away of test if AllowEncodedSlashes is working?

Awatkins1966 (talkcontribs)

Got it working...

I decided to start fro scratch building a new website and after a waste of a day. I spotted the problem. Yes you need "AllowEncodedSlashes NoDecode" but you also need the php "extension=curl.so"

Since I like to keep our external web server as secure I possible I disables curl a long time ago, which is fine except VisualEditor seems to require it..

Thanks for all your help...

Asphorm (talkcontribs)

[Solved in my case] For those who have still problems with the Parsoid:

I have recognized that the Visual Editor may have problems with short urls. If I set the variable "$wgArticlePath" properly, the Visual Editor didn't work. For this reason I have developed a concept to activate short urls for standard users (read-only) and to use full urls for users which may work with the Visual Editor.

Hope it helps somebody!

GianniFabbris (talkcontribs)

Thanks Asphorm .... ken you explay: "to activate short urls for standard users (read-only) and to use full urls for users which may work with the Visual Editor." ... How, please?

Pawel Niemczuk (talkcontribs)

Hi, @Asphorm:. That's exactly why I'm here now - short URL's and VE. Could you pls be as kind as to explain your solution more accurately? Thanx in advance! Pawel Niemczuk (talk) 02:40, 5 April 2021 (UTC)

Freibeuter10 (talkcontribs)

What if my web host service only runs Apache2 2.4 which has no NoDecode option (see 2.4/mod/core.html#AllowEncodedSlashes).

Arunzzz (talkcontribs)

I had the same error. And I have noticed the error occurs only when the $wgScriptPath variable have a value

Anthrazit68 (talkcontribs)

I've an issue with a specific page where this error occured.

The reason was that there was a forward slash (/) in the name of the page, the visual editor didn't like that. After changing the name of the page, the page could be edited again.

158.248.4.234 (talkcontribs)

Witam, po instalacji wiki na serwerze ct8.pl również wyświetla mi komunikat przy próbie edycji danej strony, tj: Error contacting the Parsoid/RESTBase server (HTTP 404), przy tworzeniu nowej strony na wstępie edytor działa.

88.153.234.100 (talkcontribs)

The error occurs after including a template once. means if the page uses or has used a template (doesn't matter how I included: subst:, template:), I can't switch to the VE anymore.

Not using templates no error

Ciencia Al Poder (talkcontribs)

Your issue with templates may be caused by mod_security, in case it detects template syntax as something sneaky.

See errors and symptoms.

88.153.234.100 (talkcontribs)

Gracias, good advice, i will try

Rp (talkcontribs)

I'm not sure whether this is the same issue, but we've had to exempt Parsoid from access restrictions in LocalSettings.php. In our case, it looks like this:

function client_is_parsoid() {
  return ($_SERVER['REMOTE_ADDR'] ?? '') === \gethostbyname('parsoid');
}

[...]

$wgGroupPermissions['*']['read'] = [...] || client_is_parsoid());

Your criterion for identifying Parsoid may differ, but this is the basic idea.

Reply to "Error contacting the Parsoid/RESTBase server (HTTP 404)"