// Look for the home menu if (Multilanguage::isEnabled()) { return $menu->getDefault($app->getLanguage()->getTag()); } return $menu->getDefault(); } /** * Get a list of the menu items. */ public function getActiveItem(CMSApplicationInterface $app): object { $menu = $app->getMenu(); return $menu->getActive() ?: $this->getDefaultItem($app); } /** * Get default menu item (home page) for current language. * $base = false; } // Use active menu item if no base found if (!$base) { $base = $this->getActiveItem($app); } return $base; } public function getItems(Registry &$params, CMSApplicationInterface $app): array { $menu = $app->getMenu(); // Get active menu item $base = $this->getBaseItem($params, $app); $levels = $app->getIdentity()->getAuthorisedViewLevels(); asort($levels); // Compose cache key $cacheKey = 'menu_items' . $params . implode(',', $levels) . '.' . $base->id; { $data = parent::getLayoutData(); $menuHelper = $this->getHelperFactory()->getHelper('MenuHelper'); $data['list'] = $menuHelper->getItems($data['params'], $data['app']); $data['base'] = $menuHelper->getBaseItem($data['params'], $data['app']); $data['active'] = $menuHelper->getActiveItem($data['app']); $data['default'] = $menuHelper->getDefaultItem($data['app']); $data['active_id'] = $data['active']->id; $data['default_id'] = $data['default']->id; * * @since 5.4.0 */ public function dispatch() { $displayData = $this->getLayoutData(); if (!$displayData['list']) { return; } $dispatcher = $app->bootModule($module->module, $app->getName())->getDispatcher($module, $app); // Check if we have a dispatcher if ($dispatcher) { ob_start(); $dispatcher->dispatch(); $module->content = ob_get_clean(); } // Add the flag that the module content has been rendered $module->contentRendered = true; // Get module parameters $params = new Registry($module->params); // Render the module content static::renderRawModule($module, $params, $attribs); // Return early if only the content is required if (!empty($attribs['contentOnly'])) { return $module->content; } $module->contentRendered = true; return $module->content; } return ModuleHelper::renderModule($module, $attribs); }} $user = Factory::getUser(); $frontediting = ($app->isClient('site') && $app->get('frontediting', 1) && !$user->guest); $menusEditing = ($app->get('frontediting', 1) == 2) && $user->authorise('core.edit', 'com_menus'); foreach (ModuleHelper::getModules($position) as $mod) { $moduleHtml = $renderer->render($mod, $params, $content); if ($frontediting && trim($moduleHtml) != '' && $user->authorise('module.edit.frontend', 'com_modules.module.' . $mod->id)) { $displayData = ['moduleHtml' => &$moduleHtml, 'module' => $mod, 'position' => $position, 'menusediting' => $menusEditing]; LayoutHelper::render('joomla.edit.frontediting_modules', $displayData); } $cbuffer[$hash] = $tmpdata; $cache->store($cbuffer, 'cbuffer_' . $type); } else { $this->setBuffer($renderer->render($name, $attribs, null), $type, $name, $title); } return parent::$_buffer[$type][$name][$title]; } $replace = []; $with = []; foreach ($this->_template_tags as $jdoc => $args) { $replace[] = $jdoc; $with[] = $this->getBuffer($args['type'], $args['name'], $args['attribs']); } return str_replace($replace, $with, $this->_template); }} if (\array_key_exists('csp_nonce', $params) && $params['csp_nonce'] !== null) { $this->cspNonce = $params['csp_nonce']; } $data = $this->_renderTemplate(); parent::render($caching, $params); return $data; } $this->debug = $params['debug'] ?? false; $this->error = $this->_error; $params['file'] = 'error.php'; return parent::render($cache, $params); } /** * Render the backtrace * ob_end_clean(); } $this->getDocument()->setTitle(Text::_('Error') . ': ' . $error->getCode()); return $this->getDocument()->render( false, [ 'template' => $template->template, 'directory' => JPATH_THEMES, 'debug' => JDEBUG, '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'; $lang->load('tpl_' . $template, JPATH_BASE) || $lang->load('tpl_' . $template, JPATH_THEMES . "/$template"); } if (empty($option)) { throw new MissingComponentException(Text::_('JLIB_APPLICATION_ERROR_COMPONENT_NOT_FOUND'), 404); } if (JDEBUG) { Profiler::getInstance('Application')->mark('beforeRenderComponent ' . $option); } $this->dispatchEvent( 'onAfterInitialiseDocument', new AfterInitialiseDocumentEvent('onAfterInitialiseDocument', ['subject' => $this, 'document' => $document]) ); $contents = ComponentHelper::renderComponent($component); $document->setBuffer($contents, ['type' => 'component']); // Trigger the onAfterDispatch event. $this->dispatchEvent( 'onAfterDispatch', ['option' => 'com_users', 'task' => 'method.save'], ]); } // Dispatch the application $this->dispatch(); // Mark afterDispatch in the profiler. JDEBUG ? $this->profiler->mark('afterDispatch') : null; } // Mark beforeExecute in the profiler. JDEBUG ? $this->profiler->mark('beforeExecute event dispatched') : null; // 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]
TypeError
|
|---|
TypeError:
Joomla\Module\Menu\Site\Helper\MenuHelper::getDefaultItem(): Return value must be of type object, null returned
at /www/htdocs/w01374a6/subdomain-access/j6.datenablage.info/modules/mod_menu/src/Helper/MenuHelper.php:246
at Joomla\Module\Menu\Site\Helper\MenuHelper->getDefaultItem(object(SiteApplication))
(/www/htdocs/w01374a6/subdomain-access/j6.datenablage.info/modules/mod_menu/src/Helper/MenuHelper.php:225)
at Joomla\Module\Menu\Site\Helper\MenuHelper->getActiveItem(object(SiteApplication))
(/www/htdocs/w01374a6/subdomain-access/j6.datenablage.info/modules/mod_menu/src/Helper/MenuHelper.php:206)
at Joomla\Module\Menu\Site\Helper\MenuHelper->getBaseItem(object(Registry), object(SiteApplication))
(/www/htdocs/w01374a6/subdomain-access/j6.datenablage.info/modules/mod_menu/src/Helper/MenuHelper.php:47)
at Joomla\Module\Menu\Site\Helper\MenuHelper->getItems(object(Registry), object(SiteApplication))
(/www/htdocs/w01374a6/subdomain-access/j6.datenablage.info/modules/mod_menu/src/Dispatcher/Dispatcher.php:61)
at Joomla\Module\Menu\Site\Dispatcher\Dispatcher->getLayoutData()
(/www/htdocs/w01374a6/subdomain-access/j6.datenablage.info/modules/mod_menu/src/Dispatcher/Dispatcher.php:39)
at Joomla\Module\Menu\Site\Dispatcher\Dispatcher->dispatch()
(/www/htdocs/w01374a6/subdomain-access/j6.datenablage.info/libraries/src/Helper/ModuleHelper.php:289)
at Joomla\CMS\Helper\ModuleHelper::renderRawModule(object(stdClass), object(Registry), array('name' => 'menu', 'style' => 'none'))
(/www/htdocs/w01374a6/subdomain-access/j6.datenablage.info/libraries/src/Helper/ModuleHelper.php:160)
at Joomla\CMS\Helper\ModuleHelper::renderModule(object(stdClass), array('name' => 'menu', 'style' => 'none'))
(/www/htdocs/w01374a6/subdomain-access/j6.datenablage.info/libraries/src/Document/Renderer/Html/ModuleRenderer.php:99)
at Joomla\CMS\Document\Renderer\Html\ModuleRenderer->render(object(stdClass), array('name' => 'menu', 'style' => 'none'), null)
(/www/htdocs/w01374a6/subdomain-access/j6.datenablage.info/libraries/src/Document/Renderer/Html/ModulesRenderer.php:51)
at Joomla\CMS\Document\Renderer\Html\ModulesRenderer->render('menu', array('name' => 'menu', 'style' => 'none'), null)
(/www/htdocs/w01374a6/subdomain-access/j6.datenablage.info/libraries/src/Document/HtmlDocument.php:578)
at Joomla\CMS\Document\HtmlDocument->getBuffer('modules', 'menu', array('name' => 'menu', 'style' => 'none'))
(/www/htdocs/w01374a6/subdomain-access/j6.datenablage.info/libraries/src/Document/HtmlDocument.php:897)
at Joomla\CMS\Document\HtmlDocument->_renderTemplate()
(/www/htdocs/w01374a6/subdomain-access/j6.datenablage.info/libraries/src/Document/HtmlDocument.php:650)
at Joomla\CMS\Document\HtmlDocument->render(false, array('template' => 'cassiopeia', 'directory' => '/www/htdocs/w01374a6/subdomain-access/j6.datenablage.info/templates', 'debug' => false, 'csp_nonce' => null, 'templateInherits' => '', 'params' => object(Registry), 'file' => 'error.php'))
(/www/htdocs/w01374a6/subdomain-access/j6.datenablage.info/libraries/src/Document/ErrorDocument.php:139)
at Joomla\CMS\Document\ErrorDocument->render(false, array('template' => 'cassiopeia', 'directory' => '/www/htdocs/w01374a6/subdomain-access/j6.datenablage.info/templates', 'debug' => false, 'csp_nonce' => null, 'templateInherits' => '', 'params' => object(Registry), 'file' => 'error.php'))
(/www/htdocs/w01374a6/subdomain-access/j6.datenablage.info/libraries/src/Error/Renderer/HtmlRenderer.php:70)
at Joomla\CMS\Error\Renderer\HtmlRenderer->render(object(MissingComponentException))
(/www/htdocs/w01374a6/subdomain-access/j6.datenablage.info/libraries/src/Exception/ExceptionHandler.php:142)
at Joomla\CMS\Exception\ExceptionHandler::render(object(MissingComponentException))
(/www/htdocs/w01374a6/subdomain-access/j6.datenablage.info/libraries/src/Exception/ExceptionHandler.php:76)
at Joomla\CMS\Exception\ExceptionHandler::handleException(object(MissingComponentException))
(/www/htdocs/w01374a6/subdomain-access/j6.datenablage.info/libraries/src/Application/CMSApplication.php:350)
at Joomla\CMS\Application\CMSApplication->execute()
(/www/htdocs/w01374a6/subdomain-access/j6.datenablage.info/includes/app.php:58)
at require_once('/www/htdocs/w01374a6/subdomain-access/j6.datenablage.info/includes/app.php')
(/www/htdocs/w01374a6/subdomain-access/j6.datenablage.info/index.php:51)
|
|
[1/2]
MissingComponentException
|
|---|
Joomla\CMS\Component\Exception\MissingComponentException:
Komponente nicht gefunden
at /www/htdocs/w01374a6/subdomain-access/j6.datenablage.info/libraries/src/Component/ComponentHelper.php:296
at Joomla\CMS\Component\ComponentHelper::renderComponent(null)
(/www/htdocs/w01374a6/subdomain-access/j6.datenablage.info/libraries/src/Application/SiteApplication.php:217)
at Joomla\CMS\Application\SiteApplication->dispatch()
(/www/htdocs/w01374a6/subdomain-access/j6.datenablage.info/libraries/src/Application/SiteApplication.php:271)
at Joomla\CMS\Application\SiteApplication->doExecute()
(/www/htdocs/w01374a6/subdomain-access/j6.datenablage.info/libraries/src/Application/CMSApplication.php:320)
at Joomla\CMS\Application\CMSApplication->execute()
(/www/htdocs/w01374a6/subdomain-access/j6.datenablage.info/includes/app.php:58)
at require_once('/www/htdocs/w01374a6/subdomain-access/j6.datenablage.info/includes/app.php')
(/www/htdocs/w01374a6/subdomain-access/j6.datenablage.info/index.php:51)
|