Open-CSP / FlexForm

MediaWiki extensions : HTML5 Form renderer
https://www.mediawiki.org/wiki/Extension:FlexForm
5 stars 4 forks source link

Use wfExpandUrl to accommodate for non-null ArticlePath settings #26

Closed Bovine-collab closed 1 year ago

Bovine-collab commented 1 year ago

The code currently redirects users to server/index.php/pagecreatename. When using a MediaWiki instance which uses /wiki/ as an article path, this may lead to problems. This is fixed by letting MediaWiki generate the full url for you, using wfExpandUrl.

Designburo commented 1 year ago

Thank You! I will take a look at it tomorrow. It is weird though, as we have it installed on wiki's where the wiki is also installed in a separate folder and not in the root.

Bovine-collab commented 1 year ago

I am using an installation with the following settings, for which this code does not work properly.

$wgScriptPath = "/w";
$wgArticlePath = '/wiki/$1'; 

MW has no idea which page you’re actually trying to send it to and redirects to the Main Page. Luckily, the intended page is created though.