Error 500 Internal Server Error

GET https://rent.n46.net/en/register

Forwarded to ErrorController (ca952c)

Exceptions

Could not load type "App\Form\UnconfirmedUserType": class does not exist.

Exception

Symfony\Component\Form\Exception\ InvalidArgumentException

  1. }
  2. if (!$type) {
  3. // Support fully-qualified class names
  4. if (!class_exists($name)) {
  5. throw new InvalidArgumentException(\sprintf('Could not load type "%s": class does not exist.', $name));
  6. }
  7. if (!is_subclass_of($name, FormTypeInterface::class)) {
  8. throw new InvalidArgumentException(\sprintf('Could not load type "%s": class does not implement "Symfony\Component\Form\FormTypeInterface".', $name));
  9. }
  1. /**
  2. * @return ($type is class-string<FormFlowTypeInterface> ? FormFlowBuilderInterface : FormBuilderInterface)
  3. */
  4. public function createBuilder(string $type = FormType::class, mixed $data = null, array $options = []): FormBuilderInterface
  5. {
  6. return $this->createNamedBuilder($this->registry->getType($type)->getBlockPrefix(), $type, $data, $options);
  7. }
  8. /**
  9. * @return ($type is class-string<FormFlowTypeInterface> ? FormFlowBuilderInterface : FormBuilderInterface)
  10. */
in vendor/symfony/form/FormFactory.php -> createBuilder (line 32)
  1. /**
  2. * @return ($type is class-string<FormFlowTypeInterface> ? FormFlowInterface : FormInterface)
  3. */
  4. public function create(string $type = FormType::class, mixed $data = null, array $options = []): FormInterface
  5. {
  6. return $this->createBuilder($type, $data, $options)->getForm();
  7. }
  8. /**
  9. * @return ($type is class-string<FormFlowTypeInterface> ? FormFlowInterface : FormInterface)
  10. */
  1. *
  2. * @return ($type is class-string<FormFlowTypeInterface> ? FormFlowInterface : FormInterface)
  3. */
  4. protected function createForm(string $type, mixed $data = null, array $options = []): FormInterface
  5. {
  6. return $this->container->get('form.factory')->create($type, $data, $options);
  7. }
  8. /**
  9. * Creates and returns a form builder instance.
  10. */
AbstractController->createForm() in src/Controller/UnconfirmedUserController.php (line 60)
  1. $string = (string)$int;
  2. $md5 = md5($string);
  3. $unconfirmedUser->setConfirmationToken($md5);
  4. $unconfirmedUser->setIpAddress($request->getClientIp());
  5. $form = $this->createForm(UnconfirmedUserType::class, $unconfirmedUser);
  6. $form->handleRequest($request);
  7. if ($form->isSubmitted() && $form->isValid()) {
  8. $email = $unconfirmedUser->getEmail();
  9. $normalizedEmail = EmailNormalizer::normalize($email);
  1. $this->dispatcher->dispatch($event, KernelEvents::CONTROLLER_ARGUMENTS);
  2. $controller = $event->getController();
  3. $arguments = $event->getArguments();
  4. // call controller
  5. $response = $controller(...$arguments);
  6. // view
  7. if (!$response instanceof Response) {
  8. $event = new ViewEvent($this, $request, $type, $response, $event);
  9. $this->dispatcher->dispatch($event, KernelEvents::VIEW);
  1. $request->headers->set('X-Php-Ob-Level', (string) ob_get_level());
  2. $this->requestStack->push($request);
  3. $response = null;
  4. try {
  5. return $response = $this->handleRaw($request, $type);
  6. } catch (\Throwable $e) {
  7. if ($e instanceof \Error && !$this->handleAllThrowables) {
  8. throw $e;
  9. }
  1. if (!$this->handlingHttpCache) {
  2. $this->resetServices = true;
  3. }
  4. try {
  5. return $this->getHttpKernel()->handle($request, $type, $catch);
  6. } finally {
  7. --$this->requestStackSize;
  8. }
  9. }
  1. ) {
  2. }
  3. public function run(): int
  4. {
  5. $response = $this->kernel->handle($this->request);
  6. if (Kernel::VERSION_ID >= 60400) {
  7. $response->send(false);
  8. if (\function_exists('fastcgi_finish_request') && !$this->debug) {
in vendor/autoload_runtime.php -> run (line 32)
  1. $app = $app(...$args);
  2. exit(
  3. $runtime
  4. ->getRunner($app)
  5. ->run()
  6. );
require_once('/var/www/vhosts/1007/domains/n46.net/rent/vendor/autoload_runtime.php') in public_html/index.php (line 5)
  1. <?php declare(strict_types=1);
  2. use App\Kernel;
  3. require_once dirname(__DIR__).'/vendor/autoload_runtime.php';
  4. return function (array $context) {
  5. return new Kernel($context['APP_ENV'], (bool) $context['APP_DEBUG']);
  6. };

Logs

Level Channel Message
INFO 16:54:40 request Matched route "_profiler".
{
    "route": "_profiler",
    "route_parameters": {
        "_route": "_profiler",
        "_controller": "web_profiler.controller.profiler::panelAction",
        "token": "f51e62"
    },
    "request_uri": "https://rent.n46.net/_profiler/f51e62",
    "method": "GET"
}

Stack Trace

InvalidArgumentException
Symfony\Component\Form\Exception\InvalidArgumentException:
Could not load type "App\Form\UnconfirmedUserType": class does not exist.

  at vendor/symfony/form/FormRegistry.php:72
  at Symfony\Component\Form\FormRegistry->getType()
     (vendor/symfony/form/FormFactory.php:53)
  at Symfony\Component\Form\FormFactory->createBuilder()
     (vendor/symfony/form/FormFactory.php:32)
  at Symfony\Component\Form\FormFactory->create()
     (vendor/symfony/framework-bundle/Controller/AbstractController.php:354)
  at Symfony\Bundle\FrameworkBundle\Controller\AbstractController->createForm()
     (src/Controller/UnconfirmedUserController.php:60)
  at App\Controller\UnconfirmedUserController->create()
     (vendor/symfony/http-kernel/HttpKernel.php:183)
  at Symfony\Component\HttpKernel\HttpKernel->handleRaw()
     (vendor/symfony/http-kernel/HttpKernel.php:76)
  at Symfony\Component\HttpKernel\HttpKernel->handle()
     (vendor/symfony/http-kernel/Kernel.php:191)
  at Symfony\Component\HttpKernel\Kernel->handle()
     (vendor/symfony/runtime/Runner/Symfony/HttpKernelRunner.php:35)
  at Symfony\Component\Runtime\Runner\Symfony\HttpKernelRunner->run()
     (vendor/autoload_runtime.php:32)
  at require_once('/var/www/vhosts/1007/domains/n46.net/rent/vendor/autoload_runtime.php')
     (public_html/index.php:5)