Environment
- SP Page Builder Pro 6.9.1
- Joomla 5.4.9, PHP 8.3
The problem
-
The default is Developer Mode. In
administrator/components/com_sppagebuilder/config.xml, theproduction_modefield is declared withdefault="0". Any site where nobody explicitly turns it on runs in Developer
Mode, including production sites. -
Developer Mode is the wrong behaviour for live sites. In
components/com_sppagebuilder/parser/addon-parser.php, whenproduction_modeis off, the page's generated CSS is added inline to the<head>of every page
(addStyleDeclaration) instead of being written to a stylesheet file and linked. On our homepage that is about 13 KB of extra HTML per page view. Inline CSS can't be cached by browsers or CDNs, so it is downloaded
again on every single page view. Your own documentation describes Production Mode as the setting that combines the CSS into one file to improve load time, i.e. what a live site should use. -
Nothing tells the site owner. The setting lives in the component options / editor settings, there is no warning when it is off, and changing it in the editor's application settings is not recorded in Joomla's User
Actions Log. Site owners have no way of knowing their site has been running in Developer Mode, or since when. We only found it while investigating performance. -
Related inefficiency in Production Mode. When
production_modeis on, the same code callsfile_put_contents()onmedia/com_sppagebuilder/css/<page>.csson every page build, even when the CSS hasn't changed.
On multi-server or high-traffic sites that is a disk write per uncached page view. Comparing a hash of the new CSS with the existing file before writing would avoid it.
Why changing the default is not enough
Changing default="0" to default="1" only helps new installations. Every existing site that never touched the setting will keep running in Developer Mode indefinitely, because updates preserve the stored component
parameters. The fix has to reach existing customers too.
Requested changes
-
Make Production Mode the default for new installations (
default="1"), or default it to the opposite of Joomla's own debug setting. -
Prompt existing users interactively. When an administrator opens SP Page Builder (dashboard or page list) and Production Mode is off, show a clear notice:
Your site is running SP Page Builder in Developer Mode. This inlines all page CSS into every page and is not recommended for live sites. Switch to Production Mode?
with two buttons:
- Switch to Production Mode (one click, saves the setting)
- Keep Developer Mode (this is a development/staging site)
Joomla's built-in Post-installation Messages (
com_postinstall) would also be a natural way to surface this on the next update for every existing installation. -
Re-confirm every 90 days. If the administrator chooses to keep Developer Mode, store the date of that confirmation (e.g. a
dev_mode_confirmed_onparameter) and ask again every 90 days. Developer Mode is meant
to be temporary, and sites often go live, or stay live for years, with it accidentally left on. A periodic re-confirmation keeps the choice deliberate. -
Show the current mode at a glance, for example a small "Developer Mode" badge in the SP Page Builder admin header, so it is visible without opening the settings.
-
Log changes to the setting in Joomla's User Actions Log, so site owners can see when and by whom the mode was changed.
-
Only rewrite the Production Mode CSS file when its content changes (see point 4 under The problem).
Impact
Every live site running in Developer Mode serves heavier, less cacheable pages on every request, and its owner has no indication anything is wrong. A one-time, periodically re-confirmed prompt would fix this for the whole
existing customer base at almost no cost, without changing anything for sites that genuinely want Developer Mode.