if ($cache->contains($cacheId)) { $templates = $cache->get($cacheId); } else { $templates = $this->bootComponent('templates')->getMVCFactory() ->createModel('Style', 'Administrator')->getSiteTemplates(); foreach ($templates as $template) { // Create home element if ($template->home == 1 && !isset($template_home) || $this->getLanguageFilter() && $template->home == $tag) { $template_home = clone $template; */ protected function initialiseTemplate(): void { $id = $this->getTemplateStyleId(); $templates = $this->getTemplates(); $template = $templates[$id] ?? $templates[0]; // Allows for overriding the active template from the request $template_override = $this->input->getCmd('template', ''); * @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'; require_once JPATH_ROOT . '/administrator/components/com_sppagebuilder/editor/helpers/LanguageHelper.php'; } if (!class_exists('SppagebuilderHelper')) { require_once JPATH_ROOT . '/administrator/components/com_sppagebuilder/helpers/sppagebuilder.php'; } if (!class_exists('BuilderMediaHelper')) { require_once JPATH_ROOT . '/administrator/components/com_sppagebuilder/helpers/media-helper.php';require_once JPATH_ROOT . '/components/com_sppagebuilder/helpers/autoload.php';require_once JPATH_ROOT . '/components/com_sppagebuilder/helpers/route.php';require_once JPATH_ROOT . '/components/com_sppagebuilder/helpers/constants.php';BuilderAutoload::loadClasses();BuilderAutoload::loadHelperClasses();class plgSystemSppagebuilder extends CMSPlugin{ protected $autoloadLanguage = true; if (!is_file($path)) { return new DummyPlugin($dispatcher); } // Include the file of the plugin require_once $path; // Compile the classname $className = 'Plg' . str_replace('-', '', $type) . $plugin; // Editors don't follow the convention case ModuleInterface::class: $container->set($type, new Module(new ModuleDispatcherFactory(''), new HelperFactory(''))); break; case PluginInterface::class: [$pluginName, $pluginType] = explode(':', $extensionName); $container->set($type, $this->loadPluginFromFilesystem($pluginName, $pluginType)); } } $container->get(DispatcherInterface::class)->dispatch( 'onAfterExtensionBoot', $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 // 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 $this->dispatchEvent( 'onBeforeExecute', new BeforeExecuteEvent('onBeforeExecute', ['subject' => $this, 'container' => $this->getContainer()])// 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:
Call to a member function getSiteTemplates() on false
at /home1/hg090833/romaqindustria.com.br/libraries/src/Application/SiteApplication.php:852
at Joomla\CMS\Application\SiteApplication->getTemplates()
(/home1/hg090833/romaqindustria.com.br/libraries/src/Application/SiteApplication.php:758)
at Joomla\CMS\Application\SiteApplication->initialiseTemplate()
(/home1/hg090833/romaqindustria.com.br/libraries/src/Application/CMSApplication.php:721)
at Joomla\CMS\Application\CMSApplication->getTemplate(true)
(/home1/hg090833/romaqindustria.com.br/libraries/src/Error/Renderer/HtmlRenderer.php:50)
at Joomla\CMS\Error\Renderer\HtmlRenderer->render(object(Error))
(/home1/hg090833/romaqindustria.com.br/libraries/src/Exception/ExceptionHandler.php:142)
at Joomla\CMS\Exception\ExceptionHandler::render(object(Error))
(/home1/hg090833/romaqindustria.com.br/libraries/src/Exception/ExceptionHandler.php:76)
at Joomla\CMS\Exception\ExceptionHandler::handleException(object(Error))
(/home1/hg090833/romaqindustria.com.br/libraries/src/Application/CMSApplication.php:350)
at Joomla\CMS\Application\CMSApplication->execute()
(/home1/hg090833/romaqindustria.com.br/includes/app.php:58)
at require_once('/home1/hg090833/romaqindustria.com.br/includes/app.php')
(/home1/hg090833/romaqindustria.com.br/index.php:51)
|
|
[1/2]
Error
|
|---|
Error:
Failed opening required '/home1/hg090833/romaqindustria.com.br/administrator/components/com_sppagebuilder/helpers/sppagebuilder.php' (include_path='.:/opt/cpanel/ea-php83/root/usr/share/pear')
at /home1/hg090833/romaqindustria.com.br/components/com_sppagebuilder/helpers/autoload.php:85
at BuilderAutoload::loadHelperClasses()
(/home1/hg090833/romaqindustria.com.br/plugins/system/sppagebuilder/sppagebuilder.php:35)
at require_once('/home1/hg090833/romaqindustria.com.br/plugins/system/sppagebuilder/sppagebuilder.php')
(/home1/hg090833/romaqindustria.com.br/libraries/src/Extension/ExtensionManagerTrait.php:217)
at Joomla\CMS\Application\CMSApplication->loadPluginFromFilesystem('sppagebuilder', 'system')
(/home1/hg090833/romaqindustria.com.br/libraries/src/Extension/ExtensionManagerTrait.php:160)
at Joomla\CMS\Application\CMSApplication->loadExtension('Joomla\\CMS\\Extension\\PluginInterface', 'sppagebuilder:system', '/home1/hg090833/romaqindustria.com.br/plugins/system/sppagebuilder')
(/home1/hg090833/romaqindustria.com.br/libraries/src/Extension/ExtensionManagerTrait.php:99)
at Joomla\CMS\Application\CMSApplication->bootPlugin('sppagebuilder', 'system')
(/home1/hg090833/romaqindustria.com.br/libraries/src/Plugin/PluginHelper.php:233)
at Joomla\CMS\Plugin\PluginHelper::import(object(stdClass), true, object(Dispatcher))
(/home1/hg090833/romaqindustria.com.br/libraries/src/Plugin/PluginHelper.php:193)
at Joomla\CMS\Plugin\PluginHelper::importPlugin('system', null, true, object(Dispatcher))
(/home1/hg090833/romaqindustria.com.br/libraries/src/Application/CMSApplication.php:308)
at Joomla\CMS\Application\CMSApplication->execute()
(/home1/hg090833/romaqindustria.com.br/includes/app.php:58)
at require_once('/home1/hg090833/romaqindustria.com.br/includes/app.php')
(/home1/hg090833/romaqindustria.com.br/index.php:51)
|