{
$params = Framework::getTemplate()->getParams();
$favicon = $params->get('favicon', '');
if (!empty($favicon)) {
Framework::getDocument()->addLink(\JURI::base(true) . '/' . Media::getPath() . '/' . $favicon, 'shortcut icon', array(
'type' => image_type_to_mime_type(exif_imagetype(JPATH_BASE.'/'. Media::getPath() . '/' . $favicon)),
'sizes' => 'any'
));
}
$apple_touch_icon = $params->get('apple_touch_icon', '');
if (!empty($apple_touch_icon) && ($apple_touch_icon != $favicon)) {
$params = Astroid\Framework::getTemplate()->getParams(); // Astroid Params
Astroid\Helper\Head::meta(); // site meta
Astroid\Component\Utility::custom(); // custom code
Astroid\Helper\Head::scripts(); // site scripts
Astroid\Helper\Head::favicon(); // site favicon
Astroid\Component\Utility::error(); // error page styling
Astroid\Component\Utility::typography();
/** @var JDocumentError $this */
// Store the file path
$this->_file = $directory . '/' . $filename;
// Get the file content
ob_start();
require $directory . '/' . $filename;
$contents = ob_get_contents();
ob_end_clean();
}
return $contents;
$this->baseurl = Uri::base(true);
$this->params = $params['params'] ?? new Registry;
$this->template = $template;
// Load
$this->_template = $this->_loadTemplate($baseDir, $file);
return $this;
}
/**
*
* @since 1.7.0
*/
public function parse($params = array())
{
return $this->_fetchTemplate($params)->_parseTemplate();
}
/**
* Outputs the template to the browser.
*
{
$this->_caching = $caching;
if (empty($this->_template))
{
$this->parse($params);
}
if (\array_key_exists('csp_nonce', $params) && $params['csp_nonce'] !== null)
{
$this->cspNonce = $params['csp_nonce'];
$this->debug = $params['debug'] ?? false;
$this->error = $this->_error;
$params['file'] = 'error.php';
return parent::render($cache, $params);
}
/**
* Render the backtrace
*
'template' => $template->template,
'directory' => JPATH_THEMES,
'debug' => JDEBUG,
'csp_nonce' => $app->get('csp_nonce'),
'templateInherits' => $template->parent,
'params' => $template->params,
]
);
}
}
// Reset the document object in the factory, this gives us a clean slate and lets everything render properly
Factory::$document = $renderer->getDocument();
Factory::getApplication()->loadDocument(Factory::$document);
$data = $renderer->render($error);
// If nothing was rendered, just use the message from the Exception
if (empty($data))
{
$data = $error->getMessage();
* @since 3.10.0
*/
public static function handleException(\Throwable $error)
{
static::logException($error);
static::render($error);
}
/**
* Render the error page based on an exception.
*
);
// Trigger the onError event.
$this->triggerEvent('onError', $event);
ExceptionHandler::handleException($event->getError());
}
// Send the application response.
$this->respond();
// Set the application as global app
\Joomla\CMS\Factory::$application = $app;
// Execute the application.
$app->execute();
* define() is used rather than "const" to not error for PHP 5.2 and lower
*/
define('_JEXEC', 1);
// Run the application - All executable code should be triggered through this file
require_once dirname(__FILE__) . '/includes/app.php';
{
$params = Framework::getTemplate()->getParams();
$favicon = $params->get('favicon', '');
if (!empty($favicon)) {
Framework::getDocument()->addLink(\JURI::base(true) . '/' . Media::getPath() . '/' . $favicon, 'shortcut icon', array(
'type' => image_type_to_mime_type(exif_imagetype(JPATH_BASE.'/'. Media::getPath() . '/' . $favicon)),
'sizes' => 'any'
));
}
$apple_touch_icon = $params->get('apple_touch_icon', '');
if (!empty($apple_touch_icon) && ($apple_touch_icon != $favicon)) {
$document = Astroid\Framework::getDocument();
Astroid\Helper\Head::meta(); // site meta
Astroid\Helper\Head::scripts(); // site scripts
Astroid\Helper\Head::favicon(); // site favicon
if ($document->isDev()) { // check is dev
$document->include('comingsoon'); // load coming soon and return
return;
}
{
return $layoutOutput;
}
ob_start();
include $path;
$layoutOutput .= ob_get_contents();
ob_end_clean();
return $layoutOutput;
}
if ($path === null) {
return '';
}
$layout = new \JLayoutFile($section, $path);
$content = $layout->render($data);
/* if (Framework::isAdmin()) {
$layout = new \JLayoutFile($section, $path);
$content = $layout->render($data);
} else {
<astroid:include type="head-styles" /> <!-- head styles -->
<astroid:include type="head-scripts" /> <!-- head scripts -->
</head> <!-- document head -->
<body class="<?php echo $document->getBodyClass(); ?>">
<?php $document->include('document.body'); ?>
<!-- body and layout -->
<astroid:include type="body-scripts" /> <!-- body scripts -->
</body> <!-- document body -->
</html> <!-- document end -->
// Store the file path
$this->_file = $directory . '/' . $filename;
// Get the file content
ob_start();
require $directory . '/' . $filename;
$contents = ob_get_contents();
ob_end_clean();
}
return $contents;
$this->baseurl = Uri::base(true);
$this->params = $params['params'] ?? new Registry;
$this->template = $template;
// Load
$this->_template = $this->_loadTemplate($baseDir, $file);
return $this;
}
/**
*
* @since 1.7.0
*/
public function parse($params = array())
{
return $this->_fetchTemplate($params)->_parseTemplate();
}
/**
* Outputs the template to the browser.
*
{
$this->docOptions['directory'] = \defined('JPATH_THEMES') ? JPATH_THEMES : (\defined('JPATH_BASE') ? JPATH_BASE : __DIR__) . '/themes';
}
// Parse the document.
$this->document->parse($this->docOptions);
// Trigger the onBeforeRender event.
PluginHelper::importPlugin('system');
$this->triggerEvent('onBeforeRender');
$this->set('themeInherits', $template->parent);
break;
}
parent::render();
}
/**
* Route the application.
*
// If we have an application document object, render it.
if ($this->document instanceof \Joomla\CMS\Document\Document)
{
// Render the application output.
$this->render();
}
// If gzip compression is enabled in configuration and the server is compliant, compress the output.
if ($this->get('gzip') && !ini_get('zlib.output_compression') && ini_get('output_handler') !== 'ob_gzhandler')
{
// Set the application as global app
\Joomla\CMS\Factory::$application = $app;
// Execute the application.
$app->execute();
* define() is used rather than "const" to not error for PHP 5.2 and lower
*/
define('_JEXEC', 1);
// Run the application - All executable code should be triggered through this file
require_once dirname(__FILE__) . '/includes/app.php';
[2/2]
UndefinedFunctionError
|
---|
Symfony\Component\ErrorHandler\Error\UndefinedFunctionError: Attempted to call function "exif_imagetype" from namespace "Astroid\Helper". at /volume1/web/k204/libraries/astroid/framework/library/astroid/Helper/Head.php:36 at Astroid\Helper\Head::favicon() (/volume1/web/k204/templates/tp_easy/error.php:26) at require('/volume1/web/k204/templates/tp_easy/error.php') (/volume1/web/k204/libraries/src/Document/HtmlDocument.php:771) at Joomla\CMS\Document\HtmlDocument->_loadTemplate('/volume1/web/k204/templates/tp_easy', 'error.php') (/volume1/web/k204/libraries/src/Document/HtmlDocument.php:830) at Joomla\CMS\Document\HtmlDocument->_fetchTemplate(array('template' => 'tp_easy', 'directory' => '/volume1/web/k204/templates', 'debug' => true, 'csp_nonce' => 'MWQ1M2MwYzI1NTkyODhjMGQ4YmY2MjZmMTg3ZTUxNzdmODhjZTlhMmNhY2Q3ZjNhNzhkNTZlYjY0OTdlOWJiZTgxYWEyNDE1NzFjNGYyYTYzZGViY2ExYzZhMzU5MzkzM2VhZTE1ZWMzNGYwMDQ3OGNiYTk4ODJhZDU2ZTVkZDc=', 'templateInherits' => '', 'params' => object(Registry), 'file' => 'error.php')) (/volume1/web/k204/libraries/src/Document/HtmlDocument.php:633) at Joomla\CMS\Document\HtmlDocument->parse(array('template' => 'tp_easy', 'directory' => '/volume1/web/k204/templates', 'debug' => true, 'csp_nonce' => 'MWQ1M2MwYzI1NTkyODhjMGQ4YmY2MjZmMTg3ZTUxNzdmODhjZTlhMmNhY2Q3ZjNhNzhkNTZlYjY0OTdlOWJiZTgxYWEyNDE1NzFjNGYyYTYzZGViY2ExYzZhMzU5MzkzM2VhZTE1ZWMzNGYwMDQ3OGNiYTk4ODJhZDU2ZTVkZDc=', 'templateInherits' => '', 'params' => object(Registry), 'file' => 'error.php')) (/volume1/web/k204/libraries/src/Document/HtmlDocument.php:652) at Joomla\CMS\Document\HtmlDocument->render(false, array('template' => 'tp_easy', 'directory' => '/volume1/web/k204/templates', 'debug' => true, 'csp_nonce' => 'MWQ1M2MwYzI1NTkyODhjMGQ4YmY2MjZmMTg3ZTUxNzdmODhjZTlhMmNhY2Q3ZjNhNzhkNTZlYjY0OTdlOWJiZTgxYWEyNDE1NzFjNGYyYTYzZGViY2ExYzZhMzU5MzkzM2VhZTE1ZWMzNGYwMDQ3OGNiYTk4ODJhZDU2ZTVkZDc=', 'templateInherits' => '', 'params' => object(Registry), 'file' => 'error.php')) (/volume1/web/k204/libraries/src/Document/ErrorDocument.php:140) at Joomla\CMS\Document\ErrorDocument->render(false, array('template' => 'tp_easy', 'directory' => '/volume1/web/k204/templates', 'debug' => true, 'csp_nonce' => 'MWQ1M2MwYzI1NTkyODhjMGQ4YmY2MjZmMTg3ZTUxNzdmODhjZTlhMmNhY2Q3ZjNhNzhkNTZlYjY0OTdlOWJiZTgxYWEyNDE1NzFjNGYyYTYzZGViY2ExYzZhMzU5MzkzM2VhZTE1ZWMzNGYwMDQ3OGNiYTk4ODJhZDU2ZTVkZDc=', 'templateInherits' => '', 'params' => object(Registry), 'file' => 'error.php')) (/volume1/web/k204/libraries/src/Error/Renderer/HtmlRenderer.php:77) at Joomla\CMS\Error\Renderer\HtmlRenderer->render(object(Error)) (/volume1/web/k204/libraries/src/Exception/ExceptionHandler.php:128) at Joomla\CMS\Exception\ExceptionHandler::render(object(Error)) (/volume1/web/k204/libraries/src/Exception/ExceptionHandler.php:71) at Joomla\CMS\Exception\ExceptionHandler::handleException(object(Error)) (/volume1/web/k204/libraries/src/Application/CMSApplication.php:311) at Joomla\CMS\Application\CMSApplication->execute() (/volume1/web/k204/includes/app.php:63) at require_once('/volume1/web/k204/includes/app.php') (/volume1/web/k204/index.php:32) |
[1/2]
Error
|
---|
Error: Call to undefined function Astroid\Helper\exif_imagetype() at /volume1/web/k204/libraries/astroid/framework/library/astroid/Helper/Head.php:36 at Astroid\Helper\Head::favicon() (/volume1/web/k204/libraries/astroid/framework/frontend/document/body.php:21) at include('/volume1/web/k204/libraries/astroid/framework/frontend/document/body.php') (/volume1/web/k204/libraries/src/Layout/FileLayout.php:128) at Joomla\CMS\Layout\FileLayout->render(array()) (/volume1/web/k204/libraries/astroid/framework/library/astroid/Document.php:82) at Astroid\Document->include('document.body') (/volume1/web/k204/templates/tp_easy/index.php:32) at require('/volume1/web/k204/templates/tp_easy/index.php') (/volume1/web/k204/libraries/src/Document/HtmlDocument.php:771) at Joomla\CMS\Document\HtmlDocument->_loadTemplate('/volume1/web/k204/templates/tp_easy', 'index.php') (/volume1/web/k204/libraries/src/Document/HtmlDocument.php:830) at Joomla\CMS\Document\HtmlDocument->_fetchTemplate(array('template' => 'tp_easy', 'file' => 'index.php', 'params' => object(Registry), 'csp_nonce' => 'MWQ1M2MwYzI1NTkyODhjMGQ4YmY2MjZmMTg3ZTUxNzdmODhjZTlhMmNhY2Q3ZjNhNzhkNTZlYjY0OTdlOWJiZTgxYWEyNDE1NzFjNGYyYTYzZGViY2ExYzZhMzU5MzkzM2VhZTE1ZWMzNGYwMDQ3OGNiYTk4ODJhZDU2ZTVkZDc=', 'templateInherits' => null, 'directory' => '/volume1/web/k204/templates')) (/volume1/web/k204/libraries/src/Document/HtmlDocument.php:633) at Joomla\CMS\Document\HtmlDocument->parse(array('template' => 'tp_easy', 'file' => 'index.php', 'params' => object(Registry), 'csp_nonce' => 'MWQ1M2MwYzI1NTkyODhjMGQ4YmY2MjZmMTg3ZTUxNzdmODhjZTlhMmNhY2Q3ZjNhNzhkNTZlYjY0OTdlOWJiZTgxYWEyNDE1NzFjNGYyYTYzZGViY2ExYzZhMzU5MzkzM2VhZTE1ZWMzNGYwMDQ3OGNiYTk4ODJhZDU2ZTVkZDc=', 'templateInherits' => null, 'directory' => '/volume1/web/k204/templates')) (/volume1/web/k204/libraries/src/Application/CMSApplication.php:1022) at Joomla\CMS\Application\CMSApplication->render() (/volume1/web/k204/libraries/src/Application/SiteApplication.php:804) at Joomla\CMS\Application\SiteApplication->render() (/volume1/web/k204/libraries/src/Application/CMSApplication.php:284) at Joomla\CMS\Application\CMSApplication->execute() (/volume1/web/k204/includes/app.php:63) at require_once('/volume1/web/k204/includes/app.php') (/volume1/web/k204/index.php:32) |