} } } // 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'; $cache = new \RegularLabs\Library\Cache(['parameters.get_data_from_xml_path', $path, $modified_time, $full_info, $default_name]); if ($use_cache) { $cache->useFiles(); } if ($use_cache && $cache->exists()) { return $cache->get(); } if (!$file_exists) { return $cache->set((object) []); } $doc = new DOMDocument(); { $cache = new \RegularLabs\Library\Cache(['parameters.get_object_from_data', $path, $default_name, $params]); if ($use_cache && $cache->exists()) { return $cache->get(); } $data = self::getDataFromXmlPath($path, $use_cache, \false, $default_name); if (empty($params)) { return $cache->set($data); } if (is_array($params)) { $params = (object) $params; } if (empty($params)) { $plugin = JPluginHelper::getPlugin($type, $name); $params = is_object($plugin) && isset($plugin->params) ? $plugin->params : null; } return $cache->set(self::getObjectFromData($params, JPATH_PLUGINS . '/' . $type . '/' . $name . '/' . $name . '.xml')); } /** * @deprecated: use getDataFromXmlPath */ public static function loadXML(string $path, ?string $default_name = '', bool $use_cache = \true, bool $full_info = \false): array if ( ! is_null(self::$params)) { return self::$params; } self::$params = RL_Parameters::getPlugin('cachecleaner'); return self::$params; }} if (JFactory::getApplication() instanceof ConsoleApplication) { return 'clean'; } $params = Params::get(); $cleancache = trim(RL_Input::getString('cleancache', '')); // Clean via url if ( ! empty($cleancache)) { self::purgeThirdPartyCacheByUrl(); self::$plugin_id = $plugin_id; if ( ! self::getCleanType()) { return false; } // Run the main purge actions return true; } protected function handleOnAfterRoute(): void { Cache::clean($this->_id); }} { $this->_doc_ready = \true; if (!$this->passChecks()) { return; } $this->handleOnAfterRoute(); } public function onBeforeCompileHead(): void { if (!$this->passChecks()) { return; foreach ($this->listeners[$event->getName()] as $listener) { if ($event->isStopped()) { return $event; } $listener($event); } } return $event; } $dispatcher = $this->getDispatcher(); } catch (\UnexpectedValueException $exception) { return null; } return $dispatcher->dispatch($eventName, $event ?: new ApplicationEvent($eventName, $this)); } /** * Method to run the application routines. * $this->input->def($key, $value); } // Trigger the onAfterRoute event. PluginHelper::importPlugin('system', null, true, $this->getDispatcher()); $this->dispatchEvent( 'onAfterRoute', new AfterRouteEvent('onAfterRoute', ['subject' => $this]) ); $Itemid = $this->input->getInt('Itemid', 0); // 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 /var/www/vhosts/mystifying-sanderson.81-173-83-237.plesk.page/httpdocs/libraries/src/Application/SiteApplication.php:501
at Joomla\CMS\Application\SiteApplication->getTemplate()
(/var/www/vhosts/mystifying-sanderson.81-173-83-237.plesk.page/httpdocs/libraries/src/Error/Renderer/HtmlRenderer.php:50)
at Joomla\CMS\Error\Renderer\HtmlRenderer->render()
(/var/www/vhosts/mystifying-sanderson.81-173-83-237.plesk.page/httpdocs/libraries/src/Exception/ExceptionHandler.php:142)
at Joomla\CMS\Exception\ExceptionHandler::render()
(/var/www/vhosts/mystifying-sanderson.81-173-83-237.plesk.page/httpdocs/libraries/src/Exception/ExceptionHandler.php:76)
at Joomla\CMS\Exception\ExceptionHandler::handleException()
(/var/www/vhosts/mystifying-sanderson.81-173-83-237.plesk.page/httpdocs/libraries/src/Application/CMSApplication.php:334)
at Joomla\CMS\Application\CMSApplication->execute()
(/var/www/vhosts/mystifying-sanderson.81-173-83-237.plesk.page/httpdocs/includes/app.php:58)
at require_once('/var/www/vhosts/mystifying-sanderson.81-173-83-237.plesk.page/httpdocs/includes/app.php')
(/var/www/vhosts/mystifying-sanderson.81-173-83-237.plesk.page/httpdocs/index.php:51)
|
|
[1/2]
TypeError
|
|---|
TypeError:
RegularLabs\Library\Parameters::getDataFromXmlPath(): Return value must be of type object, false returned
at /var/www/vhosts/mystifying-sanderson.81-173-83-237.plesk.page/httpdocs/libraries/regularlabs/src/Parameters.php:47
at RegularLabs\Library\Parameters::getDataFromXmlPath()
(/var/www/vhosts/mystifying-sanderson.81-173-83-237.plesk.page/httpdocs/libraries/regularlabs/src/Parameters.php:106)
at RegularLabs\Library\Parameters::getObjectFromData()
(/var/www/vhosts/mystifying-sanderson.81-173-83-237.plesk.page/httpdocs/libraries/regularlabs/src/Parameters.php:153)
at RegularLabs\Library\Parameters::getPlugin()
(/var/www/vhosts/mystifying-sanderson.81-173-83-237.plesk.page/httpdocs/plugins/system/cachecleaner/src/Params.php:29)
at RegularLabs\Plugin\System\CacheCleaner\Params::get()
(/var/www/vhosts/mystifying-sanderson.81-173-83-237.plesk.page/httpdocs/plugins/system/cachecleaner/src/Cache.php:264)
at RegularLabs\Plugin\System\CacheCleaner\Cache::getCleanType()
(/var/www/vhosts/mystifying-sanderson.81-173-83-237.plesk.page/httpdocs/plugins/system/cachecleaner/src/Cache.php:51)
at RegularLabs\Plugin\System\CacheCleaner\Cache::clean()
(/var/www/vhosts/mystifying-sanderson.81-173-83-237.plesk.page/httpdocs/plugins/system/cachecleaner/src/Extension/CacheCleaner.php:36)
at RegularLabs\Plugin\System\CacheCleaner\Extension\CacheCleaner->handleOnAfterRoute()
(/var/www/vhosts/mystifying-sanderson.81-173-83-237.plesk.page/httpdocs/libraries/regularlabs/src/Plugin/System.php:214)
at RegularLabs\Library\Plugin\System->onAfterRoute()
(/var/www/vhosts/mystifying-sanderson.81-173-83-237.plesk.page/httpdocs/libraries/vendor/joomla/event/src/Dispatcher.php:454)
at Joomla\Event\Dispatcher->dispatch()
(/var/www/vhosts/mystifying-sanderson.81-173-83-237.plesk.page/httpdocs/libraries/vendor/joomla/application/src/AbstractApplication.php:99)
at Joomla\Application\AbstractApplication->dispatchEvent()
(/var/www/vhosts/mystifying-sanderson.81-173-83-237.plesk.page/httpdocs/libraries/src/Application/SiteApplication.php:819)
at Joomla\CMS\Application\SiteApplication->route()
(/var/www/vhosts/mystifying-sanderson.81-173-83-237.plesk.page/httpdocs/libraries/src/Application/SiteApplication.php:243)
at Joomla\CMS\Application\SiteApplication->doExecute()
(/var/www/vhosts/mystifying-sanderson.81-173-83-237.plesk.page/httpdocs/libraries/src/Application/CMSApplication.php:304)
at Joomla\CMS\Application\CMSApplication->execute()
(/var/www/vhosts/mystifying-sanderson.81-173-83-237.plesk.page/httpdocs/includes/app.php:58)
at require_once('/var/www/vhosts/mystifying-sanderson.81-173-83-237.plesk.page/httpdocs/includes/app.php')
(/var/www/vhosts/mystifying-sanderson.81-173-83-237.plesk.page/httpdocs/index.php:51)
|