Please disregard the 'View article...' shown at the bottom of many posts as this is the result of restoring old forum posts from a backup.

Form Submit not showing Response Display

We have the latest release of exponent installed, tested on a couple of systems... when using the forms module, upon submit of the form, the response does not display. Only the rest of the website template global containers with a blank main section... error reporting on/off shows nothing either. Anything else I can test?

Statistics: Posted by tcnetw0rks
«1

Comments

  • I noticed that this morning myself, hadn't tracked down the problem and not sure when it developed...may be a regression bug introduced when I fixed the 'try to send an email even when we didn't get an email address entry' bug.

    Statistics: Posted by dleffler
  • Ok, I've located and fixed the issue, and the update is already on our github 'master' branch. I will work on getting a formal v2.2.3 patch #3 out early next week.

    FWIW, the issue ONLY affects display of the 'response' message (it does NOT affect emailing nor saving entries). Instead of displaying the correct view template, we are displaying a generic 'blank' template.

    If you don't use git to maintain your site, you COULD edit /framework/modules/forms/controllers/formsController.php around line # 445 by adding

    Code:
    unset($this->params['view']);

    just after

    Code:
    unset($this->params['controller']);
    unset($this->params['action']);

    Statistics: Posted by dleffler
  • Awesome... fixed. Thanks.

    Statistics: Posted by tcnetw0rks
  • probably should be a new topic, but I have forms that work normally, except when I add a file upload field... when there is a file upload field in a form, it breaks when 'email form submissions' is enabled. I have tested on different sites, different servers, hosted/not... if the email submissions is not selected, it works perfectly.

    Here's the error reported on one site...

    Strict Standards: Only variables should be passed by reference in /homepages/0/d493820117/htdocs/website/framework/modules/file/models/expFile.php on line 815

    Warning: fopen(homepages0d493820117htdocswebsite/files/uploads/1387045778_background.png): failed to open stream: No such file or directory in /homepages/0/d493820117/htdocs/website/external/Swift-5.0.1/lib/classes/Swift/ByteStream/FileByteStream.php on line 138

    Fatal error: Uncaught exception 'Swift_IoException' with message 'Unable to open file for reading [homepages0d493820117htdocswebsite/files/uploads/1387045778_background.png]' in /homepages/0/d493820117/htdocs/website/external/Swift-5.0.1/lib/classes/Swift/ByteStream/FileByteStream.php:139 Stack trace: #0 /homepages/0/d493820117/htdocs/website/external/Swift-5.0.1/lib/classes/Swift/ByteStream/FileByteStream.php(86): Swift_ByteStream_FileByteStream->_getReadHandle() #1 /homepages/0/d493820117/htdocs/website/external/Swift-5.0.1/lib/classes/Swift/Mime/SimpleMimeEntity.php(705): Swift_ByteStream_FileByteStream->read(8192) #2 /homepages/0/d493820117/htdocs/website/external/Swift-5.0.1/lib/classes/Swift/Mime/SimpleMimeEntity.php(353): Swift_Mime_SimpleMimeEntity->_readStream(Object(Swift_ByteStream_FileByteStream)) #3 /homepages/0/d493820117/htdocs/website/external/Swift-5.0.1/lib/classes/Swift/Mime/SimpleMimeEntity.php(489): Swift_Mime_SimpleMimeEntity->getBody() #4 /homepages/0/d493820117/htdocs/website/external/Swift-5.0.1/l in /homepages/0/d493820117/htdocs/website/external/Swift-5.0.1/lib/classes/Swift/ByteStream/FileByteStream.php on line 139

    any help I can give to get fixed, i'd be happy to. thanks.

    Statistics: Posted by tcnetw0rks
  • You might try this edit to /framework/core/subsystems/expMail.php beginning at line #600 is should look like

    Code:
    if (count($emaillist)) {
    $mail = new expMail();
    if (!empty($attachments)) {
    foreach ($attachments as $attachment) {
    if (file_exists(BASE.$attachment)) {
    $relpath = str_replace(PATH_RELATIVE, '', BASE);
    // $finfo = finfo_open(FILEINFO_MIME_TYPE);
    // $ftype = finfo_file($finfo, $relpath . $attachment);
    // finfo_close($finfo);
    $mail->attach_file_on_disk($relpath . $attachment, expFile::getMimeType($attachment));
    }
    }
    }
    $mail->quickSend(array(
    // 'headers'=>$headers,
    'html_message' => $emailHtml,
    "text_message" => $emailText,
    'to' => $emaillist,
    'from' => array(trim($from) => $from_name),
    'subject' => $this->config['subject'],
    ));
    }

    which should be changed to

    Code:
    if (count($emaillist)) {
    $mail = new expMail();
    if (!empty($attachments)) {
    foreach ($attachments as $attachment) {
    if (strlen(PATH_RELATIVE) != 1)
    $attachment = str_replace(PATH_RELATIVE, '', $attachment); // strip relative path for links coming from templates
    if (file_exists(BASE . $attachment)) {
    // $relpath = str_replace(PATH_RELATIVE, '', BASE);
    // $finfo = finfo_open(FILEINFO_MIME_TYPE);
    // $ftype = finfo_file($finfo, $relpath . $attachment);
    // finfo_close($finfo);
    $mail->attach_file_on_disk(BASE . $attachment, expFile::getMimeType($attachment));
    }
    }
    }
    $mail->quickSend(array(
    // 'headers'=>$headers,
    'html_message' => $emailHtml,
    "text_message" => $emailText,
    'to' => $emaillist,
    'from' => array(trim($from) => $from_name),
    'subject' => $this->config['subject'],
    ));
    }

    Not sure that will fix your problem since we shouldn't be attaching anything if it doesn't exist. The above fix was needed on my test system operating in a subfolder (PATH_RELATIVE)

    Statistics: Posted by dleffler
  • fixed! however, it was in the /framework/modules/forms/controllers/formsController.php

    I was actually surprised to see that it actually attached the uploaded file... thought it would simply list it as a link in the email of the input-ted? fields. Thanks for the help. Again.

    Statistics: Posted by tcnetw0rks
  • fixed! however, it was in the /framework/modules/forms/controllers/formsController.php

    I was actually surprised to see that it actually attached the uploaded file... thought it would simply list it as a link in the email of the input-ted? fields. Thanks for the help. Again.

    Statistics: Posted by tcnetw0rks
  • We have the latest release of exponent installed, tested on a couple of systems... when using the forms module, upon submit of the form, the response does not display. Only the rest of the website template global containers with a blank main section... error reporting on/off shows nothing either. Anything else I can test?


    View article...
  • fixed! however, it was in the /framework/modules/forms/controllers/formsController.php

    I was actually surprised to see that it actually attached the uploaded file... thought it would simply list it as a link in the email of the input-ted? fields. Thanks for the help. Again.


    View article...
  • You might try this edit to /framework/core/subsystems/expMail.php beginning at line #600 is should look like
    if (count($emaillist)) {
    $mail = new expMail();
    if (!empty($attachments)) {
    foreach ($attachments as $attachment) {
    if (file_exists(BASE.$attachment)) {
    $relpath = str_replace(PATH_RELATIVE, '', BASE);
    // $finfo = finfo_open(FILEINFO_MIME_TYPE);
    // $ftype = finfo_file($finfo, $relpath . $attachment);
    // finfo_close($finfo);
    $mail->attach_file_on_disk($relpath . $attachment, expFile::getMimeType($attachment));
    }
    }
    }
    $mail->quickSend(array(
    // 'headers'=>$headers,
    'html_message' => $emailHtml,
    \"text_message\" => $emailText,
    'to' => $emaillist,
    'from' => array(trim($from) => $from_name),
    'subject' => $this->config['subject'],
    ));
    }
    which should be changed to
    if (count($emaillist)) {
    $mail = new expMail();
    if (!empty($attachments)) {
    foreach ($attachments as $attachment) {
    if (strlen(PATH_RELATIVE) != 1)
    $attachment = str_replace(PATH_RELATIVE, '', $attachment); // strip relative path for links coming from templates
    if (file_exists(BASE . $attachment)) {
    // $relpath = str_replace(PATH_RELATIVE, '', BASE);
    // $finfo = finfo_open(FILEINFO_MIME_TYPE);
    // $ftype = finfo_file($finfo, $relpath . $attachment);
    // finfo_close($finfo);
    $mail->attach_file_on_disk(BASE . $attachment, expFile::getMimeType($attachment));
    }
    }
    }
    $mail->quickSend(array(
    // 'headers'=>$headers,
    'html_message' => $emailHtml,
    \"text_message\" => $emailText,
    'to' => $emaillist,
    'from' => array(trim($from) => $from_name),
    'subject' => $this->config['subject'],
    ));
    }
    Not sure that will fix your problem since we shouldn't be attaching anything if it doesn't exist. The above fix was needed on my test system operating in a subfolder (PATH_RELATIVE)


    View article...
  • probably should be a new topic, but I have forms that work normally, except when I add a file upload field... when there is a file upload field in a form, it breaks when 'email form submissions' is enabled. I have tested on different sites, different servers, hosted/not... if the email submissions is not selected, it works perfectly.

    Here's the error reported on one site...

    Strict Standards: Only variables should be passed by reference in /homepages/0/d493820117/htdocs/website/framework/modules/file/models/expFile.php on line 815

    Warning: fopen(homepages0d493820117htdocswebsite/files/uploads/1387045778_background.png): failed to open stream: No such file or directory in /homepages/0/d493820117/htdocs/website/external/Swift-5.0.1/lib/classes/Swift/ByteStream/FileByteStream.php on line 138

    Fatal error: Uncaught exception 'Swift_IoException' with message 'Unable to open file for reading [homepages0d493820117htdocswebsite/files/uploads/1387045778_background.png]' in /homepages/0/d493820117/htdocs/website/external/Swift-5.0.1/lib/classes/Swift/ByteStream/FileByteStream.php:139 Stack trace: #0 /homepages/0/d493820117/htdocs/website/external/Swift-5.0.1/lib/classes/Swift/ByteStream/FileByteStream.php(86): Swift_ByteStream_FileByteStream->_getReadHandle() #1 /homepages/0/d493820117/htdocs/website/external/Swift-5.0.1/lib/classes/Swift/Mime/SimpleMimeEntity.php(705): Swift_ByteStream_FileByteStream->read(8192) #2 /homepages/0/d493820117/htdocs/website/external/Swift-5.0.1/lib/classes/Swift/Mime/SimpleMimeEntity.php(353): Swift_Mime_SimpleMimeEntity->_readStream(Object(Swift_ByteStream_FileByteStream)) #3 /homepages/0/d493820117/htdocs/website/external/Swift-5.0.1/lib/classes/Swift/Mime/SimpleMimeEntity.php(489): Swift_Mime_SimpleMimeEntity->getBody() #4 /homepages/0/d493820117/htdocs/website/external/Swift-5.0.1/l in /homepages/0/d493820117/htdocs/website/external/Swift-5.0.1/lib/classes/Swift/ByteStream/FileByteStream.php on line 139

    any help I can give to get fixed, i'd be happy to. thanks.


    View article...
  • Awesome... fixed. Thanks.


    View article...
  • Ok, I've located and fixed the issue, and the update is already on our github 'master' branch. I will work on getting a formal v2.2.3 patch #3 out early next week.

    FWIW, the issue ONLY affects display of the 'response' message (it does NOT affect emailing nor saving entries). Instead of displaying the correct view template, we are displaying a generic 'blank' template.

    If you don't use git to maintain your site, you COULD edit /framework/modules/forms/controllers/formsController.php around line # 445 by adding
    unset($this->params['view']);
    just after
    unset($this->params['controller']);
    unset($this->params['action']);


    View article...
  • I noticed that this morning myself, hadn't tracked down the problem and not sure when it developed...may be a regression bug introduced when I fixed the 'try to send an email even when we didn't get an email address entry' bug.


    View article...
  • fixed! however, it was in the /framework/modules/forms/controllers/formsController.php

    I was actually surprised to see that it actually attached the uploaded file... thought it would simply list it as a link in the email of the input-ted? fields. Thanks for the help. Again.


    View article...
  • You might try this edit to /framework/core/subsystems/expMail.php beginning at line #600 is should look like
    if (count($emaillist)) {
    $mail = new expMail();
    if (!empty($attachments)) {
    foreach ($attachments as $attachment) {
    if (file_exists(BASE.$attachment)) {
    $relpath = str_replace(PATH_RELATIVE, '', BASE);
    // $finfo = finfo_open(FILEINFO_MIME_TYPE);
    // $ftype = finfo_file($finfo, $relpath . $attachment);
    // finfo_close($finfo);
    $mail->attach_file_on_disk($relpath . $attachment, expFile::getMimeType($attachment));
    }
    }
    }
    $mail->quickSend(array(
    // 'headers'=>$headers,
    'html_message' => $emailHtml,
    \"text_message\" => $emailText,
    'to' => $emaillist,
    'from' => array(trim($from) => $from_name),
    'subject' => $this->config['subject'],
    ));
    }
    which should be changed to
    if (count($emaillist)) {
    $mail = new expMail();
    if (!empty($attachments)) {
    foreach ($attachments as $attachment) {
    if (strlen(PATH_RELATIVE) != 1)
    $attachment = str_replace(PATH_RELATIVE, '', $attachment); // strip relative path for links coming from templates
    if (file_exists(BASE . $attachment)) {
    // $relpath = str_replace(PATH_RELATIVE, '', BASE);
    // $finfo = finfo_open(FILEINFO_MIME_TYPE);
    // $ftype = finfo_file($finfo, $relpath . $attachment);
    // finfo_close($finfo);
    $mail->attach_file_on_disk(BASE . $attachment, expFile::getMimeType($attachment));
    }
    }
    }
    $mail->quickSend(array(
    // 'headers'=>$headers,
    'html_message' => $emailHtml,
    \"text_message\" => $emailText,
    'to' => $emaillist,
    'from' => array(trim($from) => $from_name),
    'subject' => $this->config['subject'],
    ));
    }
    Not sure that will fix your problem since we shouldn't be attaching anything if it doesn't exist. The above fix was needed on my test system operating in a subfolder (PATH_RELATIVE)


    View article...
  • probably should be a new topic, but I have forms that work normally, except when I add a file upload field... when there is a file upload field in a form, it breaks when 'email form submissions' is enabled. I have tested on different sites, different servers, hosted/not... if the email submissions is not selected, it works perfectly.

    Here's the error reported on one site...

    Strict Standards: Only variables should be passed by reference in /homepages/0/d493820117/htdocs/website/framework/modules/file/models/expFile.php on line 815

    Warning: fopen(homepages0d493820117htdocswebsite/files/uploads/1387045778_background.png): failed to open stream: No such file or directory in /homepages/0/d493820117/htdocs/website/external/Swift-5.0.1/lib/classes/Swift/ByteStream/FileByteStream.php on line 138

    Fatal error: Uncaught exception 'Swift_IoException' with message 'Unable to open file for reading [homepages0d493820117htdocswebsite/files/uploads/1387045778_background.png]' in /homepages/0/d493820117/htdocs/website/external/Swift-5.0.1/lib/classes/Swift/ByteStream/FileByteStream.php:139 Stack trace: #0 /homepages/0/d493820117/htdocs/website/external/Swift-5.0.1/lib/classes/Swift/ByteStream/FileByteStream.php(86): Swift_ByteStream_FileByteStream->_getReadHandle() #1 /homepages/0/d493820117/htdocs/website/external/Swift-5.0.1/lib/classes/Swift/Mime/SimpleMimeEntity.php(705): Swift_ByteStream_FileByteStream->read(8192) #2 /homepages/0/d493820117/htdocs/website/external/Swift-5.0.1/lib/classes/Swift/Mime/SimpleMimeEntity.php(353): Swift_Mime_SimpleMimeEntity->_readStream(Object(Swift_ByteStream_FileByteStream)) #3 /homepages/0/d493820117/htdocs/website/external/Swift-5.0.1/lib/classes/Swift/Mime/SimpleMimeEntity.php(489): Swift_Mime_SimpleMimeEntity->getBody() #4 /homepages/0/d493820117/htdocs/website/external/Swift-5.0.1/l in /homepages/0/d493820117/htdocs/website/external/Swift-5.0.1/lib/classes/Swift/ByteStream/FileByteStream.php on line 139

    any help I can give to get fixed, i'd be happy to. thanks.


    View article...
  • Awesome... fixed. Thanks.


    View article...
  • Ok, I've located and fixed the issue, and the update is already on our github 'master' branch. I will work on getting a formal v2.2.3 patch #3 out early next week.

    FWIW, the issue ONLY affects display of the 'response' message (it does NOT affect emailing nor saving entries). Instead of displaying the correct view template, we are displaying a generic 'blank' template.

    If you don't use git to maintain your site, you COULD edit /framework/modules/forms/controllers/formsController.php around line # 445 by adding
    unset($this->params['view']);
    just after
    unset($this->params['controller']);
    unset($this->params['action']);


    View article...
  • I noticed that this morning myself, hadn't tracked down the problem and not sure when it developed...may be a regression bug introduced when I fixed the 'try to send an email even when we didn't get an email address entry' bug.


    View article...
  • fixed! however, it was in the /framework/modules/forms/controllers/formsController.php

    I was actually surprised to see that it actually attached the uploaded file... thought it would simply list it as a link in the email of the input-ted? fields. Thanks for the help. Again.


    View article...
  • You might try this edit to /framework/core/subsystems/expMail.php beginning at line #600 is should look like
    if (count($emaillist)) {
    $mail = new expMail();
    if (!empty($attachments)) {
    foreach ($attachments as $attachment) {
    if (file_exists(BASE.$attachment)) {
    $relpath = str_replace(PATH_RELATIVE, '', BASE);
    // $finfo = finfo_open(FILEINFO_MIME_TYPE);
    // $ftype = finfo_file($finfo, $relpath . $attachment);
    // finfo_close($finfo);
    $mail->attach_file_on_disk($relpath . $attachment, expFile::getMimeType($attachment));
    }
    }
    }
    $mail->quickSend(array(
    // 'headers'=>$headers,
    'html_message' => $emailHtml,
    \"text_message\" => $emailText,
    'to' => $emaillist,
    'from' => array(trim($from) => $from_name),
    'subject' => $this->config['subject'],
    ));
    }
    which should be changed to
    if (count($emaillist)) {
    $mail = new expMail();
    if (!empty($attachments)) {
    foreach ($attachments as $attachment) {
    if (strlen(PATH_RELATIVE) != 1)
    $attachment = str_replace(PATH_RELATIVE, '', $attachment); // strip relative path for links coming from templates
    if (file_exists(BASE . $attachment)) {
    // $relpath = str_replace(PATH_RELATIVE, '', BASE);
    // $finfo = finfo_open(FILEINFO_MIME_TYPE);
    // $ftype = finfo_file($finfo, $relpath . $attachment);
    // finfo_close($finfo);
    $mail->attach_file_on_disk(BASE . $attachment, expFile::getMimeType($attachment));
    }
    }
    }
    $mail->quickSend(array(
    // 'headers'=>$headers,
    'html_message' => $emailHtml,
    \"text_message\" => $emailText,
    'to' => $emaillist,
    'from' => array(trim($from) => $from_name),
    'subject' => $this->config['subject'],
    ));
    }
    Not sure that will fix your problem since we shouldn't be attaching anything if it doesn't exist. The above fix was needed on my test system operating in a subfolder (PATH_RELATIVE)


    View article...
  • probably should be a new topic, but I have forms that work normally, except when I add a file upload field... when there is a file upload field in a form, it breaks when 'email form submissions' is enabled. I have tested on different sites, different servers, hosted/not... if the email submissions is not selected, it works perfectly.

    Here's the error reported on one site...

    Strict Standards: Only variables should be passed by reference in /homepages/0/d493820117/htdocs/website/framework/modules/file/models/expFile.php on line 815

    Warning: fopen(homepages0d493820117htdocswebsite/files/uploads/1387045778_background.png): failed to open stream: No such file or directory in /homepages/0/d493820117/htdocs/website/external/Swift-5.0.1/lib/classes/Swift/ByteStream/FileByteStream.php on line 138

    Fatal error: Uncaught exception 'Swift_IoException' with message 'Unable to open file for reading [homepages0d493820117htdocswebsite/files/uploads/1387045778_background.png]' in /homepages/0/d493820117/htdocs/website/external/Swift-5.0.1/lib/classes/Swift/ByteStream/FileByteStream.php:139 Stack trace: #0 /homepages/0/d493820117/htdocs/website/external/Swift-5.0.1/lib/classes/Swift/ByteStream/FileByteStream.php(86): Swift_ByteStream_FileByteStream->_getReadHandle() #1 /homepages/0/d493820117/htdocs/website/external/Swift-5.0.1/lib/classes/Swift/Mime/SimpleMimeEntity.php(705): Swift_ByteStream_FileByteStream->read(8192) #2 /homepages/0/d493820117/htdocs/website/external/Swift-5.0.1/lib/classes/Swift/Mime/SimpleMimeEntity.php(353): Swift_Mime_SimpleMimeEntity->_readStream(Object(Swift_ByteStream_FileByteStream)) #3 /homepages/0/d493820117/htdocs/website/external/Swift-5.0.1/lib/classes/Swift/Mime/SimpleMimeEntity.php(489): Swift_Mime_SimpleMimeEntity->getBody() #4 /homepages/0/d493820117/htdocs/website/external/Swift-5.0.1/l in /homepages/0/d493820117/htdocs/website/external/Swift-5.0.1/lib/classes/Swift/ByteStream/FileByteStream.php on line 139

    any help I can give to get fixed, i'd be happy to. thanks.


    View article...
  • Awesome... fixed. Thanks.


    View article...
  • Ok, I've located and fixed the issue, and the update is already on our github 'master' branch. I will work on getting a formal v2.2.3 patch #3 out early next week.

    FWIW, the issue ONLY affects display of the 'response' message (it does NOT affect emailing nor saving entries). Instead of displaying the correct view template, we are displaying a generic 'blank' template.

    If you don't use git to maintain your site, you COULD edit /framework/modules/forms/controllers/formsController.php around line # 445 by adding
    unset($this->params['view']);
    just after
    unset($this->params['controller']);
    unset($this->params['action']);


    View article...
  • I noticed that this morning myself, hadn't tracked down the problem and not sure when it developed...may be a regression bug introduced when I fixed the 'try to send an email even when we didn't get an email address entry' bug.


    View article...
  • We have the latest release of exponent installed, tested on a couple of systems... when using the forms module, upon submit of the form, the response does not display. Only the rest of the website template global containers with a blank main section... error reporting on/off shows nothing either. Anything else I can test?


    View article...
  • Awesome... fixed. Thanks.


    View article...
  • Ok, I've located and fixed the issue, and the update is already on our github 'master' branch. I will work on getting a formal v2.2.3 patch #3 out early next week.

    FWIW, the issue ONLY affects display of the 'response' message (it does NOT affect emailing nor saving entries). Instead of displaying the correct view template, we are displaying a generic 'blank' template.

    If you don't use git to maintain your site, you COULD edit /framework/modules/forms/controllers/formsController.php around line # 445 by adding
    unset($this->params['view']);
    just after
    unset($this->params['controller']);
    unset($this->params['action']);


    View article...
  • I noticed that this morning myself, hadn't tracked down the problem and not sure when it developed...may be a regression bug introduced when I fixed the 'try to send an email even when we didn't get an email address entry' bug.


    View article...
Sign In or Register to comment.