Last modified: 2007-06-13 19:23:47 UTC

Wikimedia Bugzilla is closed!

Wikimedia has migrated from Bugzilla to Phabricator. Bug reports should be created and updated in Wikimedia Phabricator instead. Please create an account in Phabricator and add your Bugzilla email address to it.
Wikimedia Bugzilla is read-only. If you try to edit or create any bug report in Bugzilla you will be shown an intentional error message.
In order to access the Phabricator task corresponding to a Bugzilla report, just remove "static-" from its URL.
You could still run searches in Bugzilla or access your list of votes but bug reports will obviously not be up-to-date in Bugzilla.
Bug 10243 - Fails to extract proper page information with modified $wgArticlePath
Fails to extract proper page information with modified $wgArticlePath
Product: MediaWiki
Classification: Unclassified
API (Other open bugs)
All All
: Normal normal (vote)
: ---
Assigned To: Nobody - You can work on this!
Depends on:
  Show dependency treegraph
Reported: 2007-06-13 16:58 UTC by Tikhon Botchkarev
Modified: 2007-06-13 19:23 UTC (History)
0 users

See Also:
Web browser: ---
Mobile Platform: ---
Assignee Huggle Beta Tester: ---

Patch for WebRequest::interpolateTitle() to process $wgScript before $wgArticlePath (511 bytes, patch)
2007-06-13 18:26 UTC, Tikhon Botchkarev

Description Tikhon Botchkarev 2007-06-13 16:58:44 UTC
Wiki installation is located in /wiki, RewriteRules were disabled for this example. When using a custom $wgArticlePath such as:

$wgArticlePath = "/wiki/$1";

Any access to the wiki though the actual entry point script such as:

GET /wiki/index.php?title=Main_Page&action=edit


GET /wiki/index.php?title=Main_Page&action=history

Will result in the parser attempting to operate on the [[Index.php]] page instead of the page in title.
Comment 1 Tikhon Botchkarev 2007-06-13 18:26:17 UTC
Created attachment 3757 [details]
Patch for WebRequest::interpolateTitle() to process $wgScript before $wgArticlePath

Added patch that fixes above problem. The problem originated in WebRequest::interpolateTitle(). That function tries to figure out the title of the requested page based on the $wgArticlePath. If the path is set to allow Rewrite Conditions the action pages are still requested in the /index.php?actions format, which leads to the WebRequest::extractTitle() function to return index.php.
Comment 2 Brion Vibber 2007-06-13 19:02:28 UTC
This appears to be correct behavior per spec; /wiki/index.php?title=Main_Page&action=edit would indeed refer to a page "index.php" with additional parameters tacked on.

Your URL scheme overlaps two separate areas (the files & scripts area and the wiki-page-space area), and one's going to win out.

I would recommend fixing your URL scheme.
Comment 3 Tikhon Botchkarev 2007-06-13 19:23:47 UTC
Upon looking at it a bit more I can see what you meant and have fixed my mistake. It may be worth it to either reconsider this behaviour or do some extra documentation or checking, as a lot of examples online provided this type of configuration and it did not yield any problems in older releases.

Note You need to log in before you can comment on or make changes to this bug.