Page MenuHomePhabricator

Non-index entry points cause the "Wiki not set up" message to have corrupt URLs
Closed, ResolvedPublic

Description

Author: mattj

Description:
Proposed patch

When going through a non-index entry page, e.g. api.php, without the wiki set up, the message that is shown has corrupted urls (e.g. for me, http://localhost/mw/api.phpconfig/index.php), on both the link and the image.

It's a reasonably rare occurence, but may happen on public wikis with bots when updating the software, or accidentally moving/deleting your config.

Patch tested to merge fine on r40691 of trunk


Version: unspecified
Severity: enhancement

attachment wikinotsetup_invalidpath.patch ignored as obsolete

Details

Reference
bz15544

Event Timeline

bzimport raised the priority of this task from to Medium.Nov 21 2014, 10:17 PM
bzimport set Reference to bz15544.

mattj wrote:

Reopening per discussion with Tim, needs a more elegant solution that will work with more locations.

mattj wrote:

Proposed patch v2

Fixed patch, finds the correct path if in any subdirectory (of those listed) or if in the main directory. Also validates if it has the right place.

Attached:

For completeness sake: r40719 was reverted in r41047 by Tim with comment: Reverted r40719, plainly flawed, for instance the hard-coded references to index.php have no place if the point is to make it work for other entry points.

Applied patch 5349 in r43106.