}
}
}
// 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();
* 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';
* */
define('COMMUNITY_FREE_VERSION', false);
define('COMMUNITY_PRO_VERSION', true);
define('COMMUNITY_COM_PATH', JPATH_ROOT . '/components/com_community');
define('COMMUNITY_COM_URL', JURI::base() . 'components/com_community');
/**
* @todo Remove these old defines
*/
define('COMMUNITY_PRIVACY_PRIVATE', 0);
spl_autoload_register('CFactory::autoload_helpers');
spl_autoload_register('CFactory::autoload_events');
spl_autoload_register('CFactory::autoload_tables');
// @todo: to be removed once the functions has be autoloaded
require_once (JPATH_ROOT . '/components/com_community/defines.community.php');
/**
* Register Joomla! autoloading
*/
/* Register our APIs classes */
* More info at https://www.jomsocial.com/license-agreement
*/
defined('_JEXEC') or die('Restricted access');
include_once JPATH_BASE.'/components/com_community/libraries/core.php';
function CommunityBuildRoute(&$query)
{
$app = JFactory::getApplication();
$segments = array();
// Use the component routing handler if it exists
$path = JPATH_SITE . '/components/com_' . $this->component . '/router.php';
// Use the custom routing handler if it exists
if (is_file($path)) {
require_once $path;
}
}
if (class_exists($class)) {
$reflection = new \ReflectionClass($class);
{
if (!isset($this->componentRouters[$component])) {
$componentInstance = $this->app->bootComponent($component);
if ($componentInstance instanceof RouterServiceInterface) {
$this->componentRouters[$component] = $componentInstance->createRouter($this->app, $this->menu);
}
if (!isset($this->componentRouters[$component])) {
$this->componentRouters[$component] = new RouterLegacy(ucfirst(substr($component, 4)));
}
$segments = explode('/', $route);
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();
* 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]
Error
|
---|
Error: Attempt to assign property "template" on null at /home/ijumponl/public_html/libraries/src/Application/SiteApplication.php:506 at Joomla\CMS\Application\SiteApplication->getTemplate(true) (/home/ijumponl/public_html/libraries/src/Error/Renderer/HtmlRenderer.php:50) at Joomla\CMS\Error\Renderer\HtmlRenderer->render(object(Error)) (/home/ijumponl/public_html/libraries/src/Exception/ExceptionHandler.php:136) at Joomla\CMS\Exception\ExceptionHandler::render(object(Error)) (/home/ijumponl/public_html/libraries/src/Exception/ExceptionHandler.php:73) at Joomla\CMS\Exception\ExceptionHandler::handleException(object(Error)) (/home/ijumponl/public_html/libraries/src/Application/CMSApplication.php:336) at Joomla\CMS\Application\CMSApplication->execute() (/home/ijumponl/public_html/includes/app.php:58) at require_once('/home/ijumponl/public_html/includes/app.php') (/home/ijumponl/public_html/index.php:32) |
[1/2]
Error
|
---|
Error: Class "JURI" not found at /home/ijumponl/public_html/components/com_community/defines.community.php:22 at require_once() (/home/ijumponl/public_html/components/com_community/libraries/core.php:27) at include_once('/home/ijumponl/public_html/components/com_community/libraries/core.php') (/home/ijumponl/public_html/components/com_community/router.php:13) at require_once('/home/ijumponl/public_html/components/com_community/router.php') (/home/ijumponl/public_html/libraries/src/Extension/LegacyComponent.php:238) at Joomla\CMS\Extension\LegacyComponent->createRouter(object(SiteApplication), object(SiteMenu)) (/home/ijumponl/public_html/libraries/src/Router/SiteRouter.php:568) at Joomla\CMS\Router\SiteRouter->getComponentRouter('com_community') (/home/ijumponl/public_html/libraries/src/Router/SiteRouter.php:286) at Joomla\CMS\Router\SiteRouter->parseSefRoute(object(SiteRouter), object(Uri)) (/home/ijumponl/public_html/libraries/src/Router/Router.php:384) at Joomla\CMS\Router\Router->processParseRules(object(Uri)) (/home/ijumponl/public_html/libraries/src/Router/Router.php:147) at Joomla\CMS\Router\Router->parse(object(Uri), true) (/home/ijumponl/public_html/libraries/src/Application/SiteApplication.php:754) at Joomla\CMS\Application\SiteApplication->route() (/home/ijumponl/public_html/libraries/src/Application/SiteApplication.php:244) at Joomla\CMS\Application\SiteApplication->doExecute() (/home/ijumponl/public_html/libraries/src/Application/CMSApplication.php:306) at Joomla\CMS\Application\CMSApplication->execute() (/home/ijumponl/public_html/includes/app.php:58) at require_once('/home/ijumponl/public_html/includes/app.php') (/home/ijumponl/public_html/index.php:32) |