Page MenuHomeMiraheze

Sidebar customisation by namespace
Closed, ResolvedPublic


XPosted from's support desk (no replies here) and WP's Village pump (technical section).

Almost three months ago on my creative-venture wiki, I had a bit of trouble getting a particular sidebar section to work on the namespaces it's supposed to be visible on. Despite following the advice in the MediaWiki manual, the target section was not showing up and the affected HTML segment was no better for it.

From my site's own Sidebar message back then:

* {{#switch:{{NAMESPACE}}{{!}}Voablivrile{{!}}Grammar{{!}}Corpus {{!}}Entry{{!}}Morpheme{{!}}Rhymes=Tovasala}}
** {{#switch:{{NAMESPACE}}{{!}}Voablivrile{{!}}Grammar{{!}}Corpus {{!}}Entry{{!}}Morpheme{{!}}Rhymes=Portal:Tovasala Dictionary{{!}}Home page}}
** {{#switch:{{NAMESPACE}}{{!}}Voablivrile{{!}}Grammar{{!}}Corpus {{!}}Entry{{!}}Morpheme{{!}}Rhymes=Voablivrile:Grammar{{!}}Grammar}}
** {{#switch:{{NAMESPACE}}|Voablivrile|Grammar|Corpus|Entry|Morpheme|Rhymes=Special:Random/Entry{{!}}Random headword}}
** {{#switch:{{NAMESPACE}}|Voablivrile|Grammar|Corpus|Entry|Morpheme|Rhymes=Special:Random/Morpheme{{!}}Random morpheme}}
** {{#switch:{{NAMESPACE}}|Voablivrile|Grammar|Corpus|Entry|Morpheme|Rhymes=Special:RandomInCategory/Snippets{{!}}Random snippet}}
** {{#switch:{{NAMESPACE}}|Voablivrile|Grammar|Corpus|Entry|Morpheme|Rhymes=Special:Random/Rhymes{{!}}Random rhyme list}}

HTML source:

<nav id="p-{{#switch:{{NAMESPACE}}{{!}}Voablivrile{{!}}Grammar{{!}}Corpus_{{!}}Entry{{!}}Morpheme{{!}}Rhymes=Tovasala}}" class="mw-portlet mw-portlet-_switch_NAMESPACE_Voablivrile_Grammar_Corpus_Entry_Morpheme_Rhymes_Tovasala emptyPortlet vector-menu vector-menu-portal portal" aria-labelledby="p-{{#switch:{{NAMESPACE}}{{!}}Voablivrile{{!}}Grammar{{!}}Corpus_{{!}}Entry{{!}}Morpheme{{!}}Rhymes=Tovasala}}-label" role="navigation">
	<h3 id="p-{{#switch:{{NAMESPACE}}{{!}}Voablivrile{{!}}Grammar{{!}}Corpus_{{!}}Entry{{!}}Morpheme{{!}}Rhymes=Tovasala}}-label" class="vector-menu-heading"> <span>{{#switch:{{NAMESPACE}}{{!}}Voablivrile{{!}}Grammar{{!}}Corpus {{!}}Entry{{!}}Morpheme{{!}}Rhymes=Tovasala}}</span>

These problems became apparent yesterday after I added two new skins to my site, Refreshed and Truglass. From here until this morning, I cleaned up the code per a Pump member's advice, and even tried one of the native namespaces to get it going.

Not even the resulting compromise has taken any effect (at least in Vector and Monobook):

* Tovasala
** {{#ifeq:{{NAMESPACE}}|Category|Portal:Tovasala Dictionary{{!}}Home page}}

In Refreshed and Truglass, only the "Tovasala" header appears with nothing below it. Either I'll wait here for help, or I'll have to go the CSS route myself...

P.S. Is this no longer actually supported in MW 1.38+? If so, is this a recent upstream oversight?

Event Timeline

Reception123 triaged this task as Normal priority.Aug 27 2022, 14:25
Unknown Object (User) closed this task as Resolved.Aug 27 2022, 20:26
Unknown Object (User) claimed this task.

This should now be fixed. Apologies for the issue you had. I have disabled the sidebar cache on the wiki, which should allow that to work correctly.