Webform Results Tab: The website encountered an unexpected error. Please try again later.

Created on 11 December 2023, about 1 year ago
Updated 5 April 2024, 9 months ago

Problem/Motivation

Steps to reproduce

Proposed resolution

doDisplay() (line 39 of /home/customer/www/ecobomjesuit.org/public_html/sites/default/files/php/twig/6573c919b979d___string_template__8503b6_hj_DJpzvexRgNORSrM5BCLCfO/WPRYC7xnUzT4pZnH92WSDYx02ajDGq85o183o4LwIUQ.php)

#0 /home/customer/www/ecobomjesuit.org/public_html/vendor/twig/twig/src/Template.php(405): __TwigTemplate_4f3b359d38c995d02a6ad4edfbee385c1eb7e993f42eebe8d658d8bfaf7dbad3->doDisplay(Array, Array)
#1 /home/customer/www/ecobomjesuit.org/public_html/vendor/twig/twig/src/Template.php(378): Twig\Template->displayWithErrorHandling(Array, Array)
#2 /home/customer/www/ecobomjesuit.org/public_html/vendor/twig/twig/src/Template.php(390): Twig\Template->display(Array)
#3 /home/customer/www/ecobomjesuit.org/public_html/vendor/twig/twig/src/TemplateWrapper.php(45): Twig\Template->render(Array, Array)
#4 /home/customer/www/ecobomjesuit.org/public_html/core/lib/Drupal/Core/Template/TwigEnvironment.php(234): Twig\TemplateWrapper->render(Array)
#5 /home/customer/www/ecobomjesuit.org/public_html/core/lib/Drupal/Core/Render/Element/InlineTemplate.php(53): Drupal\Core\Template\TwigEnvironment->renderInline('{# inline_templ...', Array)
#6 [internal function]: Drupal\Core\Render\Element\InlineTemplate::preRenderInlineTemplate(Array)
#7 /home/customer/www/ecobomjesuit.org/public_html/core/lib/Drupal/Core/Security/DoTrustedCallbackTrait.php(101): call_user_func_array(Array, Array)
#8 /home/customer/www/ecobomjesuit.org/public_html/core/lib/Drupal/Core/Render/Renderer.php(788): Drupal\Core\Render\Renderer->doTrustedCallback(Array, Array, 'Render #pre_ren...', 'exception', 'Drupal\\Core\\Ren...')
#9 /home/customer/www/ecobomjesuit.org/public_html/core/lib/Drupal/Core/Render/Renderer.php(374): Drupal\Core\Render\Renderer->doCallback('#pre_render', Array, Array)
#10 /home/customer/www/ecobomjesuit.org/public_html/core/lib/Drupal/Core/Render/Renderer.php(204): Drupal\Core\Render\Renderer->doRender(Array, true)
#11 /home/customer/www/ecobomjesuit.org/public_html/core/lib/Drupal/Core/Render/Renderer.php(160): Drupal\Core\Render\Renderer->render(Array, true)
#12 /home/customer/www/ecobomjesuit.org/public_html/core/lib/Drupal/Core/Render/Renderer.php(580): Drupal\Core\Render\Renderer->Drupal\Core\Render\{closure}()
#13 /home/customer/www/ecobomjesuit.org/public_html/core/lib/Drupal/Core/Render/Renderer.php(161): Drupal\Core\Render\Renderer->executeInRenderContext(Object(Drupal\Core\Render\RenderContext), Object(Closure))
#14 /home/customer/www/ecobomjesuit.org/public_html/modules/webform/src/Twig/WebformTwigExtension.php(261): Drupal\Core\Render\Renderer->renderPlain(Array)
#15 /home/customer/www/ecobomjesuit.org/public_html/modules/webform/src/Element/WebformComputedTwig.php(61): Drupal\webform\Twig\WebformTwigExtension::renderTwigTemplate(Object(Drupal\webform\Entity\WebformSubmission), '{{( data.percen...', Array)
#16 /home/customer/www/ecobomjesuit.org/public_html/modules/webform/src/Plugin/WebformElement/WebformComputedBase.php(320): Drupal\webform\Element\WebformComputedTwig::computeValue(Array, Object(Drupal\webform\Entity\WebformSubmission))
#17 /home/customer/www/ecobomjesuit.org/public_html/modules/webform/src/Entity/WebformSubmission.php(459): Drupal\webform\Plugin\WebformElement\WebformComputedBase->computeValue(Array, Object(Drupal\webform\Entity\WebformSubmission))
#18 /home/customer/www/ecobomjesuit.org/public_html/modules/webform/src/WebformSubmissionStorage.php(1439): Drupal\webform\Entity\WebformSubmission->getData()
#19 /home/customer/www/ecobomjesuit.org/public_html/modules/webform/src/WebformSubmissionStorage.php(170): Drupal\webform\WebformSubmissionStorage->loadData(Array)
#20 /home/customer/www/ecobomjesuit.org/public_html/core/lib/Drupal/Core/Entity/EntityStorageBase.php(346): Drupal\webform\WebformSubmissionStorage->doLoadMultiple(Array)
#21 /home/customer/www/ecobomjesuit.org/public_html/core/modules/views/src/Plugin/views/query/Sql.php(1625): Drupal\Core\Entity\EntityStorageBase->loadMultiple(Array)
#22 /home/customer/www/ecobomjesuit.org/public_html/core/modules/views/src/Plugin/views/query/Sql.php(1550): Drupal\views\Plugin\views\query\Sql->loadEntities(Array)
#23 /home/customer/www/ecobomjesuit.org/public_html/core/modules/views/src/ViewExecutable.php(1431): Drupal\views\Plugin\views\query\Sql->execute(Object(Drupal\views\ViewExecutable))
#24 /home/customer/www/ecobomjesuit.org/public_html/core/modules/views/src/ViewExecutable.php(1459): Drupal\views\ViewExecutable->execute(NULL)
#25 /home/customer/www/ecobomjesuit.org/public_html/core/modules/views/src/Plugin/views/display/Page.php(199): Drupal\views\ViewExecutable->render()
#26 /home/customer/www/ecobomjesuit.org/public_html/core/modules/views/src/ViewExecutable.php(1635): Drupal\views\Plugin\views\display\Page->execute()
#27 /home/customer/www/ecobomjesuit.org/public_html/core/modules/views/src/Element/View.php(81): Drupal\views\ViewExecutable->executeDisplay('page_1', Array)
#28 [internal function]: Drupal\views\Element\View::preRenderViewElement(Array)
#29 /home/customer/www/ecobomjesuit.org/public_html/core/lib/Drupal/Core/Security/DoTrustedCallbackTrait.php(101): call_user_func_array(Array, Array)
#30 /home/customer/www/ecobomjesuit.org/public_html/core/lib/Drupal/Core/Render/Renderer.php(788): Drupal\Core\Render\Renderer->doTrustedCallback(Array, Array, 'Render #pre_ren...', 'exception', 'Drupal\\Core\\Ren...')
#31 /home/customer/www/ecobomjesuit.org/public_html/core/lib/Drupal/Core/Render/Renderer.php(374): Drupal\Core\Render\Renderer->doCallback('#pre_render', Array, Array)
#32 /home/customer/www/ecobomjesuit.org/public_html/core/lib/Drupal/Core/Render/Renderer.php(204): Drupal\Core\Render\Renderer->doRender(Array, false)
#33 /home/customer/www/ecobomjesuit.org/public_html/core/lib/Drupal/Core/Render/MainContent/HtmlRenderer.php(242): Drupal\Core\Render\Renderer->render(Array, false)
#34 /home/customer/www/ecobomjesuit.org/public_html/core/lib/Drupal/Core/Render/Renderer.php(580): Drupal\Core\Render\MainContent\HtmlRenderer->Drupal\Core\Render\MainContent\{closure}()
#35 /home/customer/www/ecobomjesuit.org/public_html/core/lib/Drupal/Core/Render/MainContent/HtmlRenderer.php(243): Drupal\Core\Render\Renderer->executeInRenderContext(Object(Drupal\Core\Render\RenderContext), Object(Closure))
#36 /home/customer/www/ecobomjesuit.org/public_html/core/lib/Drupal/Core/Render/MainContent/HtmlRenderer.php(132): Drupal\Core\Render\MainContent\HtmlRenderer->prepare(Array, Object(Symfony\Component\HttpFoundation\Request), Object(Drupal\Core\Routing\CurrentRouteMatch))
#37 /home/customer/www/ecobomjesuit.org/public_html/core/lib/Drupal/Core/EventSubscriber/MainContentViewSubscriber.php(90): Drupal\Core\Render\MainContent\HtmlRenderer->renderResponse(Array, Object(Symfony\Component\HttpFoundation\Request), Object(Drupal\Core\Routing\CurrentRouteMatch))
#38 [internal function]: Drupal\Core\EventSubscriber\MainContentViewSubscriber->onViewRenderArray(Object(Symfony\Component\HttpKernel\Event\ViewEvent), 'kernel.view', Object(Drupal\Component\EventDispatcher\ContainerAwareEventDispatcher))
#39 /home/customer/www/ecobomjesuit.org/public_html/core/lib/Drupal/Component/EventDispatcher/ContainerAwareEventDispatcher.php(142): call_user_func(Array, Object(Symfony\Component\HttpKernel\Event\ViewEvent), 'kernel.view', Object(Drupal\Component\EventDispatcher\ContainerAwareEventDispatcher))
#40 /home/customer/www/ecobomjesuit.org/public_html/vendor/symfony/http-kernel/HttpKernel.php(174): Drupal\Component\EventDispatcher\ContainerAwareEventDispatcher->dispatch(Object(Symfony\Component\HttpKernel\Event\ViewEvent), 'kernel.view')
#41 /home/customer/www/ecobomjesuit.org/public_html/vendor/symfony/http-kernel/HttpKernel.php(81): Symfony\Component\HttpKernel\HttpKernel->handleRaw(Object(Symfony\Component\HttpFoundation\Request), 1)
#42 /home/customer/www/ecobomjesuit.org/public_html/core/lib/Drupal/Core/StackMiddleware/Session.php(58): Symfony\Component\HttpKernel\HttpKernel->handle(Object(Symfony\Component\HttpFoundation\Request), 1, true)
#43 /home/customer/www/ecobomjesuit.org/public_html/core/lib/Drupal/Core/StackMiddleware/KernelPreHandle.php(48): Drupal\Core\StackMiddleware\Session->handle(Object(Symfony\Component\HttpFoundation\Request), 1, true)
#44 /home/customer/www/ecobomjesuit.org/public_html/core/modules/page_cache/src/StackMiddleware/PageCache.php(106): Drupal\Core\StackMiddleware\KernelPreHandle->handle(Object(Symfony\Component\HttpFoundation\Request), 1, true)
#45 /home/customer/www/ecobomjesuit.org/public_html/core/modules/page_cache/src/StackMiddleware/PageCache.php(85): Drupal\page_cache\StackMiddleware\PageCache->pass(Object(Symfony\Component\HttpFoundation\Request), 1, true)
#46 /home/customer/www/ecobomjesuit.org/public_html/core/lib/Drupal/Core/StackMiddleware/ReverseProxyMiddleware.php(48): Drupal\page_cache\StackMiddleware\PageCache->handle(Object(Symfony\Component\HttpFoundation\Request), 1, true)
#47 /home/customer/www/ecobomjesuit.org/public_html/core/lib/Drupal/Core/StackMiddleware/NegotiationMiddleware.php(51): Drupal\Core\StackMiddleware\ReverseProxyMiddleware->handle(Object(Symfony\Component\HttpFoundation\Request), 1, true)
#48 /home/customer/www/ecobomjesuit.org/public_html/vendor/stack/builder/src/Stack/StackedHttpKernel.php(23): Drupal\Core\StackMiddleware\NegotiationMiddleware->handle(Object(Symfony\Component\HttpFoundation\Request), 1, true)
#49 /home/customer/www/ecobomjesuit.org/public_html/core/lib/Drupal/Core/DrupalKernel.php(718): Stack\StackedHttpKernel->handle(Object(Symfony\Component\HttpFoundation\Request), 1, true)
#50 /home/customer/www/ecobomjesuit.org/public_html/index.php(19): Drupal\Core\DrupalKernel->handle(Object(Symfony\Component\HttpFoundation\Request))
#51 {main}">Log message Error

