Alex.

Select your language

  • Français (Fr) FR
  • English (UK) EN
  • Start here
  • Blog
  • Videos 🍿
  • Bonus 🎁
  • Feed ✅
  • About
  • Login
Contact
A l e x

Fatal Sexy

Details
Written by: Mr Alexandre J-S William ELISÉ
Category: Uncategorised
Also available: Also available: Français (Fr)
Hits: 5

5 Steps to make your Joomla website remarquable even in case of failure...Interested? Let's dive in.

Step 1
Go to [joomla_root]/templates/system

Step 2
Copy fatal-error.php to fatal-error.custom.php

Step 3
IMPORTANT!!! Comment out the code that requires fatal-error.custom.php in the fatal-error.custom.php file to prevent infinite loop causing memory exhaution.

Step 4
In the fatal-error.custom.php add exactly this code



<?php

declare(strict_types=1);

/**
 * @package         Joomla.Site
 * @subpackage      Template.system
 *
 * @copyright   (C) 2020 Open Source Matters, Inc. 
 * @license         GNU General Public License version 2 or later; see LICENSE.txt
 */

defined('_JEXEC') or die;

use Symfony\Component\ErrorHandler\ErrorRenderer\HtmlErrorRenderer;

/**
 * Note: This file is only used when unrecoverable errors happen,
 * normally at boot up stages, and therefore it cannot be assumed
 * that any part of Joomla is available (Eg: a Factory or application)
 *
 * For "normal" error handling, use error.php not this file.
 *
 * @var  HtmlErrorRenderer $this       object containing charset
 * @var  string            $statusText exception error message
 * @var  string            $statusCode exception error code
 */

// Fallback template
$template = '{{statusCode_statusText}}';

// User supplied fatal error page
if (file_exists(__DIR__ . '/fatal-error.custom.html')) {
    $template = file_get_contents(__DIR__ . '/fatal-error.custom.html');
}

echo str_replace(
    ['{{statusCode_statusText}}', '{{statusCode}}', '{{statusText}}'],
    [$statusCode . ' - ' . $statusText, $statusCode, $statusText],
    $template,
);





Step 5
Final step, create a file called fatal-error.custom.html in the same folder than  the previous files and put your simplified lightweight marketing content in it. It will show up instead of the red fatal error page of Joomla core



That's it 5 steps to make your Joomla site remarquable even in case of failure.

JouerCloud - Casual experimental games platform

Details
Written by: Api Adept
Category: Uncategorised
Also available: Also available: Français (Fr)
Hits: 2
  • joomla
  • geek
  • gaming

We have 679 guests and one member online

Logo du notre site officiel Api Adept

Your Website. Augmented.

  • GitHub
  • YouTube
  • LinkedIn

Let's connect

  • Contributions
  • Leave a message

Useful Links

  • Login
  • My account
  • Personal Data Request
  • Confirm Personal Data Request
  • Extend Your Consent

Select your language

  • Français (Fr)
  • English (UK)

Address


Martinique
France

Copyright (C) 2009-2025. M. Alexandre J-S William ELISÉ. Tous droits rĂ©servĂ©s.