-
-
- Submit Updated Articles to Bing and Yandex with IndexNow in Joomla
- Add Published and Modified Date Meta Tags to Joomla
- Add Open Graph and Twitter Card Tags to Joomla
- Auto-Generate Meta Descriptions from Article Text in Joomla
- Add Noindex to Specific Pages in Joomla
- Verify Your Joomla Site with Google Search Console
-
- Add a View as Markdown Link to Joomla Articles
- Display the Last Modified Date in Joomla Articles
- Embed Iframes in Joomla
- Automatically Link Twitter (X) @mentions in Joomla Articles
- Open External Links in a New Tab in Joomla
- Display Estimated Reading Time in Joomla Articles
- Replace Old URLs in Joomla
- Search and Replace in Joomla
-
- Add a Footer Line to the Joomla Administrator
- Show a Staging Banner in the Joomla Administrator
- Remove the "All" Option from Admin List Limits in Joomla
- Add a Cookie Consent Banner to Joomla
- Make the Administrator Navigation Sticky in Joomla
- Add Google Fonts to Joomla
- Add a Facebook Messenger Chat Button to Joomla
- Add a Reading Progress Bar to Joomla
- Add a Custom Scrollbar to Joomla
- Show Confetti on a Thank You Page in Joomla
- Add Smooth Scrolling to Joomla
- Add a Back to Top Button in Joomla
- Add a WhatsApp Chat Button in Joomla
-
- Protect the Administrator with a Secret URL Key in Joomla
- Show a Welcome Message on First Login in Joomla
- Log Out Idle Administrators in Joomla
- Assign New Users to a Different User Group Automatically in Joomla
- Redirect Visitors by Country in Joomla
- Redirect Users After Login by User Group in Joomla
- Block User Registration with Certain Usernames in Joomla
- Block User Registration by Country in Joomla
- Block User Registration by Email Address in Joomla
- Block User Registration by IP Address in Joomla
- Remove the Forgot Password and Username Links in Joomla
- Remove the Generator Meta Tag in Joomla
- Let Users Log In with Their Email Address in Joomla
- Block Traffic by Country in Joomla
- Block Bot Traffic in Joomla
- Block Traffic by IP Address in Joomla
Use safe mode to recover from a snippet that locks you out
Locked out by a broken snippet? One line in configuration.php pauses every snippet so you can get back in, fix it and switch them on again.
Code Snippets disables a PHP snippet on its own when it throws an error or causes a fatal error, so the next page load works. A few things slip through: an exit() in the wrong place, a loop that waits on a slow HTTP call, or a snippet that keeps redirecting you away from the administrator. If one of those locks you out, safe mode is the way back in.
What safe mode does
While safe mode is on, no snippet runs, on the site or in the administrator, and shortcodes stay as they are. Snippets keep their status, so when you turn safe mode off everything runs as before.
The component's own pages show a warning while safe mode is on, so the line in configuration.php doesn't get forgotten. Other administrator pages show nothing.
Safe mode is a file edit on purpose. A URL parameter would let any visitor switch off the snippets that protect your administrator, like an IP allowlist or a login block.
Turn safe mode on
- Open
configuration.phpin your site's root folder, over FTP or your host's file manager. -
Add this line inside the
JConfigclass, next to the otherpublicproperties:public $tcs_safe_mode = true; - Save the file.
- Log into your Joomla backend.
- Go to Components → Tassos Code Snippets. A warning at the top of the page confirms that safe mode is on.
Give it a few seconds. PHP keeps a cached copy of configuration.php and rechecks it every couple of seconds on most hosts.
A constant works too. Put it above the class JConfig line:
define('TCS_SAFE_MODE', true);
Fix the snippet
- In the snippets list, look for a snippet with the Auto-Disabled status, or for the one you published last.
- Open it. An auto-disabled snippet shows the error message, the stack trace and the error date at the top of the edit screen.
- Fix the code, or set its Status to Unpublished for now.
- Click Save & Close.
Not sure which snippet it was? Filter the list by Location and start with the PHP snippets on Admin Page Load or Site and Admin Page Load, since those run on every administrator request.
Turn safe mode off
- Remove the line you added from
configuration.php. - Save the file.
- Reload the administrator. The warning is gone and your snippets run again.
The PHP snippet docs explain how snippets get disabled on errors. If a snippet fails without locking you out, How to debug PHP errors in a snippet shows where to read the error.