Page MenuHomePhabricator

DocBookExport: Breaks when page name contains a "/" (slash)
Open, Needs TriagePublic

Description

(The last one, I promise.)

Calling basename on a link URL to obtain the pagename will fail for pages containing slashes.
This makes a subsequent call to wfFindFile( $filename )->getLocalRefPath() bail out complaining about using getLocalRef on a bool value.

See https://github.com/wikimedia/mediawiki-extensions-DocBookExport/blob/1a66ee35a2403083868a7d99b8a94c97e3168599/DocBookExportAPI.php#L325

Another occurrence is at https://github.com/wikimedia/mediawiki-extensions-DocBookExport/blob/1a66ee35a2403083868a7d99b8a94c97e3168599/DocBookExportAPI.php#L341
This is less critical, as it will probably just lead to links not appearing in the final document.

Event Timeline

Vvjjkkii renamed this task from DocBookExport: Breaks when page name contains a "/" (slash) to ddbaaaaaaa.Jul 1 2018, 1:04 AM
Vvjjkkii removed Nischayn22 as the assignee of this task.
Vvjjkkii triaged this task as High priority.
Vvjjkkii updated the task description. (Show Details)
Vvjjkkii edited subscribers, added: Nischayn22; removed: Aklapper.
CommunityTechBot renamed this task from ddbaaaaaaa to DocBookExport: Breaks when page name contains a "/" (slash).Jul 2 2018, 3:04 PM
CommunityTechBot assigned this task to Nischayn22.
CommunityTechBot raised the priority of this task from High to Needs Triage.
CommunityTechBot updated the task description. (Show Details)
CommunityTechBot edited subscribers, added: Aklapper; removed: Nischayn22.

Sorry for the late reply ( Its been a year :( )
If you are still using this it would be great if you could provide an example of a filename containing a slash. I am not sure if that is even okay to have?

This is about page names that contain slashes, e.g. any sub-page. Something like https://www.mediawiki.org/wiki/Extension:Page_Forms/Linking_to_forms

Aklapper added a subscriber: Nischayn22.

@Nischayn22: I am resetting the assignee of this task because there has not been progress lately (please correct me if I am wrong!). Resetting the assignee avoids the impression that somebody is already working on this task. It also allows others to potentially work towards fixing this task. Please claim this task again when you plan to work on it (via Add Action...Assign / Claim in the dropdown menu) - it would be welcome. Thanks for your understanding!