Answers.Body: <p>The problem was that the redirect page was not setup. Once I threw up a test page there, the error no longer triggers. </p>
  
  <p>What's odd is that the error page gave little clue (at least to me) as to what was happening. </p>
  
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2015-10-21T17:49:22.053Z
Answers.LastActivityDate: 2015-10-21T17:49:22.053Z
Answers.UserDisplayName: Jae Barclay
Body: <p>Using the standard P&amp;T contact form, I'm getting the following error when form is submitted (running locally):</p>
  
  <pre><code>Twig_Error_Runtime
  
  Impossible to access an attribute ("fromEmail") on a string variable ("") in "_layout" at line 149 (C:\xampp\htdocs\mysite\craft\app\vendor\twig\twig\lib\Twig\Template.php:460)
  
  #0 C:\xampp\htdocs\mysite\craft\app\etc\templating\BaseTemplate.php(41): Twig_Template-&gt;getAttribute('', 'fromEmail', Array, 'any', false, false)
  #1 C:\xampp\htdocs\mysite\craft\storage\runtime\compiled_templates\3\5\352f325e7c58d6329a0dbf553a172b2811c881b391a544d0f295665ec793e2af.php(251): Craft\BaseTemplate-&gt;getAttribute('', 'fromEmail', Array)
  #2 C:\xampp\htdocs\mysite\craft\app\vendor\twig\twig\lib\Twig\Template.php(340): __TwigTemplate_352f325e7c58d6329a0dbf553a172b2811c881b391a544d0f295665ec793e2af-&gt;doDisplay(Array, Array)
  #3 C:\xampp\htdocs\mysite\craft\app\vendor\twig\twig\lib\Twig\Template.php(314): Twig_Template-&gt;displayWithErrorHandling(Array, Array)
  #4 C:\xampp\htdocs\mysite\craft\storage\runtime\compiled_templates\2\a\2a1532ab9a7fc5ec6775a274eca668a2af4e295ac7764368b23c762497284924.php(27): Twig_Template-&gt;display(Array, Array)
  #5 C:\xampp\htdocs\mysite\craft\app\vendor\twig\twig\lib\Twig\Template.php(340): __TwigTemplate_2a1532ab9a7fc5ec6775a274eca668a2af4e295ac7764368b23c762497284924-&gt;doDisplay(Array, Array)
  #6 C:\xampp\htdocs\mysite\craft\app\vendor\twig\twig\lib\Twig\Template.php(314): Twig_Template-&gt;displayWithErrorHandling(Array, Array)
  #7 C:\xampp\htdocs\mysite\craft\app\vendor\twig\twig\lib\Twig\Template.php(325): Twig_Template-&gt;display(Array)
  #8 C:\xampp\htdocs\mysite\craft\app\vendor\twig\twig\lib\Twig\Environment.php(293): Twig_Template-&gt;render(Array)
  #9 C:\xampp\htdocs\mysite\craft\app\services\TemplatesService.php(223): Twig_Environment-&gt;render('404', Array)
  #10 C:\xampp\htdocs\mysite\craft\app\controllers\BaseController.php(74): Craft\TemplatesService-&gt;render('404', Array)
  #11 C:\xampp\htdocs\mysite\craft\app\controllers\TemplatesController.php(201): Craft\BaseController-&gt;renderTemplate('404', Array)
  #12 C:\xampp\htdocs\mysite\craft\app\framework\web\actions\CInlineAction.php(49): Craft\TemplatesController-&gt;actionRenderError()
  #13 C:\xampp\htdocs\mysite\craft\app\framework\web\CController.php(308): CInlineAction-&gt;runWithParams(Array)
  #14 C:\xampp\htdocs\mysite\craft\app\framework\web\CController.php(286): CController-&gt;runAction(Object(CInlineAction))
  #15 C:\xampp\htdocs\mysite\craft\app\framework\web\CController.php(265): CController-&gt;runActionWithFilters(Object(CInlineAction), Array)
  #16 C:\xampp\htdocs\mysite\craft\app\framework\web\CWebApplication.php(282): CController-&gt;run('renderError')
  #17 C:\xampp\htdocs\mysite\craft\app\framework\base\CErrorHandler.php(368): CWebApplication-&gt;runController('templates/rende...')
  #18 C:\xampp\htdocs\mysite\craft\app\etc\errors\ErrorHandler.php(264): CErrorHandler-&gt;renderError()
  #19 C:\xampp\htdocs\mysite\craft\app\framework\base\CErrorHandler.php(351): Craft\ErrorHandler-&gt;renderError()
  #20 C:\xampp\htdocs\mysite\craft\app\framework\base\CErrorHandler.php(218): CErrorHandler-&gt;renderException()
  #21 C:\xampp\htdocs\mysite\craft\app\etc\errors\ErrorHandler.php(128): CErrorHandler-&gt;handleException(Object(Craft\HttpException))
  #22 C:\xampp\htdocs\mysite\craft\app\framework\base\CErrorHandler.php(131): Craft\ErrorHandler-&gt;handleException(Object(Craft\HttpException))
  #23 C:\xampp\htdocs\mysite\craft\app\framework\base\CApplication.php(740): CErrorHandler-&gt;handle(Object(CExceptionEvent))
  #24 [internal function]: CApplication-&gt;handleException(Object(Craft\HttpException))
  #25 {main}
  </code></pre>
  
  <p>Running latest Craft Pro 2.4.2700 and latest contact form plugin. What could be causing the error?</p>
  