🐛 Bug report
Status

Closed: cannot reproduce

Version

6.2

Component

Code

Created by

🇮🇳India gmasky

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

  • Issue created by @gmasky
  • 🇺🇸United States jrockowitz Brooklyn, NY

    We need the steps required to reproduce this issue.

    Can you reproduce this issue in a plain vanilla Drupal site?

    How would someone configure a plain vanilla Drupal site to reproduce this issue?

  • Status changed to Postponed: needs info about 1 year ago
  • 🇺🇸United States jrockowitz Brooklyn, NY

    The below line hints that you have a webform with an invalid computed twig file

    /home/customer/www/ecobomjesuit.org/public_html/modules/webform/src/Element/WebformComputedTwig.php(61):

  • What is the exception? There is a stack trace (thank you!) but it seems to be missing the actual exception text.

  • 🇮🇳India gmasky

    I created this webform https://ecobomjesuit.org/eco-audit-form and used webform views integration to create a dashboard of results https://ecobomjesuit.org/eco-audit-dashboard

    this worked fine till after the upgrade to Webform 6.2 when the results tab started showing errors

    I am not sure what broke the viewing of results both Results Tab and via views/ webform views-integration

  • I'm using Drupal 10.2.0 and Webform 6.2.0 and went to export the results of people who registered for an event. Tried downloading CSV and HTML Table and get the Website encountered error. Noticed the box to install Webform xlsx export module, so installed and same result. I then checked the error_log in root directory.
    [03-Jan-2024 01:06:46 UTC] Symfony\Component\Mime\Exception\LogicException: Unable to guess the MIME type as no guessers are available (have you enabled the php_fileinfo extension?). in /home/troopcor/public_html/vendor/symfony/mime/MimeTypes.php on line 129 #0 /home/troopcor/public_html/vendor/symfony/http-foundation/File/File.php(77): Symfony\Component\Mime\MimeTypes->guessMimeType()
    #1 /home/troopcor/public_html/vendor/symfony/http-foundation/BinaryFileResponse.php(191): Symfony\Component\HttpFoundation\File\File->getMimeType()
    #2 /home/troopcor/public_html/core/lib/Drupal/Core/DrupalKernel.php(715): Symfony\Component\HttpFoundation\BinaryFileResponse->prepare()
    #3 /home/troopcor/public_html/index.php(19): Drupal\Core\DrupalKernel->handle()
    #4 {main}

    Downloading to XLSX after installing xlsx export module:
    [03-Jan-2024 01:14:50 UTC] Uncaught PHP Exception Error: "Class "PhpOffice\PhpSpreadsheet\Spreadsheet" not found" at /home/troopcor/public_html/modules/webform_xlsx_export/src/Plugin/WebformExporter/XlsxExporter.php line 43

    I noticed it said: (have you enabled the php_fileinfo extension?). I logged into cPanel and enabled fileinfo.

    Lines 1-9 of XlsxExporter.php
    <?php

    namespace Drupal\webform_xlsx_export\Plugin\WebformExporter;

    use PhpOffice\PhpSpreadsheet\Cell\StringValueBinder;
    use PhpOffice\PhpSpreadsheet\IOFactory;
    use Drupal\webform\Plugin\WebformExporter\TabularBaseWebformExporter;
    use Drupal\webform\WebformSubmissionInterface;
    use PhpOffice\PhpSpreadsheet\Spreadsheet;

    Lines 39-44
    /**
    * {@inheritdoc}
    */
    public function createExport() {
    $this->xls = new Spreadsheet();
    }

  • @Fred_K What is the relation of your comment to this issue?

  • I am getting this error message "The website encountered an unexpected error. Please try again later." every time I try to download a Webform submission as a pdf. Any suggestions on how to fix it?

  • odaemilie: That's may be unrelated to this particular issue. For a bug report we require the error that was logged, or there is nothing to go on.

  • Status changed to Closed: cannot reproduce 9 months ago
  • 🇺🇸United States jrockowitz Brooklyn, NY
Production build 0.71.5 2024