Page MenuHomePhabricator

Page Forms: Getting 404 if I try to create a new page.
Open, Needs TriagePublic

Description

  1. I'm on page http://XX.XX.XX.XX/hwwiki/index.php?title=Form:HWComponentDriveForm containing my form that I just created.
  2. Now I enter a bogus name for a new page: asd. I click the button and get redirected to http://XX.XX.XX.XX/hwwiki/index.php/Special:FormStart?page_name=asd&form=HWComponentDriveForm - which is plain wrong as I get a HTTP 404.

Event Timeline

RegisMay created this task.Nov 16 2018, 8:48 AM
Restricted Application added a subscriber: Aklapper. · View Herald TranscriptNov 16 2018, 8:48 AM

Is this a new wiki? It sounds like you have an error in the wiki's URL-creation setup - perhaps an error in setting the variable $wgArticlePath in LocalSettings.php, or a problem in any URL-rewriting code you may have.

RegisMay added a comment.EditedNov 16 2018, 6:05 PM

No I haven't gotten anything wrong here. I'm setting up Wikis now for over a decade. And I don't use any URL rewriting as I don't see any reason for that. $wgArticlePath is even not set: It is left to be the default value as implemented by MW. The configuration is completely based on the default configuration provided by the MW setup process.

It's a fresh install and done like this: Download the latest MW code, perform the regular setup, configure NGINX which is simple enough. Download composer, install SMW, install Page Forms, activate it in LocalSettings. Then I created a class and in consequence properties, a template and a form - and there you are, encountering this error.

It seems that Special:FormStart is simply appended to some base URL or something. See the difference:

  • http://XX.XX.XX.XX/hwwiki/index.php/Special:FormStart?page_name=asd&form=HWComponentDriveForm ---> HTTP 404 -- the current situation
  • http://XX.XX.XX.XX/hwwiki/index.php?title=Special:FormStart&page_name=asd&form=HWComponentDriveForm ---> HTTP 200 -- the situation as I think it should be

You might get along with http://XX.XX.XX.XX/hwwiki/Special:FormStart?..... if (and probably only if) you use URL rewriting -- which I don't use. Nevertheless things should work out of the box - without any URL rewriting.

This is a bug.

Well, I can't see your setup, unfortunately, but I haven't heard about this problem from anyone else, so my strong guess is that there's something wrong in your setup. If you want to try debugging it yourself, the relevant line is "$fsURL = $fs->getPageTitle()->getLocalURL();" in /includes/PF_ParserFunctions.php.