Page MenuHomePhabricator

VisualeEditor: Error contacting the Parsoid/RESTBase server (HTTP 404)
Open, Needs TriagePublic



  • MW 1.35
  • VisualEditor REL_1_35

If one wants to use VisualEditor with a short URL like e.g. you will get "Error contacting the Parsoid/RESTBase server (HTTP 404)" Once you add an URL particle (not sure how to call it) like page as in e.g. everything works as expected. Thus it appears that currently having this URL particle is required.

works for

<IfModule mod_rewrite.c>
        RewriteEngine on

        RewriteRule ^/?page(/.*)?$ %{DOCUMENT_ROOT}/mediawiki/index.php [L]
        RewriteRule ^/?$ %{DOCUMENT_ROOT}/mediawiki/index.php [L]

does not work

<IfModule mod_rewrite.c>
        RewriteEngine on

        RewriteCond %{DOCUMENT_ROOT}%{REQUEST_URI} !-f
        RewriteCond %{DOCUMENT_ROOT}%{REQUEST_URI} !-d
        RewriteRule ^(.*)$ %{DOCUMENT_ROOT}/mediawiki/index.php [L]

Perhaps some extra voodoo is to be added to the rewrite rules to also make something like possible but I do not know what it could be.

Created this report to make you aware however I suspect that this may be a dupe already.

Event Timeline

Kghbln created this task.Dec 17 2020, 11:48 AM
Restricted Application added a subscriber: Aklapper. · View Herald TranscriptDec 17 2020, 11:48 AM
Kghbln updated the task description. (Show Details)Dec 17 2020, 11:49 AM
Kghbln updated the task description. (Show Details)
Kghbln updated the task description. (Show Details)Dec 17 2020, 11:51 AM
Orribu added a subscriber: Orribu.Wed, Dec 30, 4:56 AM

I'm also having this issue. I've tried the troubleshooting steps provided on the extension page, but to no avail. I think my wiki is a private wiki...don't know if that has anything to do with the issue.

Orribu added a comment.Tue, Jan 5, 9:02 AM

I did some snooping on my end; had a fresh install of Mediawiki 1.35.1 ready to go. Visual Editor works right out the box, but as you said, the second you shorten the link, everything breaks and we get a 404. I found that editing my .htaccess file didn't do anything, but the second I added

$wgScriptExtension = ".php";
$wgArticlePath = "/$1";

everything broke. I don't know what we're missing...

Kghbln updated the task description. (Show Details)Tue, Jan 5, 9:09 AM
Kghbln added a comment.Tue, Jan 5, 9:15 AM

@Orribu Thanks for confirming that you have this issue too. $wgArticlePath is fine for this kind of short URLs. PS You can safely remove $wgScriptExtension since this parameter does no longer exist since MW 1.27 or so.

Orribu added a comment.EditedTue, Jan 5, 9:23 AM

@kghlbn Thank you for the follow-up and the tip! I've removed $wgScriptExtension from LocalSettings.
I'll keep an eye on this space for any updates!