Templating of my "component" broke. How do I fix it?

das-g
Mon, 16 Mar 2026 16:59:41 +0000
Development

In a Discourse instance I maintain, I have a component (inherited from the previous maintainer of the instance) to display the logos of the sponsors of that instance in the footer. The component used to work fine until recently, but now is rendered wrongly, displaying the template control directives literally (and putting the template value placeholders literally into the HTML, so that the paths to the images aren’t resolved):

The component isn’t maintained in a git repo, it’s configured directly under “Admin” → “Appearance” → “Themes & components” → tab “Components”:

Custom Code

Custom sections:

Common: CSS, Footer, JS

Uploads

$geoaargau: geoaargau.jpg

$asseco_berit: asseco_berit.jpg

Extra files
Export theme to view these files. (click for more details)

content of those “sections”

as seen when clicking “Edit Code”; path to corresponding files in the export given in parentheses
CSS (common/common.scss) (click for more details) Footer (common/footer.html) (click for more details) JS (javascripts/discourse/api-initializers/theme-initializer.gjs) (click for more details)
The export additionally contains:
about.json (466 Bytes)
which I guess is generated on-the-fly when exporting, so I don’t assume it’s relavant.

The relevant part of the effective DOM with this breakage is:


    {{#if displaySponsors}}


Sponsoren




  {{/if}}


so we can see that the control directive {{#if ...}}...{{/if}} and the placeholders {{theme-setting "..."}} were used as literal HTML rather than executed / evaluated / interpolated.

How and why did that change and how should I fix it?

Is it maybe related to Upcoming Header Changes - Preparing Themes and Plugins? (Though I don’t see changes to the templating syntax mentioned there.)

15 posts - 3 participants