Skip to content

Joomla 5 Template Save Button Not Working -- Here's Why

More
2 weeks 6 days ago #827 by admin
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 &lt;style&gt; 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 &lt;style&gt; 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

Please Log in or Create an account to join the conversation.

Time to create page: 0.196 seconds

The AI Director

Enjoy Building Joomla Sites with AI

The most enjoyable way to build a Joomla site. Open it in VS Code → — describe what you want, Claude Code → reads the briefing, runs the stack, writes the code. You just keep the conversation going.

A new paradigm.

Built & designed by Weblio Sites from 9 900 NOK — built to outperform

This site was designed and built by Weblio — a Norwegian web agency specialising in fast, professional websites and AI-powered tools for businesses that want to move faster than their competition. Direct communication, honest pricing, no surprises.

Visit Weblio.no →