Topic on Extension talk:UserFunctions

Some troubles on some namespaces

2
FrViPofm (talkcontribs)

Hi, In a local wiki (witch will be moved on the web later) I've found a way to display in infoboxes shortway links to technical pages according to the current namespace (e.g. special:All Categories|Templates|Properties...). Very handful ! those links are in a template in a #ifsysop condition. It works well in several namespaces : main, template, category, help (ns: 12)... and not in some : Property (from Semantic Mediawiki, ns: 102), Reference (ns: 3010) in spite of configuration at the end of LocalSetting.php like :

$wgUFAllowedNamespaces[SMW_NS_PROPERTY] = true; // ns: 102 or : $wgUFAllowedNamespaces[102 ] = true; // ns: 102 SMW_NS_PROPERTY

(the namespace numbers are checked with the special:AllPages : when choosing a namespace, the corresponding number is shown in the url) In those case, the "{{#ifsysop:" ... "|}}" code is displayed as not interpreted by the parser.

Anny hint ? How to enable UserFunctions in extention and custom namespaces ?

Thanks

mw: 1.36.1 php: 7.4.22 smw: 3.2.3 userfunction: 2.8.0

83.255.155.133 (talkcontribs)

It seems that $wgUFAllowedNamespaces is overwritten in MediaWiki due to the usage of array_merge and it's "Values in the input arrays with numeric keys will be renumbered with incrementing keys starting from zero in the result array".

Reply to "Some troubles on some namespaces"