Answers.Body: <p>If you want to redirect to the same page as you are sending, you can remove <code>{{ redirectInput('contact') }}</code> as <a href="https://github.com/craftcms/contact-form#redirecting-after-submit" rel="nofollow noreferrer">per here</a>.</p>
  
  <p>Here though, it's the ContactFormExtensions plugin shouting at you. Do you have an email template set in there? If you enabled the 'Send confirmation' setting, you need to give it a template.</p>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2019-02-20T14:29:11.300Z
Answers.LastActivityDate: 2019-02-20T14:46:10.833Z
Answers.LastEditDate: 2019-02-20T14:46:10.833Z
Answers.UserDisplayName: Oli
Body: <p>I am using the Craft Contact Form plugin (<a href="https://github.com/craftcms/contact-form" rel="nofollow noreferrer">https://github.com/craftcms/contact-form</a>) and am having an issue where I get an error page on submission. The form is submitting correctly (the submission is appearing in Form Submissions from this plugin <a href="https://github.com/Rias500/craft-contact-form-extensions" rel="nofollow noreferrer">https://github.com/Rias500/craft-contact-form-extensions</a>) but I am getting an error page.</p>
  
  <p>Ideally I would like to be redirected to the same <code>/contact</code> page with the Success flash message displayed instead of the contact form</p>
  
  <p>This is what I have on my <code>contact.twig</code> page template:</p>
  
  <pre><code>        &lt;div class="contact-form"&gt;
            {% if craft.app.session.hasFlash('notice') %}
            &lt;div class="notification"&gt;
      &lt;p class="message notice"&gt;{{ craft.app.session.getFlash('notice') }}&lt;/p&gt;
      &lt;/div&gt;
  {% elseif craft.app.session.hasFlash('error') %}
      &lt;p class="message error"&gt;{{ craft.app.session.getFlash('error') }}&lt;/p&gt;
  {% else %}
  &lt;form method="post" action="" accept-charset="UTF-8"&gt;
      {{ csrfInput() }}
      &lt;input type="hidden" name="action" value="contact-form/send"&gt;
      {{ redirectInput('contact') }}
        &lt;div class="element"&gt;
        &lt;label for="name"&gt;Name &lt;span class="required"&gt;*&lt;/span&gt;&lt;/label&gt;
        &lt;input id="name" type="text" required name="fromName" value="{{ message.fromName ?? '' }}"&gt;
        &lt;/div&gt;
        &lt;div class="element"&gt;
        &lt;label for="email"&gt;Email Address &lt;span class="required"&gt;*&lt;/span&gt;&lt;/label&gt;
        &lt;input id="email" type="email" required name="fromEmail" value="{{ message.fromEmail ?? '' }}"&gt;
        &lt;/div&gt;
        &lt;div class="element"&gt;
        &lt;label for="phone"&gt;Telephone Number&lt;/label&gt;
        &lt;input id="phone" type="text" required name="message[phone]" value="{{ message.phone ?? '' }}"&gt;
        &lt;/div&gt;
        &lt;div class="element"&gt;
          &lt;p class="required-info text-small"&gt;&lt;span class="required"&gt;*&lt;/span&gt; Required Fields&lt;/p&gt;
        &lt;/div&gt;
        &lt;div class="element"&gt;
          &lt;label for="message"&gt;Message&lt;/label&gt;
          &lt;textarea rows="10" cols="40" id="message" name="message"&gt;{{ message.message ?? '' }}&lt;/textarea&gt;
        &lt;/div&gt;
      &lt;input type="submit" value="Submit"&gt;
  &lt;/form&gt;
  {% endif %}
  &lt;/div&gt;
  </code></pre>
  
  <p>And this is the error I get:</p>
  
  <pre><code>craft\web\twig\TemplateLoaderException: Unable to find the template “”. in /Users/user/Dropbox/GIANT/Potter Group Website/Site/build/craft/vendor/craftcms/cms/src/web/twig/TemplateLoader.php:122
  Stack trace:
  #0 /Users/user/Dropbox/GIANT/Potter Group Website/Site/build/craft/vendor/craftcms/cms/src/web/twig/TemplateLoader.php(75): craft\web\twig\TemplateLoader-&gt;_resolveTemplate('')
  #1 /Users/user/Dropbox/GIANT/Potter Group Website/Site/build/craft/vendor/twig/twig/lib/Twig/Environment.php(270): craft\web\twig\TemplateLoader-&gt;getCacheKey('')
  #2 /Users/user/Dropbox/GIANT/Potter Group Website/Site/build/craft/vendor/twig/twig/lib/Twig/Environment.php(350): Twig_Environment-&gt;getTemplateClass('')
  #3 /Users/user/Dropbox/GIANT/Potter Group Website/Site/build/craft/vendor/craftcms/cms/src/web/twig/Environment.php(40): Twig_Environment-&gt;loadTemplate('', NULL)
  #4 /Users/user/Dropbox/GIANT/Potter Group Website/Site/build/craft/vendor/twig/twig/lib/Twig/Environment.php(289): craft\web\twig\Environment-&gt;loadTemplate('')
  #5 /Users/user/Dropbox/GIANT/Potter Group Website/Site/build/craft/vendor/craftcms/cms/src/web/View.php(337): Twig_Environment-&gt;render('', Array)
  #6 /Users/user/Dropbox/GIANT/Potter Group Website/Site/build/craft/vendor/rias/craft-contact-form-extensions/src/ContactFormExtensions.php(136): craft\web\View-&gt;renderTemplate('', Array)
  #7 [internal function]: rias\contactformextensions\ContactFormExtensions-&gt;rias\contactformextensions\{closure}(Object(craft\contactform\events\SendEvent))
  #8 /Users/user/Dropbox/GIANT/Potter Group Website/Site/build/craft/vendor/yiisoft/yii2/base/Event.php(310): call_user_func(Object(Closure), Object(craft\contactform\events\SendEvent))
  #9 /Users/user/Dropbox/GIANT/Potter Group Website/Site/build/craft/vendor/yiisoft/yii2/base/Component.php(636): yii\base\Event::trigger('craft\\contactfo...', 'beforeSend', Object(craft\contactform\events\SendEvent))
  #10 /Users/user/Dropbox/GIANT/Potter Group Website/Site/build/craft/vendor/craftcms/contact-form/src/Mailer.php(93): yii\base\Component-&gt;trigger('beforeSend', Object(craft\contactform\events\SendEvent))
  #11 /Users/user/Dropbox/GIANT/Potter Group Website/Site/build/craft/vendor/craftcms/contact-form/src/controllers/SendController.php(59): craft\contactform\Mailer-&gt;send(Object(craft\contactform\models\Submission))
  #12 [internal function]: craft\contactform\controllers\SendController-&gt;actionIndex()
  #13 /Users/user/Dropbox/GIANT/Potter Group Website/Site/build/craft/vendor/yiisoft/yii2/base/InlineAction.php(57): call_user_func_array(Array, Array)
  #14 /Users/user/Dropbox/GIANT/Potter Group Website/Site/build/craft/vendor/yiisoft/yii2/base/Controller.php(157): yii\base\InlineAction-&gt;runWithParams(Array)
  #15 /Users/user/Dropbox/GIANT/Potter Group Website/Site/build/craft/vendor/craftcms/cms/src/web/Controller.php(109): yii\base\Controller-&gt;runAction('', Array)
  #16 /Users/user/Dropbox/GIANT/Potter Group Website/Site/build/craft/vendor/yiisoft/yii2/base/Module.php(528): craft\web\Controller-&gt;runAction('', Array)
  #17 /Users/user/Dropbox/GIANT/Potter Group Website/Site/build/craft/vendor/craftcms/cms/src/web/Application.php(297): yii\base\Module-&gt;runAction('contact-form/se...', Array)
  #18 /Users/user/Dropbox/GIANT/Potter Group Website/Site/build/craft/vendor/craftcms/cms/src/web/Application.php(561): craft\web\Application-&gt;runAction('contact-form/se...', Array)
  #19 /Users/user/Dropbox/GIANT/Potter Group Website/Site/build/craft/vendor/craftcms/cms/src/web/Application.php(281): craft\web\Application-&gt;_processActionRequest(Object(craft\web\Request))
  #20 /Users/user/Dropbox/GIANT/Potter Group Website/Site/build/craft/vendor/yiisoft/yii2/base/Application.php(386): craft\web\Application-&gt;handleRequest(Object(craft\web\Request))
  #21 /Users/user/Dropbox/GIANT/Potter Group Website/Site/build/public_html/index.php(21): yii\base\Application-&gt;run()
  #22 {main}
  </code></pre>
  
  <p>I have no idea where I am going wrong with this so any help greatly appreciated.</p>
  
  <p>Mike</p>
  
Tags: <craft3><plugin-contactform>
Title: Error with Contact Form plugin on submission
ThreadText: # Error with Contact Form plugin on submission
  
  (Asked by: username_0 on 2019-02-20)
  
  I am using the Craft Contact Form plugin (<https://github.com/craftcms/contact-form>) and am having an issue where I get an error page on submission. The form is submitting correctly (the submission is appearing in Form Submissions from this plugin <https://github.com/Rias500/craft-contact-form-extensions>) but I am getting an error page.
  
  Ideally I would like to be redirected to the same `/contact` page with the Success flash message displayed instead of the contact form
  
  This is what I have on my `contact.twig` page template:
  
  ```
          <div class="contact-form">
            {% if craft.app.session.hasFlash('notice') %}
            <div class="notification">
      <p class="message notice">{{ craft.app.session.getFlash('notice') }}</p>
      </div>
  {% elseif craft.app.session.hasFlash('error') %}
      <p class="message error">{{ craft.app.session.getFlash('error') }}</p>
  {% else %}
  <form method="post" action="" accept-charset="UTF-8">
      {{ csrfInput() }}
      <input type="hidden" name="action" value="contact-form/send">
      {{ redirectInput('contact') }}
        <div class="element">
        <label for="name">Name <span class="required">*</span></label>
        <input id="name" type="text" required name="fromName" value="{{ message.fromName ?? '' }}">
        </div>
        <div class="element">
        <label for="email">Email Address <span class="required">*</span></label>
        <input id="email" type="email" required name="fromEmail" value="{{ message.fromEmail ?? '' }}">
        </div>
        <div class="element">
        <label for="phone">Telephone Number</label>
        <input id="phone" type="text" required name="message[phone]" value="{{ message.phone ?? '' }}">
        </div>
        <div class="element">
          <p class="required-info text-small"><span class="required">*</span> Required Fields</p>
        </div>
        <div class="element">
          <label for="message">Message</label>
          <textarea rows="10" cols="40" id="message" name="message">{{ message.message ?? '' }}</textarea>
        </div>
      <input type="submit" value="Submit">
  </form>
  {% endif %}
  </div>
  
  ```
  
  And this is the error I get:
  
  ```
  craft\web\twig\TemplateLoaderException: Unable to find the template “”. in /Users/user/Dropbox/GIANT/Potter Group Website/Site/build/craft/vendor/craftcms/cms/src/web/twig/TemplateLoader.php:122
  Stack trace:
  #0 /Users/user/Dropbox/GIANT/Potter Group Website/Site/build/craft/vendor/craftcms/cms/src/web/twig/TemplateLoader.php(75): craft\web\twig\TemplateLoader->_resolveTemplate('')
  #1 /Users/user/Dropbox/GIANT/Potter Group Website/Site/build/craft/vendor/twig/twig/lib/Twig/Environment.php(270): craft\web\twig\TemplateLoader->getCacheKey('')
  #2 /Users/user/Dropbox/GIANT/Potter Group Website/Site/build/craft/vendor/twig/twig/lib/Twig/Environment.php(350): Twig_Environment->getTemplateClass('')
  #3 /Users/user/Dropbox/GIANT/Potter Group Website/Site/build/craft/vendor/craftcms/cms/src/web/twig/Environment.php(40): Twig_Environment->loadTemplate('', NULL)
  #4 /Users/user/Dropbox/GIANT/Potter Group Website/Site/build/craft/vendor/twig/twig/lib/Twig/Environment.php(289): craft\web\twig\Environment->loadTemplate('')
  #5 /Users/user/Dropbox/GIANT/Potter Group Website/Site/build/craft/vendor/craftcms/cms/src/web/View.php(337): Twig_Environment->render('', Array)
  #6 /Users/user/Dropbox/GIANT/Potter Group Website/Site/build/craft/vendor/rias/craft-contact-form-extensions/src/ContactFormExtensions.php(136): craft\web\View->renderTemplate('', Array)
  #7 [internal function]: rias\contactformextensions\ContactFormExtensions->rias\contactformextensions\{closure}(Object(craft\contactform\events\SendEvent))
  #8 /Users/user/Dropbox/GIANT/Potter Group Website/Site/build/craft/vendor/yiisoft/yii2/base/Event.php(310): call_user_func(Object(Closure), Object(craft\contactform\events\SendEvent))
  #9 /Users/user/Dropbox/GIANT/Potter Group Website/Site/build/craft/vendor/yiisoft/yii2/base/Component.php(636): yii\base\Event::trigger('craft\\contactfo...', 'beforeSend', Object(craft\contactform\events\SendEvent))
  #10 /Users/user/Dropbox/GIANT/Potter Group Website/Site/build/craft/vendor/craftcms/contact-form/src/Mailer.php(93): yii\base\Component->trigger('beforeSend', Object(craft\contactform\events\SendEvent))
  #11 /Users/user/Dropbox/GIANT/Potter Group Website/Site/build/craft/vendor/craftcms/contact-form/src/controllers/SendController.php(59): craft\contactform\Mailer->send(Object(craft\contactform\models\Submission))
  #12 [internal function]: craft\contactform\controllers\SendController->actionIndex()
  #13 /Users/user/Dropbox/GIANT/Potter Group Website/Site/build/craft/vendor/yiisoft/yii2/base/InlineAction.php(57): call_user_func_array(Array, Array)
  #14 /Users/user/Dropbox/GIANT/Potter Group Website/Site/build/craft/vendor/yiisoft/yii2/base/Controller.php(157): yii\base\InlineAction->runWithParams(Array)
  #15 /Users/user/Dropbox/GIANT/Potter Group Website/Site/build/craft/vendor/craftcms/cms/src/web/Controller.php(109): yii\base\Controller->runAction('', Array)
  #16 /Users/user/Dropbox/GIANT/Potter Group Website/Site/build/craft/vendor/yiisoft/yii2/base/Module.php(528): craft\web\Controller->runAction('', Array)
  #17 /Users/user/Dropbox/GIANT/Potter Group Website/Site/build/craft/vendor/craftcms/cms/src/web/Application.php(297): yii\base\Module->runAction('contact-form/se...', Array)
  #18 /Users/user/Dropbox/GIANT/Potter Group Website/Site/build/craft/vendor/craftcms/cms/src/web/Application.php(561): craft\web\Application->runAction('contact-form/se...', Array)
  #19 /Users/user/Dropbox/GIANT/Potter Group Website/Site/build/craft/vendor/craftcms/cms/src/web/Application.php(281): craft\web\Application->_processActionRequest(Object(craft\web\Request))
  #20 /Users/user/Dropbox/GIANT/Potter Group Website/Site/build/craft/vendor/yiisoft/yii2/base/Application.php(386): craft\web\Application->handleRequest(Object(craft\web\Request))
  #21 /Users/user/Dropbox/GIANT/Potter Group Website/Site/build/public_html/index.php(21): yii\base\Application->run()
  #22 {main}
  
  ```
  
  I have no idea where I am going wrong with this so any help greatly appreciated.
  
  username_0
  
  **Tags:** craft3, plugin-contactform
  
  
  ---
  
  ## 1 answers
  
  ### Answer by username_1 on 2019-02-20. Score: 2 | Accepted answer
  
  If you want to redirect to the same page as you are sending, you can remove `{{ redirectInput('contact') }}` as [per here](https://github.com/craftcms/contact-form#redirecting-after-submit).
  
  Here though, it's the ContactFormExtensions plugin shouting at you. Do you have an email template set in there? If you enabled the 'Send confirmation' setting, you need to give it a template.
  
  
  ---
  
  