} } } // 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')) { */ protected static function getTemplate(): ?object { /** @var CMSApplication $joomla */ $joomla = app(CMSApplication::class); $template = $joomla->getTemplate(true); // get site template if ($joomla->isClient('administrator')) { $input = $joomla->getInput(); $view = $input->getCmd('view') === 'style'; /** * Initialize current theme. */ public static function initTheme(): void { $template = static::getTemplate(); // is template active? if (!empty($template->params['yootheme'])) { static::loadConfiguration($template); Event::emit('theme.init'); $resolver = new ParameterResolver($this); $function = Reflection::getFunction($callable); $parameters = $resolver->resolve($function, $parameters); } return $callable(...$parameters); } /** * Wraps the callback with optional parameter resolving. * $this->dispatcher->addListener( $event, fn(...$arguments) => $isStatic && !ParameterResolver::needsResolving($listener) ? $listener(...$arguments) : $container->call($listener, $arguments), ...$params, ); }} foreach ($this->listeners[$event->getName()] as $listener) { if ($event->isStopped()) { return $event; } $listener($event); } } return $event; } // 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); // Trigger the onAfterInitialiseDocument event. $app->getDispatcher()->dispatch( 'onAfterInitialiseDocument', new AfterInitialiseDocumentEvent('onAfterInitialiseDocument', [ 'subject' => $app, 'document' => $renderer->getDocument(), ]) * @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'; } } } // 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')) { // Set metadata $document->setMetaData('rights', $this->get('MetaRights')); // Get the template $template = $this->getTemplate(true); // Store the template and its params to the config $this->set('theme', $template->template); $this->set('themeParams', $template->params); ['option' => 'com_users', 'task' => 'method.save'], ]); } // Dispatch the application $this->dispatch(); // Mark afterDispatch in the profiler. JDEBUG ? $this->profiler->mark('afterDispatch') : null; } $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/gre49666/public_html/libraries/src/Application/SiteApplication.php:501
at Joomla\CMS\Application\SiteApplication->getTemplate(true)
(/home/gre49666/public_html/templates/yootheme/packages/theme-joomla/src/ThemeLoader.php:102)
at YOOtheme\Theme\Joomla\ThemeLoader::getTemplate()
(/home/gre49666/public_html/templates/yootheme/packages/theme-joomla/src/ThemeLoader.php:42)
at YOOtheme\Theme\Joomla\ThemeLoader::initTheme(object(AfterInitialiseDocumentEvent))
(/home/gre49666/public_html/templates/yootheme/packages/container/src/Container.php:229)
at YOOtheme\Container->call(array('YOOtheme\\Theme\\Joomla\\ThemeLoader', 'initTheme'), array(object(AfterInitialiseDocumentEvent)))
(/home/gre49666/public_html/templates/yootheme/packages/application/src/Application/EventLoader.php:65)
at YOOtheme\Application\EventLoader->YOOtheme\Application\{closure}(object(AfterInitialiseDocumentEvent))
(/home/gre49666/public_html/libraries/vendor/joomla/event/src/Dispatcher.php:454)
at Joomla\Event\Dispatcher->dispatch('onAfterInitialiseDocument', object(AfterInitialiseDocumentEvent))
(/home/gre49666/public_html/libraries/src/Exception/ExceptionHandler.php:134)
at Joomla\CMS\Exception\ExceptionHandler::render(object(Error))
(/home/gre49666/public_html/libraries/src/Exception/ExceptionHandler.php:76)
at Joomla\CMS\Exception\ExceptionHandler::handleException(object(Error))
(/home/gre49666/public_html/libraries/src/Application/CMSApplication.php:334)
at Joomla\CMS\Application\CMSApplication->execute()
(/home/gre49666/public_html/includes/app.php:58)
at require_once('/home/gre49666/public_html/includes/app.php')
(/home/gre49666/public_html/index.php:51)
|
|
[1/2]
Error
|
|---|
Error:
Attempt to assign property "template" on null
at /home/gre49666/public_html/libraries/src/Application/SiteApplication.php:501
at Joomla\CMS\Application\SiteApplication->getTemplate(true)
(/home/gre49666/public_html/libraries/src/Application/SiteApplication.php:174)
at Joomla\CMS\Application\SiteApplication->dispatch()
(/home/gre49666/public_html/libraries/src/Application/SiteApplication.php:271)
at Joomla\CMS\Application\SiteApplication->doExecute()
(/home/gre49666/public_html/libraries/src/Application/CMSApplication.php:304)
at Joomla\CMS\Application\CMSApplication->execute()
(/home/gre49666/public_html/includes/app.php:58)
at require_once('/home/gre49666/public_html/includes/app.php')
(/home/gre49666/public_html/index.php:51)
|