// 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'; // 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); }} $result = 0; $renderer = $this->loadRenderer('module'); foreach ($modules as $module) { if (empty($module->contentRendered)) { $renderer->render($module, ['contentOnly' => true]); } if (trim($module->content) !== '') { $result++; }<?php endif; ?> </div></div><?php endif; ?><?php if ($this->countModules('menu', true) || $this->countModules('search', true)) : ?> <div class="grid-child container-nav"><?php if ($this->countModules('menu', true)) : ?> <jdoc:include type="modules" name="menu" style="none" /><?php endif; ?> <?php if ($this->countModules('search', true)) : ?> // Store the file path $this->_file = $directory . '/' . $filename; // Get the file content ob_start(); require $directory . '/' . $filename; $contents = ob_get_clean(); } return $contents; } $this->baseurl = Uri::base(true); $this->params = $params['params'] ?? new Registry(); $this->template = $template; // Load $this->_template = $this->_loadTemplate($baseDir, $file); return $this; } /** * * @since 1.7.0 */ public function parse($params = []) { return $this->_fetchTemplate($params)->_parseTemplate(); } /** * Outputs the template to the browser. * // Fall back to constants. $this->docOptions['directory'] = \defined('JPATH_THEMES') ? JPATH_THEMES : (\defined('JPATH_BASE') ? JPATH_BASE : __DIR__) . '/themes'; } // Parse the document. $this->document->parse($this->docOptions); // Trigger the onBeforeRender event. PluginHelper::importPlugin('system', null, true, $this->getDispatcher()); $this->dispatchEvent( 'onBeforeRender', $this->set('themeInherits', $template->parent); break; } parent::render(); } /** * Route the application. * $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(); } // If gzip compression is enabled in configuration and the server is compliant, compress the output. if ($this->get('gzip') && !\ini_get('zlib.output_compression') && \ini_get('output_handler') !== 'ob_gzhandler') { $this->compress();// 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(TypeError))
(/www/htdocs/w01374a6/subdomain-access/j6.datenablage.info/libraries/src/Exception/ExceptionHandler.php:142)
at Joomla\CMS\Exception\ExceptionHandler::render(object(TypeError))
(/www/htdocs/w01374a6/subdomain-access/j6.datenablage.info/libraries/src/Exception/ExceptionHandler.php:76)
at Joomla\CMS\Exception\ExceptionHandler::handleException(object(TypeError))
(/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]
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('contentOnly' => true))
(/www/htdocs/w01374a6/subdomain-access/j6.datenablage.info/libraries/src/Helper/ModuleHelper.php:160)
at Joomla\CMS\Helper\ModuleHelper::renderModule(object(stdClass), array('contentOnly' => true))
(/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('contentOnly' => true))
(/www/htdocs/w01374a6/subdomain-access/j6.datenablage.info/libraries/src/Document/HtmlDocument.php:684)
at Joomla\CMS\Document\HtmlDocument->countModules('menu', true)
(/www/htdocs/w01374a6/subdomain-access/j6.datenablage.info/templates/cassiopeia/index.php:172)
at require('/www/htdocs/w01374a6/subdomain-access/j6.datenablage.info/templates/cassiopeia/index.php')
(/www/htdocs/w01374a6/subdomain-access/j6.datenablage.info/libraries/src/Document/HtmlDocument.php:734)
at Joomla\CMS\Document\HtmlDocument->_loadTemplate('/www/htdocs/w01374a6/subdomain-access/j6.datenablage.info/templates/cassiopeia', 'index.php')
(/www/htdocs/w01374a6/subdomain-access/j6.datenablage.info/libraries/src/Document/HtmlDocument.php:788)
at Joomla\CMS\Document\HtmlDocument->_fetchTemplate(array('template' => 'cassiopeia', 'file' => 'index.php', 'params' => object(Registry), 'csp_nonce' => null, 'templateInherits' => null, 'directory' => '/www/htdocs/w01374a6/subdomain-access/j6.datenablage.info/templates'))
(/www/htdocs/w01374a6/subdomain-access/j6.datenablage.info/libraries/src/Document/HtmlDocument.php:625)
at Joomla\CMS\Document\HtmlDocument->parse(array('template' => 'cassiopeia', 'file' => 'index.php', 'params' => object(Registry), 'csp_nonce' => null, 'templateInherits' => null, 'directory' => '/www/htdocs/w01374a6/subdomain-access/j6.datenablage.info/templates'))
(/www/htdocs/w01374a6/subdomain-access/j6.datenablage.info/libraries/src/Application/CMSApplication.php:1116)
at Joomla\CMS\Application\CMSApplication->render()
(/www/htdocs/w01374a6/subdomain-access/j6.datenablage.info/libraries/src/Application/SiteApplication.php:739)
at Joomla\CMS\Application\SiteApplication->render()
(/www/htdocs/w01374a6/subdomain-access/j6.datenablage.info/libraries/src/Application/CMSApplication.php:325)
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)
|