marcellorvalle
marcellorvalle

Reputation: 1679

Mediawiki - Link to subpages not working properly

I am going a little bit crazy here: In some pages the internal link format [[/link to subpage/]] is not rendered correct.

For example (my wiki is not accessible):

Situation where it is working as expected:

URL: mypersonalwiki.mydomain.com/index.php/examples
Link text: [[/subpage/]]
Navigation after click: mypersonalwiki.mydomain.com/index.php/examples/subpage

Situation where it is NOT working:

URL: mypersonalwiki.mydomain.com/index.php/projects
Link text(the same, just copy and paste): [[/subpage/]]
Navigation after click: mypersonalwiki.mydomain.com/index.php//subpage/

I have tested it on blank pages and it behaves randonly: sometimes it works, sometimes not. I still have not found any common behavior pattern. Also tried disabling all extensions without any change.

Any ideas?

Edit:
I have done some testing and maybe I found a pattern. Actually I have 3 user defined namespaces: Examples, Sandbox and Calendars.

This Wiki is enabled to be edited by anonymous users except on the "Examples" and "Calendars" ones. On these two the links are always rendered correctly. On the public namespaces (Main and Sandbox) the link is always wrong.

Thanks in advance and sorry about my english.

Upvotes: 0

Views: 348

Answers (1)

marcellorvalle
marcellorvalle

Reputation: 1679

OK, just found it.

I forgot to enable subpages on some namespaces using the array $wgNamespacesWithSubpages[] at LocalSettings.php.

Credits to Bartosz Dziewoński from Mediawiki mailing list.

Upvotes: 1

Related Questions