Wrh2 added a comment.
If the template was at fault the behavior should be consistent - currently if a page is edited or flushed from the cache the banner always shows correctly, but after some time passes TOCs start showing up within articles, which doesn't seem like a template issue to me. I can update the template, but doing so will flush all banners on the site and it will be several days until the problem shows up again - if you don't need to see any example pages to debug further let me know if it's safe to update the template. Also, are you certain you want __NOTOC__? That would suppress the TOC from both the article and the banner if I'm understanding correctly, which doesn't seem right. To explain what the template code is doing: toc={{#ifeq: {{{notoc|}}} | true | no | yes }} Per https://www.mediawiki.org/wiki/Extension:WikidataPageBanner the page banner extension takes a parameter of "toc=yes" or "toc=no" to determine whether to display the TOC in the banner or in the article. This template code says that when a "notoc" param is passed to the template with the exact value of "true" that the pagebanner will be invoked with "toc=no"; at all other times it will be invoked with "toc=yes". TASK DETAIL https://phabricator.wikimedia.org/T121135 EMAIL PREFERENCES https://phabricator.wikimedia.org/settings/panel/emailpreferences/ To: Jdlrobson, Wrh2 Cc: BBlack, faidon, Tgr, jcrespo, Krenair, Legoktm, LtPowers, mark, Wrh2, Sumit, Jdlrobson, Atsirlin, Aklapper, TerraCodes, D3r1ck01, Izno, Wikidata-bugs, aude, Lydia_Pintscher, Arlolra, Jackmcbarn, Mbch331, Jay8g _______________________________________________ Wikidata-bugs mailing list Wikidata-bugs@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/wikidata-bugs