*
* This file is part of a Moko Consulting project.
*
* SPDX-License-Identifier: GPL-3.0-or-later
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see https://www.gnu.org/licenses/ .
* =========================================================================
* FILE INFORMATION
* DEFGROUP: Joomla
* INGROUP: Moko-Cassiopeia
* PATH: templates/moko-cassiopeia/error.php
* VERSION: 02.00
* BRIEF: Error page template file for Moko-Cassiopeia
* =========================================================================
*/
defined('_JEXEC') or die;
use Joomla\CMS\Factory;
use Joomla\CMS\HTML\HTMLHelper;
use Joomla\CMS\Language\Text;
use Joomla\CMS\Uri\Uri;
/** @var Joomla\CMS\Document\ErrorDocument|Joomla\CMS\Document\HtmlDocument $this */
$app = Factory::getApplication();
$params = $this->params;
$wa = $this->getWebAssetManager();
// ------------------ Params ------------------
$colorLight = (string) $params->get('colorLightName', 'colors_standard');
$colorDark = (string) $params->get('colorDarkName', 'colors_standard');
$themeFab = (int) $params->get('theme_fab_enabled', 1);
$fABodyPos = (string) $params->get('theme_fab_pos', 'br');
$gtmEnabled = (int) $params->get('googletagmanager', 0);
$gtmId = (string) $params->get('googletagmanagerid', '');
$fa6KitCode = (string) $params->get('fA6KitCode', '');
$stickyHeader = (bool) $params->get('stickyHeader', 0);
$brandEnabled = (int) $params->get('brand', 1);
$siteDescription = (string) $params->get('siteDescription', '');
// Drawer icon params (escaped)
$params_leftIcon = htmlspecialchars($params->get('drawerLeftIcon', 'fa-solid fa-chevron-right'), ENT_QUOTES, 'UTF-8');
$params_rightIcon = htmlspecialchars($params->get('drawerRightIcon', 'fa-solid fa-chevron-left'), ENT_QUOTES, 'UTF-8');
// ------------------ Styles ------------------
$wa->useStyle('template.base');
$wa->useStyle('template.user');
$wa->useStyle('vendor.vmbasic');
$wa->useStyle('vendor.gable');
// Light/Dark variable sheets (load before consumers)
if ($wa->assetExists('style', 'template.light.' . $colorLight)) {
$wa->useStyle('template.light.' . $colorLight);
}
if ($wa->assetExists('style', 'template.dark.' . $colorDark)) {
$wa->useStyle('template.dark.' . $colorDark);
}
// ------------------ Scripts ------------------
$wa->useScript('theme-init.js');
if ($themeFab === 1) {
$wa->useScript('darkmode-toggle.js');
}
if ($gtmEnabled === 1) {
$wa->useScript('gtm.js');
}
// Optional Font Awesome 6 Kit (preferred) or FA5 fallback
if (!empty($fa6KitCode)) {
HTMLHelper::_('script', 'https://kit.fontawesome.com/' . rawurlencode($fa6KitCode) . '.js', [
'crossorigin' => 'anonymous'
]);
} else {
HTMLHelper::_('stylesheet', 'https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.15.4/css/all.min.css', ['version' => 'auto'], [
'crossorigin' => 'anonymous',
'referrerpolicy' => 'no-referrer',
]);
}
// ------------------ Context (logo, bootstrap needs) ------------------
$sitename = htmlspecialchars($app->get('sitename'), ENT_QUOTES, 'UTF-8');
// Build logo/title
if ($params->get('logoFile')) {
$logo = HTMLHelper::_(
'image',
Uri::root(false) . htmlspecialchars($params->get('logoFile'), ENT_QUOTES),
$sitename,
['loading' => 'eager', 'decoding' => 'async'],
false,
0
);
} elseif ($params->get('siteTitle')) {
$logo = '' . htmlspecialchars($params->get('siteTitle'), ENT_COMPAT, 'UTF-8') . '';
} else {
$logo = HTMLHelper::_('image', 'full_logo.png', $sitename, ['class' => 'logo d-inline-block', 'loading' => 'eager', 'decoding' => 'async'], true, 0);
}
// ------------------ Error details ------------------
$errorObj = isset($this->error) && is_object($this->error) ? $this->error : null;
$errorCode = $errorObj ? (int) $errorObj->getCode() : 500;
$errorMsg = $errorObj ? $errorObj->getMessage() : Text::_('JERROR_AN_ERROR_HAS_OCCURRED');
$debugOn = defined('JDEBUG') && JDEBUG;
?>
Debug mode is ON — detailed error information is shown below.
- Class
- Code
- getCode(); ?>
- Message
- getMessage(), ENT_QUOTES, 'UTF-8'); ?>
- File
- getFile(), ENT_QUOTES, 'UTF-8'); ?> : getLine(); ?>
getTrace() : []; ?>
$frame) :
$file = $frame['file'] ?? '[internal]';
$line = isset($frame['line']) ? (int) $frame['line'] : 0;
$func = $frame['function'] ?? '';
$class= $frame['class'] ?? '';
$type = $frame['type'] ?? '';
?>
-
# ()
No stack trace available.