} } } // Need to filter the default value as well $template->template = InputFilter::getInstance()->clean($template->template, 'cmd'); // Fallback template if (!empty($template->parent)) { if (!is_file(JPATH_THEMES . '/' . $template->template . '/index.php')) { if (!is_file(JPATH_THEMES . '/' . $template->parent . '/index.php')) { public function render(\Throwable $error): string { $app = Factory::getApplication(); // Get the current template from the application $template = $app->getTemplate(true); // Push the error object into the document $this->getDocument()->setError($error); // Add registry file for the template asset 'subject' => $app, 'document' => $renderer->getDocument(), ]) ); $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->dispatchEvent('onError', $event); ExceptionHandler::handleException($event->getError()); } // Trigger the onBeforeRespond event. $this->dispatchEvent( 'onBeforeRespond',// Set the application as global app\Joomla\CMS\Factory::$application = $app;// Execute the application.$app->execute(); // ... die die();}// Run the application - All executable code should be triggered through this filerequire_once __DIR__ . '/includes/app.php'; $app->enqueueMessage($message, 'error');
$app->setHeader('status', $code, true);
break;
default:
throw new \Exception($message, $code);
break;
}
}
public static function getAnalitycs()
function raiseError()
{
$language = Factory::getLanguage();
$language->load('com_gridbox');
return GridboxHelper::raiseError(404, $language->_('NOT_FOUND'));
}
function getTagsVars($alias, $blog = null, $tableName = 'tag')
{
$db = Factory::getDbo();
}
} else {
$vars['view'] = 'page';
}
if (empty($id) && $id !== 0) {
return raiseError();
}
$vars['id'] = $id;
$segments = [];
return $vars;
if (\count($segments)) { // Handle component route $component = preg_replace('/[^A-Z0-9_\.-]/i', '', $uri->getVar('option')); $crouter = $this->getComponentRouter($component); $uri->setQuery(array_merge($uri->getQuery(true), $crouter->parse($segments))); } $route = implode('/', $segments); } if (!\array_key_exists('parse' . $stage, $this->rules)) { throw new \InvalidArgumentException(\sprintf('The %s stage is not registered. (%s)', $stage, __METHOD__)); } foreach ($this->rules['parse' . $stage] as $rule) { $rule($this, $uri); } } /** * Process the build uri query data based on custom defined rules // Do the preprocess stage of the URL parse process $this->processParseRules($uri, self::PROCESS_BEFORE); // Do the main stage of the URL parse process $this->processParseRules($uri); // Do the postprocess stage of the URL parse process $this->processParseRules($uri, self::PROCESS_AFTER); // Check if all parts of the URL have been parsed. // Get the full request URI. $uri = clone Uri::getInstance(); // It is not possible to inject the SiteRouter as it requires a SiteApplication // and we would end in an infinite loop $result = $this->getContainer()->get(SiteRouter::class)->parse($uri, true); $active = $this->getMenu()->getActive(); if ( $active !== null // Mark afterInitialise in the profiler. JDEBUG ? $this->profiler->mark('afterInitialise') : null; // Route the application $this->route(); // Mark afterRoute in the profiler. JDEBUG ? $this->profiler->mark('afterRoute') : null; if (!$this->isHandlingMultiFactorAuthentication()) { $this->sanityCheckSystemVariables(); $this->setupLogging(); $this->createExtensionNamespaceMap(); // Perform application routines. $this->doExecute(); // If we have an application document object, render it. if ($this->document instanceof \Joomla\CMS\Document\Document) { // Render the application output. $this->render();// Set the application as global app\Joomla\CMS\Factory::$application = $app;// Execute the application.$app->execute(); // ... die die();}// Run the application - All executable code should be triggered through this filerequire_once __DIR__ . '/includes/app.php';|
[2/2]
Error
|
|---|
Error:
Attempt to assign property "template" on null
at /home/portalconif/public_html/portal/libraries/src/Application/SiteApplication.php:501
at Joomla\CMS\Application\SiteApplication->getTemplate(true)
(/home/portalconif/public_html/portal/libraries/src/Error/Renderer/HtmlRenderer.php:50)
at Joomla\CMS\Error\Renderer\HtmlRenderer->render(object(Exception))
(/home/portalconif/public_html/portal/libraries/src/Exception/ExceptionHandler.php:142)
at Joomla\CMS\Exception\ExceptionHandler::render(object(Exception))
(/home/portalconif/public_html/portal/libraries/src/Exception/ExceptionHandler.php:76)
at Joomla\CMS\Exception\ExceptionHandler::handleException(object(Exception))
(/home/portalconif/public_html/portal/libraries/src/Application/CMSApplication.php:334)
at Joomla\CMS\Application\CMSApplication->execute()
(/home/portalconif/public_html/portal/includes/app.php:58)
at require_once('/home/portalconif/public_html/portal/includes/app.php')
(/home/portalconif/public_html/portal/index.php:54)
|
|
[1/2]
Exception
|
|---|
Exception:
Página não encontrada
at /home/portalconif/public_html/portal/components/com_gridbox/src/Helper/GridboxHelper.php:12451
at Balbooa\Component\Gridbox\Site\Helper\GridboxHelper::raiseError(404, 'Página não encontrada')
(/home/portalconif/public_html/portal/components/com_gridbox/src/Service/Router.php:346)
at Balbooa\Component\Gridbox\Site\Service\raiseError()
(/home/portalconif/public_html/portal/components/com_gridbox/src/Service/Router.php:332)
at Balbooa\Component\Gridbox\Site\Service\Router->parse(array('items', '757595802'))
(/home/portalconif/public_html/portal/libraries/src/Router/SiteRouter.php:287)
at Joomla\CMS\Router\SiteRouter->parseSefRoute(object(SiteRouter), object(Uri))
(/home/portalconif/public_html/portal/libraries/src/Router/Router.php:423)
at Joomla\CMS\Router\Router->processParseRules(object(Uri))
(/home/portalconif/public_html/portal/libraries/src/Router/Router.php:158)
at Joomla\CMS\Router\Router->parse(object(Uri), true)
(/home/portalconif/public_html/portal/libraries/src/Application/SiteApplication.php:767)
at Joomla\CMS\Application\SiteApplication->route()
(/home/portalconif/public_html/portal/libraries/src/Application/SiteApplication.php:243)
at Joomla\CMS\Application\SiteApplication->doExecute()
(/home/portalconif/public_html/portal/libraries/src/Application/CMSApplication.php:304)
at Joomla\CMS\Application\CMSApplication->execute()
(/home/portalconif/public_html/portal/includes/app.php:58)
at require_once('/home/portalconif/public_html/portal/includes/app.php')
(/home/portalconif/public_html/portal/index.php:54)
|