/** * ErrorDocument class, provides an easy interface to parse and display an HTML based error page * * @since 1.7.0 */class ErrorDocument extends HtmlDocument{ /** * Flag if debug mode has been enabled * * @var boolean * * @param string $file * @return void */ self::$includeFile = \Closure::bind(static function($file) { include $file; }, null, null); }} */ public function loadClass($class) { if ($file = $this->findFile($class)) { $includeFile = self::$includeFile; $includeFile($file); return true; } return null; * * @since 3.4 */ public function loadClass($class) { if ($result = $this->loader->loadClass($class)) { \JLoader::applyAliasFor($class); } return $result; } $type = preg_replace('/[^A-Z0-9_\.-]/i', '', $type); $ntype = null; $class = __NAMESPACE__ . '\\' . ucfirst($type) . 'Document'; if (!class_exists($class)) { $class = 'JDocument' . ucfirst($type); } if (!class_exists($class)) { $ntype = $type; if (Factory::$language) { $attributes['language'] = Factory::getLanguage()->getTag(); $attributes['direction'] = Factory::getLanguage()->isRtl() ? 'rtl' : 'ltr'; } return Factory::getContainer()->get(FactoryInterface::class)->createDocument($this->type, $attributes); }} */ public function getDocument(): Document { // Load the document if not already if (!$this->document) { $this->document = $this->loadDocument(); } return $this->document; } // Default to the HTML renderer $renderer = AbstractRenderer::getRenderer('html'); } // Reset the document object in the factory, this gives us a clean slate and lets everything render properly Factory::$document = $renderer->getDocument(); Factory::getApplication()->loadDocument(Factory::$document); // Trigger the onAfterInitialiseDocument event. $app->getDispatcher()->dispatch( 'onAfterInitialiseDocument', * @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'; // Add feed links if ($this->params->get('show_feed_link', 1)) { $link = '&format=feed&limitstart='; $attribs = ['type' => 'application/rss+xml', 'title' => htmlspecialchars($this->getDocument()->getTitle())]; $this->getDocument()->addHeadLink(Route::_($link . '&type=rss'), 'alternate', 'rel', $attribs); $attribs = ['type' => 'application/atom+xml', 'title' => htmlspecialchars($this->getDocument()->getTitle())]; $this->getDocument()->addHeadLink(Route::_($link . '&type=atom'), 'alternate', 'rel', $attribs); } }} $this->items = &$items; $this->pagination = &$pagination; $this->user = &$user; $this->db = Factory::getDbo(); $this->_prepareDocument(); parent::display($tpl); } /** $cache->get($view, 'display'); } catch (CacheExceptionInterface) { $view->display(); } } else { $view->display(); } return $this; } $model->hit(); } } } parent::display($cachable, $safeurlparams); return $this; }} } // Record the actual task being fired $this->doTask = $doTask; return $this->$doTask(); } /** * Method to get a model object, loading it if required. * $config['name'] = strtolower($this->input->get('controller')); } // Execute the task for this component $controller = $this->getController($controller, ucfirst($this->app->getName()), $config); $controller->execute($task); $controller->redirect(); } /** * Get a controller from the component return; } } parent::dispatch(); }} if (!static::isEnabled($option)) { throw new MissingComponentException(Text::_('JLIB_APPLICATION_ERROR_COMPONENT_NOT_FOUND'), 404); } ob_start(); $app->bootComponent($option)->getDispatcher($app)->dispatch(); $contents = ob_get_clean(); // Revert the scope $app->scope = $scope; $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; } $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]
ClassNotFoundError
|
|---|
Symfony\Component\ErrorHandler\Error\ClassNotFoundError:
Attempted to load class "HtmlDocument" from namespace "Joomla\CMS\Document".
Did you forget a "use" statement for another namespace?
at /www/htdocs/w00aa9af/mockrehna_2022/libraries/src/Document/ErrorDocument.php:24
at include()
(/www/htdocs/w00aa9af/mockrehna_2022/libraries/vendor/composer/ClassLoader.php:576)
at {closure:Composer\Autoload\ClassLoader::initializeIncludeClosure():575}('/www/htdocs/w00aa9af/mockrehna_2022/libraries/vendor/composer/../../../libraries/src/Document/ErrorDocument.php')
(/www/htdocs/w00aa9af/mockrehna_2022/libraries/vendor/composer/ClassLoader.php:427)
at Composer\Autoload\ClassLoader->loadClass('Joomla\\CMS\\Document\\ErrorDocument')
(/www/htdocs/w00aa9af/mockrehna_2022/libraries/src/Autoload/ClassLoader.php:59)
at Joomla\CMS\Autoload\ClassLoader->loadClass('Joomla\\CMS\\Document\\ErrorDocument')
at class_exists('Joomla\\CMS\\Document\\ErrorDocument')
(/www/htdocs/w00aa9af/mockrehna_2022/libraries/src/Document/Factory.php:45)
at Joomla\CMS\Document\Factory->createDocument('error', array('charset' => 'utf-8', 'lineend' => 'unix', 'tab' => ' ', 'language' => 'de-DE', 'direction' => 'ltr'))
(/www/htdocs/w00aa9af/mockrehna_2022/libraries/src/Error/AbstractRenderer.php:112)
at Joomla\CMS\Error\AbstractRenderer->loadDocument()
(/www/htdocs/w00aa9af/mockrehna_2022/libraries/src/Error/AbstractRenderer.php:54)
at Joomla\CMS\Error\AbstractRenderer->getDocument()
(/www/htdocs/w00aa9af/mockrehna_2022/libraries/src/Exception/ExceptionHandler.php:130)
at Joomla\CMS\Exception\ExceptionHandler::render(object(Error))
(/www/htdocs/w00aa9af/mockrehna_2022/libraries/src/Exception/ExceptionHandler.php:76)
at Joomla\CMS\Exception\ExceptionHandler::handleException(object(Error))
(/www/htdocs/w00aa9af/mockrehna_2022/libraries/src/Application/CMSApplication.php:334)
at Joomla\CMS\Application\CMSApplication->execute()
(/www/htdocs/w00aa9af/mockrehna_2022/includes/app.php:58)
at require_once('/www/htdocs/w00aa9af/mockrehna_2022/includes/app.php')
(/www/htdocs/w00aa9af/mockrehna_2022/index.php:51)
|
|
[1/2]
Error
|
|---|
Error:
Call to undefined method Joomla\CMS\Document\RawDocument::addHeadLink()
at /www/htdocs/w00aa9af/mockrehna_2022/components/com_content/src/View/Featured/HtmlView.php:246
at Joomla\Component\Content\Site\View\Featured\HtmlView->_prepareDocument()
(/www/htdocs/w00aa9af/mockrehna_2022/components/com_content/src/View/Featured/HtmlView.php:210)
at Joomla\Component\Content\Site\View\Featured\HtmlView->display()
(/www/htdocs/w00aa9af/mockrehna_2022/libraries/src/MVC/Controller/BaseController.php:697)
at Joomla\CMS\MVC\Controller\BaseController->display(true, array('catid' => 'INT', 'id' => 'INT', 'cid' => 'ARRAY', 'year' => 'INT', 'month' => 'INT', 'limit' => 'UINT', 'limitstart' => 'UINT', 'showall' => 'INT', 'return' => 'BASE64', 'filter' => 'STRING', 'filter_order' => 'CMD', 'filter_order_Dir' => 'CMD', 'filter-search' => 'STRING', 'print' => 'BOOLEAN', 'lang' => 'CMD', 'Itemid' => 'INT'))
(/www/htdocs/w00aa9af/mockrehna_2022/components/com_content/src/Controller/DisplayController.php:122)
at Joomla\Component\Content\Site\Controller\DisplayController->display()
(/www/htdocs/w00aa9af/mockrehna_2022/libraries/src/MVC/Controller/BaseController.php:730)
at Joomla\CMS\MVC\Controller\BaseController->execute('display')
(/www/htdocs/w00aa9af/mockrehna_2022/libraries/src/Dispatcher/ComponentDispatcher.php:143)
at Joomla\CMS\Dispatcher\ComponentDispatcher->dispatch()
(/www/htdocs/w00aa9af/mockrehna_2022/components/com_content/src/Dispatcher/Dispatcher.php:56)
at Joomla\Component\Content\Site\Dispatcher\Dispatcher->dispatch()
(/www/htdocs/w00aa9af/mockrehna_2022/libraries/src/Component/ComponentHelper.php:361)
at Joomla\CMS\Component\ComponentHelper::renderComponent('com_content')
(/www/htdocs/w00aa9af/mockrehna_2022/libraries/src/Application/SiteApplication.php:217)
at Joomla\CMS\Application\SiteApplication->dispatch()
(/www/htdocs/w00aa9af/mockrehna_2022/libraries/src/Application/SiteApplication.php:271)
at Joomla\CMS\Application\SiteApplication->doExecute()
(/www/htdocs/w00aa9af/mockrehna_2022/libraries/src/Application/CMSApplication.php:304)
at Joomla\CMS\Application\CMSApplication->execute()
(/www/htdocs/w00aa9af/mockrehna_2022/includes/app.php:58)
at require_once('/www/htdocs/w00aa9af/mockrehna_2022/includes/app.php')
(/www/htdocs/w00aa9af/mockrehna_2022/index.php:51)
|