Extension talk:PurgeParentPage
Latest comment: 14 years ago by Hermhut in topic Doesn't work in custom namespaces
Doesn't work in custom namespaces
editI'm using a custom namepace with $wgNamespacesWithSubpages[i] turned on. I'm trying to use this extension for pages in that namespace, but it doesn't seem to work. Can you help? Thanks. --Hermhut 15:33, 28 September 2010 (UTC)
- In fact, if there's a page in the main namespace (e.g. Foo) with the same title as the page in my custom namespace (e.g. MyNamespace:Foo), and a subpage is added to the page in my custom namespace (e.g. MyNamespace:Foo/Subfoo), the page in the main namespace (Foo) is the one that gets purged. --Hermhut 15:53, 28 September 2010 (UTC)
- My solution was to change this line:
$parentTitle = Title::newFromText("2010-2011:".$title->getBaseText());
- to this:
$parentTitle = Title::newFromText($title->getNsText().":".$title->getBaseText());
- --Hermhut 16:17, 28 September 2010 (UTC)