RuntimeException ClassNotFoundError

HTTP 500 Whoops, looks like something went wrong.

Attempted to load class "JFactory" from the global namespace.
Did you forget a "use" statement?

Exceptions 2

Symfony\Component\ErrorHandler\Error\ ClassNotFoundError

HtmlDocument->_loadTemplate('/home/dh_b0myteb/bergep.dmker.hu/templates/gridbox', 'error.php') in /home/dh_b0myteb/bergep.dmker.hu/libraries/src/Document/HtmlDocument.php (line 785)
    HtmlDocument->_fetchTemplate(array('template' => 'gridbox', 'directory' => '/home/dh_b0myteb/bergep.dmker.hu/templates', 'debug' => false, 'csp_nonce' => null, 'templateInherits' => '', 'params' => object(Registry), 'file' => 'error.php')) in /home/dh_b0myteb/bergep.dmker.hu/libraries/src/Document/HtmlDocument.php (line 622)
      HtmlDocument->parse(array('template' => 'gridbox', 'directory' => '/home/dh_b0myteb/bergep.dmker.hu/templates', 'debug' => false, 'csp_nonce' => null, 'templateInherits' => '', 'params' => object(Registry), 'file' => 'error.php')) in /home/dh_b0myteb/bergep.dmker.hu/libraries/src/Document/HtmlDocument.php (line 640)
        HtmlDocument->render(false, array('template' => 'gridbox', 'directory' => '/home/dh_b0myteb/bergep.dmker.hu/templates', 'debug' => false, 'csp_nonce' => null, 'templateInherits' => '', 'params' => object(Registry), 'file' => 'error.php')) in /home/dh_b0myteb/bergep.dmker.hu/libraries/src/Document/ErrorDocument.php (line 139)
          ErrorDocument->render(false, array('template' => 'gridbox', 'directory' => '/home/dh_b0myteb/bergep.dmker.hu/templates', 'debug' => false, 'csp_nonce' => null, 'templateInherits' => '', 'params' => object(Registry), 'file' => 'error.php')) in /home/dh_b0myteb/bergep.dmker.hu/libraries/src/Error/Renderer/HtmlRenderer.php (line 70)
            HtmlRenderer->render(object(RuntimeException)) in /home/dh_b0myteb/bergep.dmker.hu/libraries/src/Exception/ExceptionHandler.php (line 136)
              ExceptionHandler::render(object(RuntimeException)) in /home/dh_b0myteb/bergep.dmker.hu/libraries/src/Exception/ExceptionHandler.php (line 73)
                ExceptionHandler::handleException(object(RuntimeException)) in /home/dh_b0myteb/bergep.dmker.hu/libraries/src/Application/CMSApplication.php (line 336)
                  CMSApplication->execute() in /home/dh_b0myteb/bergep.dmker.hu/includes/app.php (line 58)
                    require_once('/home/dh_b0myteb/bergep.dmker.hu/includes/app.php') in /home/dh_b0myteb/bergep.dmker.hu/index.php (line 33)

                      RuntimeException

                      Failed to start the session because headers have already been sent by "/home/dh_b0myteb/bergep.dmker.hu/index.php" at line 1.

                      Stack Traces 2

                      [2/2] ClassNotFoundError
                      Symfony\Component\ErrorHandler\Error\ClassNotFoundError:
                      Attempted to load class "JFactory" from the global namespace.
                      Did you forget a "use" statement?
                      
                        at /home/dh_b0myteb/bergep.dmker.hu/templates/gridbox/error.php:11
                        at require()
                           (/home/dh_b0myteb/bergep.dmker.hu/libraries/src/Document/HtmlDocument.php:731)
                        at Joomla\CMS\Document\HtmlDocument->_loadTemplate('/home/dh_b0myteb/bergep.dmker.hu/templates/gridbox', 'error.php')
                           (/home/dh_b0myteb/bergep.dmker.hu/libraries/src/Document/HtmlDocument.php:785)
                        at Joomla\CMS\Document\HtmlDocument->_fetchTemplate(array('template' => 'gridbox', 'directory' => '/home/dh_b0myteb/bergep.dmker.hu/templates', 'debug' => false, 'csp_nonce' => null, 'templateInherits' => '', 'params' => object(Registry), 'file' => 'error.php'))
                           (/home/dh_b0myteb/bergep.dmker.hu/libraries/src/Document/HtmlDocument.php:622)
                        at Joomla\CMS\Document\HtmlDocument->parse(array('template' => 'gridbox', 'directory' => '/home/dh_b0myteb/bergep.dmker.hu/templates', 'debug' => false, 'csp_nonce' => null, 'templateInherits' => '', 'params' => object(Registry), 'file' => 'error.php'))
                           (/home/dh_b0myteb/bergep.dmker.hu/libraries/src/Document/HtmlDocument.php:640)
                        at Joomla\CMS\Document\HtmlDocument->render(false, array('template' => 'gridbox', 'directory' => '/home/dh_b0myteb/bergep.dmker.hu/templates', 'debug' => false, 'csp_nonce' => null, 'templateInherits' => '', 'params' => object(Registry), 'file' => 'error.php'))
                           (/home/dh_b0myteb/bergep.dmker.hu/libraries/src/Document/ErrorDocument.php:139)
                        at Joomla\CMS\Document\ErrorDocument->render(false, array('template' => 'gridbox', 'directory' => '/home/dh_b0myteb/bergep.dmker.hu/templates', 'debug' => false, 'csp_nonce' => null, 'templateInherits' => '', 'params' => object(Registry), 'file' => 'error.php'))
                           (/home/dh_b0myteb/bergep.dmker.hu/libraries/src/Error/Renderer/HtmlRenderer.php:70)
                        at Joomla\CMS\Error\Renderer\HtmlRenderer->render(object(RuntimeException))
                           (/home/dh_b0myteb/bergep.dmker.hu/libraries/src/Exception/ExceptionHandler.php:136)
                        at Joomla\CMS\Exception\ExceptionHandler::render(object(RuntimeException))
                           (/home/dh_b0myteb/bergep.dmker.hu/libraries/src/Exception/ExceptionHandler.php:73)
                        at Joomla\CMS\Exception\ExceptionHandler::handleException(object(RuntimeException))
                           (/home/dh_b0myteb/bergep.dmker.hu/libraries/src/Application/CMSApplication.php:336)
                        at Joomla\CMS\Application\CMSApplication->execute()
                           (/home/dh_b0myteb/bergep.dmker.hu/includes/app.php:58)
                        at require_once('/home/dh_b0myteb/bergep.dmker.hu/includes/app.php')
                           (/home/dh_b0myteb/bergep.dmker.hu/index.php:33)                
                      [1/2] RuntimeException
                      RuntimeException:
                      Failed to start the session because headers have already been sent by "/home/dh_b0myteb/bergep.dmker.hu/index.php" at line 1.
                      
                        at /home/dh_b0myteb/bergep.dmker.hu/libraries/vendor/joomla/session/src/Storage/NativeStorage.php:454
                        at Joomla\Session\Storage\NativeStorage->start()
                           (/home/dh_b0myteb/bergep.dmker.hu/libraries/src/Session/Storage/JoomlaStorage.php:313)
                        at Joomla\CMS\Session\Storage\JoomlaStorage->start()
                           (/home/dh_b0myteb/bergep.dmker.hu/libraries/vendor/joomla/session/src/Session.php:396)
                        at Joomla\Session\Session->start()
                           (/home/dh_b0myteb/bergep.dmker.hu/libraries/vendor/joomla/session/src/Session.php:327)
                        at Joomla\Session\Session->has('user')
                           (/home/dh_b0myteb/bergep.dmker.hu/libraries/src/Session/Session.php:194)
                        at Joomla\CMS\Session\Session->get('user')
                           (/home/dh_b0myteb/bergep.dmker.hu/libraries/src/Factory.php:372)
                        at Joomla\CMS\Factory::getUser()
                           (/home/dh_b0myteb/bergep.dmker.hu/libraries/src/Application/SiteApplication.php:570)
                        at Joomla\CMS\Application\SiteApplication->initialiseApp()
                           (/home/dh_b0myteb/bergep.dmker.hu/libraries/src/Application/SiteApplication.php:238)
                        at Joomla\CMS\Application\SiteApplication->doExecute()
                           (/home/dh_b0myteb/bergep.dmker.hu/libraries/src/Application/CMSApplication.php:306)
                        at Joomla\CMS\Application\CMSApplication->execute()
                           (/home/dh_b0myteb/bergep.dmker.hu/includes/app.php:58)
                        at require_once('/home/dh_b0myteb/bergep.dmker.hu/includes/app.php')
                           (/home/dh_b0myteb/bergep.dmker.hu/index.php:33)