If you've ever hit Save on a Joomla 5 template style and nothing happens -- no error, no spinner, the page just sits there -- you're not alone. This one is genuinely hard to diagnose because there's no error message anywhere.
Symptoms
- You open System > Templates > Site Template Styles > [your template]
- You change a setting in the Options tab
- You click Save, Save & Close, or Save as Copy
- Nothing happens. The buttons don't respond at all
- No JavaScript errors in the browser console (or a cryptic one you can't trace)
- Other admin pages work fine -- only the template options page is broken
Root Cause
The
description attribute in your template's
templateDetails.xml contains HTML entity tags that Joomla's XML parser decodes into live HTML.
For example, if your description contains:
Code:
description="Use <style> tags for custom CSS"
Joomla's XML parser decodes
<style> into a literal
<style> tag. This gets rendered into the admin page as live HTML, injecting a rogue
<style> element that breaks the
joomla-toolbar-button web component -- which is how Save/Close/Help buttons work in Joomla 5.
The deadly tags are:
<style>,
<script>,
</head>,
</body>. These inject into the DOM and silently corrupt the page structure.
Harmless tags like
<span>,
<div>,
<a> render visibly but don't break functionality.
The Fix
Open your
templateDetails.xml and check every
description attribute on every field. Remove any HTML entity-encoded tags that would be dangerous when decoded:
Before (broken):
Code:
<field name="customCSS" type="textarea" label="Custom CSS" description="Add <style> rules here" />
After (fixed):
Code:
<field name="customCSS" type="textarea" label="Custom CSS" description="Add custom CSS rules here" />
After editing, clear the cache:
Code:
php cli/joomla.php cache:clean
The Save button will work immediately.
[hr]
This is one of 65+ gotchas documented in
The AI Joomla Blueprint --
theaidirector.win