$template = $tmpl; } } // Need to filter the default value as well $template->template = InputFilter::getInstance()->clean($template->template, 'cmd'); // Fallback template if (!$this->isValidTemplate($template)) { $this->enqueueMessage(Text::_('JERROR_ALERTNOTEMPLATE'), 'error'); * @since 3.2 */ public function getTemplate($params = false) { if (!\is_object($this->template)) { $this->initialiseTemplate(); } if (!$this->isValidTemplate($this->template)) { throw new \InvalidArgumentException( Text::sprintf('JERROR_COULD_NOT_FIND_TEMPLATE', $this->template->template) 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'; // The compatibility plugin is a special case which does not use the lazy loading because it // uses the constructor to load b/c code, the constructor might not be initialized when lazy loading is used. $container->set( PluginInterface::class, function (Container $container) { $plugin = new Compat6((array) PluginHelper::getPlugin('behaviour', 'compat6')); $plugin->setApplication(Factory::getApplication()); return $plugin; } ); } return $this->instance; } return $callable($this->container); } /** * Get the factory * } throw new KeyNotFoundException(sprintf("Resource '%s' has not been registered with the container.", $resourceName)); } return $this->resources[$key]->getInstance(); } /** * Check if specified resource exists. * 'container' => $container, ] ) ); $extension = $container->get($type); if ($extension instanceof BootableExtensionInterface) { $extension->boot($container); } $plugin = str_starts_with($plugin, 'plg_') ? substr($plugin, 4) : $plugin; // Path to look for services $path = JPATH_SITE . '/plugins/' . $type . '/' . $plugin; return $this->loadExtension(PluginInterface::class, $plugin . ':' . $type, $path); } /** * Loads the extension. * return; } $plugins[$hash] = true; $plugin = Factory::getApplication()->bootPlugin($plugin->name, $plugin->type); if (!$autocreate) { return; } $plugins = static::load(); // Get the specified plugin(s). foreach ($plugins as $value) { if ($value->type === $type && ($plugin === null || $value->name === $plugin)) { static::import($value, $autocreate, $dispatcher); $results = true; } } // Bail out early if we're not using default args $this->sanityCheckSystemVariables(); $this->setupLogging(); $this->createExtensionNamespaceMap(); // Load the behaviour plugins PluginHelper::importPlugin('behaviour', null, true, $this->getDispatcher()); // Load the system plugins PluginHelper::importPlugin('system', null, true, $this->getDispatcher()); // Trigger the onBeforeExecute event// 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/clients/ae0a0497439bde9968fe7bcf44c2df91/sites/olifants.ch/libraries/src/Application/SiteApplication.php:775
at Joomla\CMS\Application\SiteApplication->initialiseTemplate()
(/home/clients/ae0a0497439bde9968fe7bcf44c2df91/sites/olifants.ch/libraries/src/Application/CMSApplication.php:721)
at Joomla\CMS\Application\CMSApplication->getTemplate(true)
(/home/clients/ae0a0497439bde9968fe7bcf44c2df91/sites/olifants.ch/libraries/src/Error/Renderer/HtmlRenderer.php:50)
at Joomla\CMS\Error\Renderer\HtmlRenderer->render(object(Error))
(/home/clients/ae0a0497439bde9968fe7bcf44c2df91/sites/olifants.ch/libraries/src/Exception/ExceptionHandler.php:142)
at Joomla\CMS\Exception\ExceptionHandler::render(object(Error))
(/home/clients/ae0a0497439bde9968fe7bcf44c2df91/sites/olifants.ch/libraries/src/Exception/ExceptionHandler.php:76)
at Joomla\CMS\Exception\ExceptionHandler::handleException(object(Error))
(/home/clients/ae0a0497439bde9968fe7bcf44c2df91/sites/olifants.ch/libraries/src/Application/CMSApplication.php:350)
at Joomla\CMS\Application\CMSApplication->execute()
(/home/clients/ae0a0497439bde9968fe7bcf44c2df91/sites/olifants.ch/includes/app.php:58)
at require_once('/home/clients/ae0a0497439bde9968fe7bcf44c2df91/sites/olifants.ch/includes/app.php')
(/home/clients/ae0a0497439bde9968fe7bcf44c2df91/sites/olifants.ch/index.php:54)
|
|
[1/2]
Error
|
|---|
Error:
Class "Joomla\Plugin\Behaviour\Compat6\Extension\Compat6" not found
at /home/clients/ae0a0497439bde9968fe7bcf44c2df91/sites/olifants.ch/plugins/behaviour/compat6/services/provider.php:36
at Joomla\DI\ServiceProviderInterface@anonymous /home/clients/ae0a0497439bde9968fe7bcf44c2df91/sites/olifants.ch/plugins/behaviour/compat6/services/provider.php:20$e5f->{closure:Joomla\DI\ServiceProviderInterface@anonymous /home/clients/ae0a0497439bde9968fe7bcf44c2df91/sites/olifants.ch/plugins/behaviour/compat6/services/provider.php:20$e5f::register():35}(object(Container))
(/home/clients/ae0a0497439bde9968fe7bcf44c2df91/sites/olifants.ch/libraries/vendor/joomla/di/src/ContainerResource.php:168)
at Joomla\DI\ContainerResource->getInstance()
(/home/clients/ae0a0497439bde9968fe7bcf44c2df91/sites/olifants.ch/libraries/vendor/joomla/di/src/Container.php:95)
at Joomla\DI\Container->get('Joomla\\CMS\\Extension\\PluginInterface')
(/home/clients/ae0a0497439bde9968fe7bcf44c2df91/sites/olifants.ch/libraries/src/Extension/ExtensionManagerTrait.php:177)
at Joomla\CMS\Application\CMSApplication->loadExtension('Joomla\\CMS\\Extension\\PluginInterface', 'compat6:behaviour', '/home/clients/ae0a0497439bde9968fe7bcf44c2df91/sites/olifants.ch/plugins/behaviour/compat6')
(/home/clients/ae0a0497439bde9968fe7bcf44c2df91/sites/olifants.ch/libraries/src/Extension/ExtensionManagerTrait.php:99)
at Joomla\CMS\Application\CMSApplication->bootPlugin('compat6', 'behaviour')
(/home/clients/ae0a0497439bde9968fe7bcf44c2df91/sites/olifants.ch/libraries/src/Plugin/PluginHelper.php:233)
at Joomla\CMS\Plugin\PluginHelper::import(object(stdClass), true, object(Dispatcher))
(/home/clients/ae0a0497439bde9968fe7bcf44c2df91/sites/olifants.ch/libraries/src/Plugin/PluginHelper.php:193)
at Joomla\CMS\Plugin\PluginHelper::importPlugin('behaviour', null, true, object(Dispatcher))
(/home/clients/ae0a0497439bde9968fe7bcf44c2df91/sites/olifants.ch/libraries/src/Application/CMSApplication.php:305)
at Joomla\CMS\Application\CMSApplication->execute()
(/home/clients/ae0a0497439bde9968fe7bcf44c2df91/sites/olifants.ch/includes/app.php:58)
at require_once('/home/clients/ae0a0497439bde9968fe7bcf44c2df91/sites/olifants.ch/includes/app.php')
(/home/clients/ae0a0497439bde9968fe7bcf44c2df91/sites/olifants.ch/index.php:54)
|