After I updated from beta7 to beta9 I get the following message, when I try to load any of my webforms:
Unable to display this webform. Please contact the site administrator
If I try to open a submission result, I get a WSOD, with the following error in php logs:
TypeError: Argument 1 passed to Drupal\\webform\\WebformSubmissionViewBuilder::buildElements() must be of the type array, boolean given, called in /var/customers/webs/freigeist/freigeist-dev/modules/webform/includes/webform.theme.inc on line 310 in /var/customers/webs/freigeist/freigeist-dev/modules/webform/src/WebformSubmissionViewBuilder.php on line 130 #0 /var/customers/webs/freigeist/freigeist-dev/modules/webform/includes/webform.theme.inc(310): Drupal\\webform\\WebformSubmissionViewBuilder->buildElements(false, Array)\n#1 /var/customers/webs/freigeist/freigeist-dev/core/lib/Drupal/Core/Theme/ThemeManager.php(287): template_preprocess_webform_submission_html(Array, 'webform_submiss...', Array)\n#2 /var/customers/webs/freigeist/freigeist-dev/core/lib/Drupal/Core/Render/Renderer.php(435): Drupal\\Core\\Theme\\ThemeManager->render('webform_submiss...', Array)\n#3 /var/customers/webs/freigeist/freigeist-dev/core/lib/Drupal/Core/Render/Renderer.php(448): Drupal\\Core\\Render\\Renderer->doRender(Array)\n#4 /var/customers/webs/freigeist/freigeist-dev/core/lib/Drupal/Core/Render/Renderer.php(195): Drupal\\Core\\Render\\Renderer->doRender(Array, false)\n#5 /var/customers/webs/freigeist/freigeist-dev/core/lib/Drupal/Core/Render/MainContent/HtmlRenderer.php(226): Drupal\\Core\\Render\\Renderer->render(Array, false)\n#6 /var/customers/webs/freigeist/freigeist-dev/core/lib/Drupal/Core/Render/Renderer.php(574): Drupal\\Core\\Render\\MainContent\\HtmlRenderer->Drupal\\Core\\Render\\MainContent\\{closure}()\n#7 /var/customers/webs/freigeist/freigeist-dev/core/lib/Drupal/Core/Render/MainContent/HtmlRenderer.php(227): Drupal\\Core\\Render\\Renderer->executeInRenderContext(Object(Drupal\\Core\\Render\\RenderContext), Object(Closure))\n#8 /var/customers/webs/freigeist/freigeist-dev/core/lib/Drupal/Core/Render/MainContent/HtmlRenderer.php(117): Drupal\\Core\\Render\\MainContent\\HtmlRenderer->prepare(Array, Object(Symfony\\Component\\HttpFoundation\\Request), Object(Drupal\\Core\\Routing\\CurrentRouteMatch))\n#9 /var/customers/webs/freigeist/freigeist-dev/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))\n#10 /var/customers/webs/freigeist/freigeist-dev/core/lib/Drupal/Component/EventDispatcher/ContainerAwareEventDispatcher.php(111): Drupal\\Core\\EventSubscriber\\MainContentViewSubscriber->onViewRenderArray(Object(Symfony\\Component\\HttpKernel\\Event\\GetResponseForControllerResultEvent), 'kernel.view', Object(Drupal\\Component\\EventDispatcher\\ContainerAwareEventDispatcher))\n#11 /var/customers/webs/freigeist/freigeist-dev/vendor/symfony/http-kernel/HttpKernel.php(149): Drupal\\Component\\EventDispatcher\\ContainerAwareEventDispatcher->dispatch('kernel.view', Object(Symfony\\Component\\HttpKernel\\Event\\GetResponseForControllerResultEvent))\n#12 /var/customers/webs/freigeist/freigeist-dev/vendor/symfony/http-kernel/HttpKernel.php(64): Symfony\\Component\\HttpKernel\\HttpKernel->handleRaw(Object(Symfony\\Component\\HttpFoundation\\Request), 1)\n#13 /var/customers/webs/freigeist/freigeist-dev/core/lib/Drupal/Core/StackMiddleware/Session.php(57): Symfony\\Component\\HttpKernel\\HttpKernel->handle(Object(Symfony\\Component\\HttpFoundation\\Request), 1, true)\n#14 /var/customers/webs/freigeist/freigeist-dev/core/lib/Drupal/Core/StackMiddleware/KernelPreHandle.php(47): Drupal\\Core\\StackMiddleware\\Session->handle(Object(Symfony\\Component\\HttpFoundation\\Request), 1, true)\n#15 /var/customers/webs/freigeist/freigeist-dev/core/modules/page_cache/src/StackMiddleware/PageCache.php(99): Drupal\\Core\\StackMiddleware\\KernelPreHandle->handle(Object(Symfony\\Component\\HttpFoundation\\Request), 1, true)\n#16 /var/customers/webs/freigeist/freigeist-dev/core/modules/page_cache/src/StackMiddleware/PageCache.php(78): Drupal\\page_cache\\StackMiddleware\\PageCache->pass(Object(Symfony\\Component\\HttpFoundation\\Request), 1, true)\n#17 /var/customers/webs/freigeist/freigeist-dev/core/lib/Drupal/Core/StackMiddleware/ReverseProxyMiddleware.php(47): Drupal\\page_cache\\StackMiddleware\\PageCache->handle(Object(Symfony\\Component\\HttpFoundation\\Request), 1, true)\n#18 /var/customers/webs/freigeist/freigeist-dev/core/lib/Drupal/Core/StackMiddleware/NegotiationMiddleware.php(50): Drupal\\Core\\StackMiddleware\\ReverseProxyMiddleware->handle(Object(Symfony\\Component\\HttpFoundation\\Request), 1, true)\n#19 /var/customers/webs/freigeist/freigeist-dev/vendor/stack/builder/src/Stack/StackedHttpKernel.php(23): Drupal\\Core\\StackMiddleware\\NegotiationMiddleware->handle(Object(Symfony\\Component\\HttpFoundation\\Request), 1, true)\n#20 /var/customers/webs/freigeist/freigeist-dev/core/lib/Drupal/Core/DrupalKernel.php(652): Stack\\StackedHttpKernel->handle(Object(Symfony\\Component\\HttpFoundation\\Request), 1, true)\n#21 /var/customers/webs/freigeist/freigeist-dev/index.php(19): Drupal\\Core\\DrupalKernel->handle(Object(Symfony\\Component\\HttpFoundation\\Request))\n#22 {main}, referer: https://www.freigeist-akademie.de/admin/structure/webform/manage/anmeldung/results/submissions
I cleared all caches with drush.
Comment | File | Size | Author |
---|---|---|---|
#12 | unable_to_display_this-2858766-12.patch | 1.23 KB | jrockowitz |
| |||
#10 | unable_to_display_this-2858766-10.patch | 1.25 KB | jrockowitz |
#6 | Auswahl_002.jpg | 43.61 KB | gunwald |
#6 | Auswahl_001.jpg | 39.44 KB | gunwald |
#5 | Screen Shot 2017-03-08 at 7.41.37 AM.png | 138.05 KB | jrockowitz |
Comments
Comment #2
gunwald CreditAttribution: gunwald commentedComment #3
jrockowitz CreditAttribution: jrockowitz as a volunteer and at The Big Blue House commentedThe error indicates that your Webform is not returning any elements.
Are you using configuration translation? What is the site's default language?
Is the default 'Contact' form still working? Do new forms still work?
Comment #4
gunwald CreditAttribution: gunwald commentedThe default contact form is the only one that works. All other don't, not even new forms. I tried to clear all results of the existing forms, but get still the same error. I tried to delete it's elements one by one, to see, if it has to do with a specific element, but even if there is no element in the form, it does not work.
The site has German, English and Italian installed, where German is the default language. But what do you exactly mean by »configuration translation«? The only translations I have, are the interface translations which are available on the module translations pages.
Thanks for the quick response!
Comment #5
jrockowitz CreditAttribution: jrockowitz as a volunteer and at The Big Blue House commentedWebform's are configuration entities which would be translated using the configuration translation module.
The default Contact form is 'English' and I think all your new forms are in 'German'.
Can you export the forms and look at the their langcodes and elements?
I am wondering if the broken form's langcode is 'en' or 'de'.
Comment #6
gunwald CreditAttribution: gunwald commentedThe Configuration Translation module isn't enabled. It turned out, that the default contact form is in German and all other in English (maybe I chose German during the install process, a regrettable decision).
Comment #7
jrockowitz CreditAttribution: jrockowitz as a volunteer and at The Big Blue House commentedThat information helps me a lot.
For now, does enabling the configuration translation module help.
Comment #8
gunwald CreditAttribution: gunwald commentedYes, it works again after I enabled the module. Thanks a lot for the great support!
Comment #9
jrockowitz CreditAttribution: jrockowitz as a volunteer and at The Big Blue House commentedHere are the steps required to duplicate this issue...
Comment #10
jrockowitz CreditAttribution: jrockowitz as a volunteer and at The Big Blue House commentedHopefully this patch solves the problem.
This should resolve the primary issue where a site is using a different language but does not need Webforms translated into multiple languages.
I am doubtful, I can fix sites that enable configuration translation, translate a few webforms, and then disable configuration translation. This scenario is just going to break the webforms.
Comment #12
jrockowitz CreditAttribution: jrockowitz as a volunteer and at The Big Blue House commentedComment #13
sokru CreditAttribution: sokru as a volunteer and at Druid commentedI have the same problem. I had same steps as in #9, but I enabled all Multilingual modules (as suggested in https://www.drupal.org/node/2697553). Tested patch in #12, but did not help. From logs
TypeError: Argument 2 passed to Drupal\webform\Utility\WebformElementHelper::merge() must be of the type array, null given, called in /var/www/drupal/web/modules/webform/includes/webform.translation.inc on line 63
Comment #14
sokru CreditAttribution: sokru as a volunteer and at Druid commentedComment #15
jrockowitz CreditAttribution: jrockowitz as a volunteer and at The Big Blue House commentedTo be able to fix this, I am going to need very specific steps on how to reproduce this issue using a default installation of Drupal and Webforms.
You should also review the langcode of the broken form.
Comment #16
sokru CreditAttribution: sokru as a volunteer and at Druid commentedLangcode of broken webform was originally EN, then later on FI.
I ended up fixing this by duplicating the broken form. Only difference in config export files is the UUID.
I will try to write more specific steps to reproduce this issue.
Comment #18
jrockowitz CreditAttribution: jrockowitz as a volunteer and at The Big Blue House commentedI committed the patch. Please download the latest dev release to review.