Extension talk:NamespaceRelations

About this board

Mshastchi (talkcontribs)

I get the following error:

Notice: Undefined variable: namespaceInfo in public_html/extensions/NamespaceRelations/src/NamespaceRelations.php on line 189

Notice: Undefined variable: namespaceInfo in public_html/extensions/NamespaceRelations/src/NamespaceRelations.php on line 189
MediaWiki internal error.

Original exception: [25ba14d4dd4845ccb325183c] /index.php?title=whatever)&action=edit&redlink=1 Error: Call to a member function getTalk() on null

I have defined the required namespace and its talk namespace as follows:

// Define additional namespaces.
define("NS_ID", 20002); 
define("NS_ID_TALK", 20003); 

$wgExtraNamespaces[NS_ID] = "id";
$wgExtraNamespaces[NS_ID_TALK] = "id_talk"; 
Phil.o (talkcontribs)

There is a solution for that. The $namespaceInfo variable is initialized in the first if block, but not in the second.

In NamespaceRelations.php file, move the line 118 ($namespaceInfo = MediaWikiServices::getInstance()->getNamespaceInfo();) to line 103, just above the if..else block.

Alternatively, you can copy line 118 in the second block.

Tznkai (talkcontribs)

I can confirm this works.

Reply to "Error"
Tznkai (talkcontribs)

I've managed to get an additional tab, "Rules" to show up next to the article and talk tabs. But if I add the Rules_talk tab next to it, it also shows up as "Rules"

Reply to "Talk tabs"
DesignerThan (talkcontribs)

I have created multiple tabs with the same namespace but a custom target, the problem now is, that they all have the same text. Is it possible to customize that?

Reply to "Custom Tab Text"

Call to undefined function "wfProfileIn"

1
Henryfunk (talkcontribs)

After upgrading MediaWiki to version 1.31.1 you will get error messages about calls to the undefined functions "wfProfileIn" and "wfProfileOut". These are calls to a custom profiler that is no longer used in MediaWiki. The extension will work again if you remove the calls or comment them out.

Reply to "Call to undefined function "wfProfileIn""
Kghbln (talkcontribs)

Thank you! This seems to have worked! If you want any additional testing done, I am using your extension!

This post was posted by Kghbln, but signed as Cdaringe.

Reply to "Thank you!"
There are no older topics