Comments.ContentLicense: CC BY-SA 3.0
Comments.CreationDate: 2015-10-21T13:27:07.843Z
Comments.Text: What does your markup look like at "_layout" at line 149"?
Comments.UserDisplayName: Damon
Comments.ContentLicense: CC BY-SA 3.0
Comments.CreationDate: 2015-10-21T17:47:47.430Z
Comments.Text: Line 149 was {{ message is defined and message ? errorList(message.getErrors('fromEmail')) }}, but I think I found the issue. See below :)
Comments.UserDisplayName: Jae Barclay
Tags: <form><plugin-contactform>
Title: Contact form: Twig_Error_Runtime error upon submission
ThreadText: # Contact form: Twig_Error_Runtime error upon submission
  
  (Asked by: username_0 on 2015-10-21)
  
  Using the standard P&T contact form, I'm getting the following error when form is submitted (running locally):
  
  ```
  Twig_Error_Runtime
  
  Impossible to access an attribute ("fromEmail") on a string variable ("") in "_layout" at line 149 (C:\xampp\htdocs\mysite\craft\app\vendor\twig\twig\lib\Twig\Template.php:460)
  
  #0 C:\xampp\htdocs\mysite\craft\app\etc\templating\BaseTemplate.php(41): Twig_Template->getAttribute('', 'fromEmail', Array, 'any', false, false)
  #1 C:\xampp\htdocs\mysite\craft\storage\runtime\compiled_templates\3\5\352f325e7c58d6329a0dbf553a172b2811c881b391a544d0f295665ec793e2af.php(251): Craft\BaseTemplate->getAttribute('', 'fromEmail', Array)
  #2 C:\xampp\htdocs\mysite\craft\app\vendor\twig\twig\lib\Twig\Template.php(340): __TwigTemplate_352f325e7c58d6329a0dbf553a172b2811c881b391a544d0f295665ec793e2af->doDisplay(Array, Array)
  #3 C:\xampp\htdocs\mysite\craft\app\vendor\twig\twig\lib\Twig\Template.php(314): Twig_Template->displayWithErrorHandling(Array, Array)
  #4 C:\xampp\htdocs\mysite\craft\storage\runtime\compiled_templates\2\a\2a1532ab9a7fc5ec6775a274eca668a2af4e295ac7764368b23c762497284924.php(27): Twig_Template->display(Array, Array)
  #5 C:\xampp\htdocs\mysite\craft\app\vendor\twig\twig\lib\Twig\Template.php(340): __TwigTemplate_2a1532ab9a7fc5ec6775a274eca668a2af4e295ac7764368b23c762497284924->doDisplay(Array, Array)
  #6 C:\xampp\htdocs\mysite\craft\app\vendor\twig\twig\lib\Twig\Template.php(314): Twig_Template->displayWithErrorHandling(Array, Array)
  #7 C:\xampp\htdocs\mysite\craft\app\vendor\twig\twig\lib\Twig\Template.php(325): Twig_Template->display(Array)
  #8 C:\xampp\htdocs\mysite\craft\app\vendor\twig\twig\lib\Twig\Environment.php(293): Twig_Template->render(Array)
  #9 C:\xampp\htdocs\mysite\craft\app\services\TemplatesService.php(223): Twig_Environment->render('404', Array)
  #10 C:\xampp\htdocs\mysite\craft\app\controllers\BaseController.php(74): Craft\TemplatesService->render('404', Array)
  #11 C:\xampp\htdocs\mysite\craft\app\controllers\TemplatesController.php(201): Craft\BaseController->renderTemplate('404', Array)
  #12 C:\xampp\htdocs\mysite\craft\app\framework\web\actions\CInlineAction.php(49): Craft\TemplatesController->actionRenderError()
  #13 C:\xampp\htdocs\mysite\craft\app\framework\web\CController.php(308): CInlineAction->runWithParams(Array)
  #14 C:\xampp\htdocs\mysite\craft\app\framework\web\CController.php(286): CController->runAction(Object(CInlineAction))
  #15 C:\xampp\htdocs\mysite\craft\app\framework\web\CController.php(265): CController->runActionWithFilters(Object(CInlineAction), Array)
  #16 C:\xampp\htdocs\mysite\craft\app\framework\web\CWebApplication.php(282): CController->run('renderError')
  #17 C:\xampp\htdocs\mysite\craft\app\framework\base\CErrorHandler.php(368): CWebApplication->runController('templates/rende...')
  #18 C:\xampp\htdocs\mysite\craft\app\etc\errors\ErrorHandler.php(264): CErrorHandler->renderError()
  #19 C:\xampp\htdocs\mysite\craft\app\framework\base\CErrorHandler.php(351): Craft\ErrorHandler->renderError()
  #20 C:\xampp\htdocs\mysite\craft\app\framework\base\CErrorHandler.php(218): CErrorHandler->renderException()
  #21 C:\xampp\htdocs\mysite\craft\app\etc\errors\ErrorHandler.php(128): CErrorHandler->handleException(Object(Craft\HttpException))
  #22 C:\xampp\htdocs\mysite\craft\app\framework\base\CErrorHandler.php(131): Craft\ErrorHandler->handleException(Object(Craft\HttpException))
  #23 C:\xampp\htdocs\mysite\craft\app\framework\base\CApplication.php(740): CErrorHandler->handle(Object(CExceptionEvent))
  #24 [internal function]: CApplication->handleException(Object(Craft\HttpException))
  #25 {main}
  
  ```
  
  Running latest Craft Pro 2.4.2700 and latest contact form plugin. What could be causing the error?
  
  **Tags:** form, plugin-contactform
  
  > **Comments:**
  > **username_1**: What does your markup look like at "_layout" at line 149"?  
  > **username_0**: Line 149 was {{ message is defined and message ? errorList(message.getErrors('fromEmail')) }}, but I think I found the issue. See below :)  
  
  ---
  
  ## 1 answers
  
  ### Answer by username_0 on 2015-10-21. Score: 1
  
  The problem was that the redirect page was not setup. Once I threw up a test page there, the error no longer triggers.
  
  What's odd is that the error page gave little clue (at least to me) as to what was happening.
  
  
  ---
  
  