https://hephaestos.eu/fr/contact/

Exceptions

Cannot check if an unsubmitted form is valid. Call Form::isSubmitted() before Form::isValid().

Exception

Symfony\Component\Form\Exception\ LogicException

  1. * {@inheritdoc}
  2. */
  3. public function isValid()
  4. {
  5. if (!$this->submitted) {
  6. throw new LogicException('Cannot check if an unsubmitted form is valid. Call Form::isSubmitted() before Form::isValid().');
  7. }
  8. if ($this->isDisabled()) {
  9. return true;
  10. }
Form->isValid() in src/Controller/ContactController.php (line 95)
  1. $formType = $this->getSyliusAttribute($request, 'form', ContactType::class);
  2. $form = $this->formFactory->create($formType, null, $this->getFormOptions());
  3. //$form = $this->createForm(ContactType::class);
  4. if ($request->isMethod('POST') && $form->handleRequest($request)->isValid()) {
  5. $data = $form->getData();
  6. /** @var ChannelInterface $channel */
  7. $channel = $this->channelContext->getChannel();
  8. Assert::isInstanceOf($channel, ChannelInterface::class);
in vendor/symfony/http-kernel/HttpKernel.php -> requestAction (line 163)
  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);
  9. $this->dispatcher->dispatch($event, KernelEvents::VIEW);
  1. {
  2. $request->headers->set('X-Php-Ob-Level', (string) ob_get_level());
  3. $this->requestStack->push($request);
  4. try {
  5. return $this->handleRaw($request, $type);
  6. } catch (\Exception $e) {
  7. if ($e instanceof RequestExceptionInterface) {
  8. $e = new BadRequestHttpException($e->getMessage(), $e);
  9. }
  10. if (false === $catch) {
  1. $this->boot();
  2. ++$this->requestStackSize;
  3. $this->resetServices = true;
  4. try {
  5. return $this->getHttpKernel()->handle($request, $type, $catch);
  6. } finally {
  7. --$this->requestStackSize;
  8. }
  9. }
Kernel->handle() in public/index.php (line 25)
  1. Request::setTrustedHosts([$trustedHosts]);
  2. }
  3. $kernel = new Kernel($_SERVER['APP_ENV'], (bool) $_SERVER['APP_DEBUG']);
  4. $request = Request::createFromGlobals();
  5. $response = $kernel->handle($request);
  6. $response->send();
  7. $kernel->terminate($request, $response);

Logs

No log messages

Stack Trace

LogicException
Symfony\Component\Form\Exception\LogicException:
Cannot check if an unsubmitted form is valid. Call Form::isSubmitted() before Form::isValid().

  at vendor/symfony/form/Form.php:765
  at Symfony\Component\Form\Form->isValid()
     (src/Controller/ContactController.php:95)
  at App\Controller\ContactController->requestAction()
     (vendor/symfony/http-kernel/HttpKernel.php:163)
  at Symfony\Component\HttpKernel\HttpKernel->handleRaw()
     (vendor/symfony/http-kernel/HttpKernel.php:75)
  at Symfony\Component\HttpKernel\HttpKernel->handle()
     (vendor/symfony/http-kernel/Kernel.php:202)
  at Symfony\Component\HttpKernel\Kernel->handle()
     (public/index.php:25)