As a user, when I go to the add new page at admin/structure/views/add and I choose chart from Display format dropdown of a views display, I am presented with the error "At least one data field must be selected in the chart configuration before this chart may be shown"
This forces the user to select any other format than chart and save and then select chart as the display format through the views UI.
The instructions in the read me file say
- Create a new view:
Visit admin/structure/views/add and select the display format of "Chart" for
your new page or block.
So IMO either one of two things needs to happen
1) We alter the help text
2) We fix this behavior in the module
Comment | File | Size | Author |
---|---|---|---|
#7 | View Page Output.png | 5.17 KB | maxilein |
#6 | Log Entries.png | 28.64 KB | maxilein |
#6 | Chart_Error_15.png | 61.82 KB | maxilein |
#6 | Start_19.png | 61.27 KB | maxilein |
Comments
Comment #2
sascher CreditAttribution: sascher as a volunteer commentedComment #3
TylerMarshall CreditAttribution: TylerMarshall at Acro Commerce commentedI am not sure if this is related or not, but would this be why the services file has a missing class for
charts.views_variable:
class: Drupal\charts\Services\ViewsDataService
Comment #4
andileco CreditAttribution: andileco at JSI Research & Training Institute, Inc. (JSI) commentedJust to clarify: what's happening is that the Chart Style Plugin validation looks for a field that would provide data for the chart...and since when you create a view you don't get to add fields until you click "Save and Add Fields", then you can't progress. The workaround is just to create an "Unformatted List" on the admin/structure/views/add; add the data field; and then switch to a chart format.
Postponing work on this for a sprint we're doing in DC, as we need some issues to actually work on!
Comment #5
andileco CreditAttribution: andileco at JSI Research & Training Institute, Inc. (JSI) commentedComment #6
maxilein CreditAttribution: maxilein commentedOk. I did as you said in the duplicate case (https://www.drupal.org/node/2890498#comment-12148623):
S. Screenshot Start_19.png
Then changed to Chart type. And I get the following situation: S.Screenshot Chart_Error.png
In the log I get the list of following errors: S. Screenshot Logs Entries.png
The first warning says:
"Theme hook charts_settings_fields not found."
location: /admin/structure/views/ajax/display/ds_vb_eval_polygram/page_1/style?_wrapper_format=drupal_ajax
The second log entry has the same location:
Warning: Invalid argument supplied for foreach() in Drupal\Core\Render\Element\Table::preRenderTable() (line 389 of /web/core/lib/Drupal/Core/Render/Element/Table.php) #0 /web/core/includes/bootstrap.inc(566): _drupal_error_handler_real(2, 'Invalid argumen...', '/web/c...', 389, Array) #1 /web/core/lib/Drupal/Core/Render/Element/Table.php(389): _drupal_error_handler(2, 'Invalid argumen...', '/web/c...', 389, Array) #2 [internal function]: Drupal\Core\Render\Element\Table::preRenderTable(Array) #3 /web/core/lib/Drupal/Core/Render/Renderer.php(376): call_user_func(Array, Array) #4 /web/core/lib/Drupal/Core/Render/Renderer.php(448): Drupal\Core\Render\Renderer->doRender(Array) #5 /web/core/lib/Drupal/Core/Render/Renderer.php(448): Drupal\Core\Render\Renderer->doRender(Array) #6 /web/core/lib/Drupal/Core/Render/Renderer.php(448): Drupal\Core\Render\Renderer->doRender(Array) #7 /web/core/lib/Drupal/Core/Render/Renderer.php(448): Drupal\Core\Render\Renderer->doRender(Array) #8 /web/core/lib/Drupal/Core/Render/Renderer.php(195): Drupal\Core\Render\Renderer->doRender(Array, true) #9 /web/core/lib/Drupal/Core/Render/Renderer.php(139): Drupal\Core\Render\Renderer->render(Array, true) #10 /web/core/lib/Drupal/Core/Render/Renderer.php(574): Drupal\Core\Render\Renderer->Drupal\Core\Render\{closure}() #11 /web/core/lib/Drupal/Core/Render/Renderer.php(140): Drupal\Core\Render\Renderer->executeInRenderContext(Object(Drupal\Core\Render\RenderContext), Object(Closure)) #12 /web/core/modules/views_ui/src/Form/Ajax/ViewsFormBase.php(221): Drupal\Core\Render\Renderer->renderRoot(Array) #13 /web/core/modules/views_ui/src/Form/Ajax/ViewsFormBase.php(147): Drupal\views_ui\Form\Ajax\ViewsFormBase->ajaxFormWrapper('Drupal\\views_ui...', Object(Drupal\Core\Form\FormState)) #14 /web/core/modules/views_ui/src/Form/Ajax/Display.php(44): Drupal\views_ui\Form\Ajax\ViewsFormBase->getForm(Object(Drupal\views_ui\ViewUI), 'page_1', 'ajax') #15 [internal function]: Drupal\views_ui\Form\Ajax\Display->getForm(Object(Drupal\views_ui\ViewUI), 'page_1', 'ajax', 'style') #16 /web/core/lib/Drupal/Core/EventSubscriber/EarlyRenderingControllerWrapperSubscriber.php(123): call_user_func_array(Array, Array) #17 /web/core/lib/Drupal/Core/Render/Renderer.php(574): Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->Drupal\Core\EventSubscriber\{closure}() #18 /web/core/lib/Drupal/Core/EventSubscriber/EarlyRenderingControllerWrapperSubscriber.php(124): Drupal\Core\Render\Renderer->executeInRenderContext(Object(Drupal\Core\Render\RenderContext), Object(Closure)) #19 /web/core/lib/Drupal/Core/EventSubscriber/EarlyRenderingControllerWrapperSubscriber.php(97): Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->wrapControllerExecutionInRenderContext(Array, Array) #20 [internal function]: Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->Drupal\Core\EventSubscriber\{closure}() #21 /web/vendor/symfony/http-kernel/HttpKernel.php(144): call_user_func_array(Object(Closure), Array) #22 /web/vendor/symfony/http-kernel/HttpKernel.php(64): Symfony\Component\HttpKernel\HttpKernel->handleRaw(Object(Symfony\Component\HttpFoundation\Request), 1) #23 /web/core/lib/Drupal/Core/StackMiddleware/Session.php(57): Symfony\Component\HttpKernel\HttpKernel->handle(Object(Symfony\Component\HttpFoundation\Request), 1, true) #24 /web/core/lib/Drupal/Core/StackMiddleware/KernelPreHandle.php(47): Drupal\Core\StackMiddleware\Session->handle(Object(Symfony\Component\HttpFoundation\Request), 1, true) #25 /web/core/modules/page_cache/src/StackMiddleware/PageCache.php(99): Drupal\Core\StackMiddleware\KernelPreHandle->handle(Object(Symfony\Component\HttpFoundation\Request), 1, true) #26 /web/core/modules/page_cache/src/StackMiddleware/PageCache.php(78): Drupal\page_cache\StackMiddleware\PageCache->pass(Object(Symfony\Component\HttpFoundation\Request), 1, true) #27 /web/core/lib/Drupal/Core/StackMiddleware/ReverseProxyMiddleware.php(47): Drupal\page_cache\StackMiddleware\PageCache->handle(Object(Symfony\Component\HttpFoundation\Request), 1, true) #28 /web/core/lib/Drupal/Core/StackMiddleware/NegotiationMiddleware.php(50): Drupal\Core\StackMiddleware\ReverseProxyMiddleware->handle(Object(Symfony\Component\HttpFoundation\Request), 1, true) #29 /web/vendor/stack/builder/src/Stack/StackedHttpKernel.php(23): Drupal\Core\StackMiddleware\NegotiationMiddleware->handle(Object(Symfony\Component\HttpFoundation\Request), 1, true) #30 /web/core/lib/Drupal/Core/DrupalKernel.php(656): Stack\StackedHttpKernel->handle(Object(Symfony\Component\HttpFoundation\Request), 1, true) #31 /web/index.php(19): Drupal\Core\DrupalKernel->handle(Object(Symfony\Component\HttpFoundation\Request)) #32 {main}.
The third log entry (same location) up to the 9th log entry are on the same line:
Warning: Invalid argument supplied for foreach() in Drupal\charts\Plugin\views\style\ChartsPluginStyleChart->validate() (line 95 of /web/modules/charts/src/Plugin/views/style/ChartsPluginStyleChart.php) #0 /web/core/includes/bootstrap.inc(566): _drupal_error_handler_real(2, 'Invalid argumen...', '/web/m...', 95, Array) #1 /web/modules/charts/src/Plugin/views/style/ChartsPluginStyleChart.php(95): _drupal_error_handler(2, 'Invalid argumen...', '/web/m...', 95, Array) #2 /web/core/modules/views/src/Plugin/views/display/DisplayPluginBase.php(2427): Drupal\charts\Plugin\views\style\ChartsPluginStyleChart->validate() #3 /web/core/modules/views/src/ViewExecutable.php(2098): Drupal\views\Plugin\views\display\DisplayPluginBase->validate() #4 /web/core/modules/views_ui/src/ViewFormBase.php(125): Drupal\views\ViewExecutable->validate() #5 /web/core/modules/views_ui/src/ViewEditForm.php(743): Drupal\views_ui\ViewFormBase->getDisplayTabs(Object(Drupal\views_ui\ViewUI)) #6 /web/core/modules/views_ui/src/ViewEditForm.php(674): Drupal\views_ui\ViewEditForm->renderDisplayTop(Object(Drupal\views_ui\ViewUI)) #7 /web/core/modules/views_ui/src/Form/Ajax/ViewsFormBase.php(166): Drupal\views_ui\ViewEditForm->rebuildCurrentTab(Object(Drupal\views_ui\ViewUI), Object(Drupal\Core\Ajax\AjaxResponse), 'page_1') #8 /web/core/modules/views_ui/src/Form/Ajax/Display.php(44): Drupal\views_ui\Form\Ajax\ViewsFormBase->getForm(Object(Drupal\views_ui\ViewUI), 'page_1', 'ajax') #9 [internal function]: Drupal\views_ui\Form\Ajax\Display->getForm(Object(Drupal\views_ui\ViewUI), 'page_1', 'ajax', 'style') #10 /web/core/lib/Drupal/Core/EventSubscriber/EarlyRenderingControllerWrapperSubscriber.php(123): call_user_func_array(Array, Array) #11 /web/core/lib/Drupal/Core/Render/Renderer.php(574): Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->Drupal\Core\EventSubscriber\{closure}() #12 /web/core/lib/Drupal/Core/EventSubscriber/EarlyRenderingControllerWrapperSubscriber.php(124): Drupal\Core\Render\Renderer->executeInRenderContext(Object(Drupal\Core\Render\RenderContext), Object(Closure)) #13 /web/core/lib/Drupal/Core/EventSubscriber/EarlyRenderingControllerWrapperSubscriber.php(97): Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->wrapControllerExecutionInRenderContext(Array, Array) #14 [internal function]: Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->Drupal\Core\EventSubscriber\{closure}() #15 /web/vendor/symfony/http-kernel/HttpKernel.php(144): call_user_func_array(Object(Closure), Array) #16 /web/vendor/symfony/http-kernel/HttpKernel.php(64): Symfony\Component\HttpKernel\HttpKernel->handleRaw(Object(Symfony\Component\HttpFoundation\Request), 1) #17 /web/core/lib/Drupal/Core/StackMiddleware/Session.php(57): Symfony\Component\HttpKernel\HttpKernel->handle(Object(Symfony\Component\HttpFoundation\Request), 1, true) #18 /web/core/lib/Drupal/Core/StackMiddleware/KernelPreHandle.php(47): Drupal\Core\StackMiddleware\Session->handle(Object(Symfony\Component\HttpFoundation\Request), 1, true) #19 /web/core/modules/page_cache/src/StackMiddleware/PageCache.php(99): Drupal\Core\StackMiddleware\KernelPreHandle->handle(Object(Symfony\Component\HttpFoundation\Request), 1, true) #20 /web/core/modules/page_cache/src/StackMiddleware/PageCache.php(78): Drupal\page_cache\StackMiddleware\PageCache->pass(Object(Symfony\Component\HttpFoundation\Request), 1, true) #21 /web/core/lib/Drupal/Core/StackMiddleware/ReverseProxyMiddleware.php(47): Drupal\page_cache\StackMiddleware\PageCache->handle(Object(Symfony\Component\HttpFoundation\Request), 1, true) #22 /web/core/lib/Drupal/Core/StackMiddleware/NegotiationMiddleware.php(50): Drupal\Core\StackMiddleware\ReverseProxyMiddleware->handle(Object(Symfony\Component\HttpFoundation\Request), 1, true) #23 /web/vendor/stack/builder/src/Stack/StackedHttpKernel.php(23): Drupal\Core\StackMiddleware\NegotiationMiddleware->handle(Object(Symfony\Component\HttpFoundation\Request), 1, true) #24 /web/core/lib/Drupal/Core/DrupalKernel.php(656): Stack\StackedHttpKernel->handle(Object(Symfony\Component\HttpFoundation\Request), 1, true) #25 /web/index.php(19): Drupal\Core\DrupalKernel->handle(Object(Symfony\Component\HttpFoundation\Request)) #26 {main}.
The theme warning is the same again and then there are the two notices which have been reported in other issues already:
These two always appear when I make changes to the view.
Notice: Undefined offset: 0 in Drupal\charts_google\Charts\GoogleChartsRender->charts_google_create_charts_options() (line 69 of /web/modules/charts/modules/charts_google/src/Charts/GoogleChartsRender.php) #0 /web/core/includes/bootstrap.inc(566): _drupal_error_handler_real(8, 'Undefined offse...', '/web/m...', 69, Array) #1 /web/modules/charts/modules/charts_google/src/Charts/GoogleChartsRender.php(69): _drupal_error_handler(8, 'Undefined offse...', '/web/m...', 69, Array) #2 /web/modules/charts/modules/charts_google/src/Charts/GoogleChartsRender.php(45): Drupal\charts_google\Charts\GoogleChartsRender->charts_google_create_charts_options(Array, Array, Array) #3 /web/modules/charts/src/Charts/ModuleSelector.php(37): Drupal\charts_google\Charts\GoogleChartsRender->charts_render_charts(Array, Array, Array, Array, Array, 'ds_vb_eval_poly...') #4 /web/modules/charts/src/Charts/ModuleSelector.php(29): Drupal\charts\Charts\ModuleSelector->moduleExists('google', Array) #5 /web/modules/charts/charts.module(92): Drupal\charts\Charts\ModuleSelector->__construct('google', Array, Array, Array, Array, Array, 'ds_vb_eval_poly...') #6 /web/core/lib/Drupal/Core/Theme/ThemeManager.php(287): template_preprocess_views_view_charts(Array, 'views_view_char...', Array) #7 /web/core/lib/Drupal/Core/Render/Renderer.php(435): Drupal\Core\Theme\ThemeManager->render('views_view_char...', Array) #8 /web/core/lib/Drupal/Core/Render/Renderer.php(195): Drupal\Core\Render\Renderer->doRender(Array, false) #9 /web/core/lib/Drupal/Core/Template/TwigExtension.php(490): Drupal\Core\Render\Renderer->render(Array) #10 /web/sites/default/files/php/twig/594d2a84334c5_views-ui-view-preview-sec_nt2AwRksug_gAjZb0RIz2hht4/fn4Ys9NedrF796cml9yYW7F9dyPeoGrP1GV4a_TPu88.php(57): Drupal\Core\Template\TwigExtension->escapeFilter(Object(Drupal\Core\Template\TwigEnvironment), Array, 'html', NULL, true) #11 /web/vendor/twig/twig/lib/Twig/Template.php(432): __TwigTemplate_87ec8a3537e0d9eec5ad2e405775c1a8e1232cf178ce00f702f3017ec270e7bd->doDisplay(Array, Array) #12 /web/vendor/twig/twig/lib/Twig/Template.php(403): Twig_Template->displayWithErrorHandling(Array, Array) #13 /web/vendor/twig/twig/lib/Twig/Template.php(411): Twig_Template->display(Array) #14 /web/core/themes/engines/twig/twig.engine(64): Twig_Template->render(Array) #15 /web/core/lib/Drupal/Core/Theme/ThemeManager.php(384): twig_render_template('core/themes/sta...', Array) #16 /web/core/lib/Drupal/Core/Render/Renderer.php(435): Drupal\Core\Theme\ThemeManager->render('views_ui_view_p...', Array) #17 /web/core/lib/Drupal/Core/Render/Renderer.php(195): Drupal\Core\Render\Renderer->doRender(Array, false) #18 /web/core/lib/Drupal/Core/Template/TwigExtension.php(490): Drupal\Core\Render\Renderer->render(Array) #19 /web/sites/default/files/php/twig/594d2a84334c5_views-view.html.twig_My8wCKNyJv0eBmdCJ1uPxYt8x/y5Pda4saoL2ohtnoPM-lJ31o9JymLGlVACmoB2utwaA.php(114): Drupal\Core\Template\TwigExtension->escapeFilter(Object(Drupal\Core\Template\TwigEnvironment), Array, 'html', NULL, true) #20 /web/vendor/twig/twig/lib/Twig/Template.php(432): __TwigTemplate_0b39505df84b691c5a3640573ee0790767231d2654971965753660bef51abd95->doDisplay(Array, Array) #21 /web/vendor/twig/twig/lib/Twig/Template.php(403): Twig_Template->displayWithErrorHandling(Array, Array) #22 /web/vendor/twig/twig/lib/Twig/Template.php(411): Twig_Template->display(Array) #23 /web/core/themes/engines/twig/twig.engine(64): Twig_Template->render(Array) #24 /web/core/lib/Drupal/Core/Theme/ThemeManager.php(384): twig_render_template('core/themes/cla...', Array) #25 /web/core/lib/Drupal/Core/Render/Renderer.php(435): Drupal\Core\Theme\ThemeManager->render('views_view', Array) #26 /web/core/lib/Drupal/Core/Render/Renderer.php(448): Drupal\Core\Render\Renderer->doRender(Array) #27 /web/core/lib/Drupal/Core/Render/Renderer.php(448): Drupal\Core\Render\Renderer->doRender(Array) #28 /web/core/lib/Drupal/Core/Render/Renderer.php(448): Drupal\Core\Render\Renderer->doRender(Array) #29 /web/core/lib/Drupal/Core/Render/Renderer.php(195): Drupal\Core\Render\Renderer->doRender(Array, true) #30 /web/core/lib/Drupal/Core/Render/Renderer.php(139): Drupal\Core\Render\Renderer->render(Array, true) #31 /web/core/lib/Drupal/Core/Render/Renderer.php(574): Drupal\Core\Render\Renderer->Drupal\Core\Render\{closure}() #32 /web/core/lib/Drupal/Core/Render/Renderer.php(140): Drupal\Core\Render\Renderer->executeInRenderContext(Object(Drupal\Core\Render\RenderContext), Object(Closure)) #33 /web/core/includes/common.inc(858): Drupal\Core\Render\Renderer->renderRoot(Array) #34 /web/core/lib/Drupal/Core/Render/MainContent/AjaxRenderer.php(83): drupal_render_root(Array) #35 /web/core/lib/Drupal/Core/Render/MainContent/AjaxRenderer.php(62): Drupal\Core\Render\MainContent\AjaxRenderer->drupalRenderRoot(Array) #36 /web/core/lib/Drupal/Core/EventSubscriber/MainContentViewSubscriber.php(90): Drupal\Core\Render\MainContent\AjaxRenderer->renderResponse(Array, Object(Symfony\Component\HttpFoundation\Request), Object(Drupal\Core\Routing\CurrentRouteMatch)) #37 /web/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)) #38 /web/vendor/symfony/http-kernel/HttpKernel.php(149): Drupal\Component\EventDispatcher\ContainerAwareEventDispatcher->dispatch('kernel.view', Object(Symfony\Component\HttpKernel\Event\GetResponseForControllerResultEvent)) #39 /web/vendor/symfony/http-kernel/HttpKernel.php(64): Symfony\Component\HttpKernel\HttpKernel->handleRaw(Object(Symfony\Component\HttpFoundation\Request), 1) #40 /web/core/lib/Drupal/Core/StackMiddleware/Session.php(57): Symfony\Component\HttpKernel\HttpKernel->handle(Object(Symfony\Component\HttpFoundation\Request), 1, true) #41 /web/core/lib/Drupal/Core/StackMiddleware/KernelPreHandle.php(47): Drupal\Core\StackMiddleware\Session->handle(Object(Symfony\Component\HttpFoundation\Request), 1, true) #42 /web/core/modules/page_cache/src/StackMiddleware/PageCache.php(99): Drupal\Core\StackMiddleware\KernelPreHandle->handle(Object(Symfony\Component\HttpFoundation\Request), 1, true) #43 /web/core/modules/page_cache/src/StackMiddleware/PageCache.php(78): Drupal\page_cache\StackMiddleware\PageCache->pass(Object(Symfony\Component\HttpFoundation\Request), 1, true) #44 /web/core/lib/Drupal/Core/StackMiddleware/ReverseProxyMiddleware.php(47): Drupal\page_cache\StackMiddleware\PageCache->handle(Object(Symfony\Component\HttpFoundation\Request), 1, true) #45 /web/core/lib/Drupal/Core/StackMiddleware/NegotiationMiddleware.php(50): Drupal\Core\StackMiddleware\ReverseProxyMiddleware->handle(Object(Symfony\Component\HttpFoundation\Request), 1, true) #46 /web/vendor/stack/builder/src/Stack/StackedHttpKernel.php(23): Drupal\Core\StackMiddleware\NegotiationMiddleware->handle(Object(Symfony\Component\HttpFoundation\Request), 1, true) #47 /web/core/lib/Drupal/Core/DrupalKernel.php(656): Stack\StackedHttpKernel->handle(Object(Symfony\Component\HttpFoundation\Request), 1, true) #48 /web/index.php(19): Drupal\Core\DrupalKernel->handle(Object(Symfony\Component\HttpFoundation\Request)) #49 {main}.
Severity Notice
Notice: Undefined offset: 0 in Drupal\charts_google\Charts\GoogleChartsRender->charts_google_create_charts_options() (line 70 of /web/modules/charts/modules/charts_google/src/Charts/GoogleChartsRender.php) #0 /web/core/includes/bootstrap.inc(566): _drupal_error_handler_real(8, 'Undefined offse...', '/web/m...', 70, Array) #1 /web/modules/charts/modules/charts_google/src/Charts/GoogleChartsRender.php(70): _drupal_error_handler(8, 'Undefined offse...', '/web/m...', 70, Array) #2 /web/modules/charts/modules/charts_google/src/Charts/GoogleChartsRender.php(45): Drupal\charts_google\Charts\GoogleChartsRender->charts_google_create_charts_options(Array, Array, Array) #3 /web/modules/charts/src/Charts/ModuleSelector.php(37): Drupal\charts_google\Charts\GoogleChartsRender->charts_render_charts(Array, Array, Array, Array, Array, 'ds_vb_eval_poly...') #4 /web/modules/charts/src/Charts/ModuleSelector.php(29): Drupal\charts\Charts\ModuleSelector->moduleExists('google', Array) #5 /web/modules/charts/charts.module(92): Drupal\charts\Charts\ModuleSelector->__construct('google', Array, Array, Array, Array, Array, 'ds_vb_eval_poly...') #6 /web/core/lib/Drupal/Core/Theme/ThemeManager.php(287): template_preprocess_views_view_charts(Array, 'views_view_char...', Array) #7 /web/core/lib/Drupal/Core/Render/Renderer.php(435): Drupal\Core\Theme\ThemeManager->render('views_view_char...', Array) #8 /web/core/lib/Drupal/Core/Render/Renderer.php(195): Drupal\Core\Render\Renderer->doRender(Array, false) #9 /web/core/lib/Drupal/Core/Template/TwigExtension.php(490): Drupal\Core\Render\Renderer->render(Array) #10 /web/sites/default/files/php/twig/594d2a84334c5_views-ui-view-preview-sec_nt2AwRksug_gAjZb0RIz2hht4/fn4Ys9NedrF796cml9yYW7F9dyPeoGrP1GV4a_TPu88.php(57): Drupal\Core\Template\TwigExtension->escapeFilter(Object(Drupal\Core\Template\TwigEnvironment), Array, 'html', NULL, true) #11 /web/vendor/twig/twig/lib/Twig/Template.php(432): __TwigTemplate_87ec8a3537e0d9eec5ad2e405775c1a8e1232cf178ce00f702f3017ec270e7bd->doDisplay(Array, Array) #12 /web/vendor/twig/twig/lib/Twig/Template.php(403): Twig_Template->displayWithErrorHandling(Array, Array) #13 /web/vendor/twig/twig/lib/Twig/Template.php(411): Twig_Template->display(Array) #14 /web/core/themes/engines/twig/twig.engine(64): Twig_Template->render(Array) #15 /web/core/lib/Drupal/Core/Theme/ThemeManager.php(384): twig_render_template('core/themes/sta...', Array) #16 /web/core/lib/Drupal/Core/Render/Renderer.php(435): Drupal\Core\Theme\ThemeManager->render('views_ui_view_p...', Array) #17 /web/core/lib/Drupal/Core/Render/Renderer.php(195): Drupal\Core\Render\Renderer->doRender(Array, false) #18 /web/core/lib/Drupal/Core/Template/TwigExtension.php(490): Drupal\Core\Render\Renderer->render(Array) #19 /web/sites/default/files/php/twig/594d2a84334c5_views-view.html.twig_My8wCKNyJv0eBmdCJ1uPxYt8x/y5Pda4saoL2ohtnoPM-lJ31o9JymLGlVACmoB2utwaA.php(114): Drupal\Core\Template\TwigExtension->escapeFilter(Object(Drupal\Core\Template\TwigEnvironment), Array, 'html', NULL, true) #20 /web/vendor/twig/twig/lib/Twig/Template.php(432): __TwigTemplate_0b39505df84b691c5a3640573ee0790767231d2654971965753660bef51abd95->doDisplay(Array, Array) #21 /web/vendor/twig/twig/lib/Twig/Template.php(403): Twig_Template->displayWithErrorHandling(Array, Array) #22 /web/vendor/twig/twig/lib/Twig/Template.php(411): Twig_Template->display(Array) #23 /web/core/themes/engines/twig/twig.engine(64): Twig_Template->render(Array) #24 /web/core/lib/Drupal/Core/Theme/ThemeManager.php(384): twig_render_template('core/themes/cla...', Array) #25 /web/core/lib/Drupal/Core/Render/Renderer.php(435): Drupal\Core\Theme\ThemeManager->render('views_view', Array) #26 /web/core/lib/Drupal/Core/Render/Renderer.php(448): Drupal\Core\Render\Renderer->doRender(Array) #27 /web/core/lib/Drupal/Core/Render/Renderer.php(448): Drupal\Core\Render\Renderer->doRender(Array) #28 /web/core/lib/Drupal/Core/Render/Renderer.php(448): Drupal\Core\Render\Renderer->doRender(Array) #29 /web/core/lib/Drupal/Core/Render/Renderer.php(195): Drupal\Core\Render\Renderer->doRender(Array, true) #30 /web/core/lib/Drupal/Core/Render/Renderer.php(139): Drupal\Core\Render\Renderer->render(Array, true) #31 /web/core/lib/Drupal/Core/Render/Renderer.php(574): Drupal\Core\Render\Renderer->Drupal\Core\Render\{closure}() #32 /web/core/lib/Drupal/Core/Render/Renderer.php(140): Drupal\Core\Render\Renderer->executeInRenderContext(Object(Drupal\Core\Render\RenderContext), Object(Closure)) #33 /web/core/includes/common.inc(858): Drupal\Core\Render\Renderer->renderRoot(Array) #34 /web/core/lib/Drupal/Core/Render/MainContent/AjaxRenderer.php(83): drupal_render_root(Array) #35 /web/core/lib/Drupal/Core/Render/MainContent/AjaxRenderer.php(62): Drupal\Core\Render\MainContent\AjaxRenderer->drupalRenderRoot(Array) #36 /web/core/lib/Drupal/Core/EventSubscriber/MainContentViewSubscriber.php(90): Drupal\Core\Render\MainContent\AjaxRenderer->renderResponse(Array, Object(Symfony\Component\HttpFoundation\Request), Object(Drupal\Core\Routing\CurrentRouteMatch)) #37 /web/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)) #38 /web/vendor/symfony/http-kernel/HttpKernel.php(149): Drupal\Component\EventDispatcher\ContainerAwareEventDispatcher->dispatch('kernel.view', Object(Symfony\Component\HttpKernel\Event\GetResponseForControllerResultEvent)) #39 /web/vendor/symfony/http-kernel/HttpKernel.php(64): Symfony\Component\HttpKernel\HttpKernel->handleRaw(Object(Symfony\Component\HttpFoundation\Request), 1) #40 /web/core/lib/Drupal/Core/StackMiddleware/Session.php(57): Symfony\Component\HttpKernel\HttpKernel->handle(Object(Symfony\Component\HttpFoundation\Request), 1, true) #41 /web/core/lib/Drupal/Core/StackMiddleware/KernelPreHandle.php(47): Drupal\Core\StackMiddleware\Session->handle(Object(Symfony\Component\HttpFoundation\Request), 1, true) #42 /web/core/modules/page_cache/src/StackMiddleware/PageCache.php(99): Drupal\Core\StackMiddleware\KernelPreHandle->handle(Object(Symfony\Component\HttpFoundation\Request), 1, true) #43 /web/core/modules/page_cache/src/StackMiddleware/PageCache.php(78): Drupal\page_cache\StackMiddleware\PageCache->pass(Object(Symfony\Component\HttpFoundation\Request), 1, true) #44 /web/core/lib/Drupal/Core/StackMiddleware/ReverseProxyMiddleware.php(47): Drupal\page_cache\StackMiddleware\PageCache->handle(Object(Symfony\Component\HttpFoundation\Request), 1, true) #45 /web/core/lib/Drupal/Core/StackMiddleware/NegotiationMiddleware.php(50): Drupal\Core\StackMiddleware\ReverseProxyMiddleware->handle(Object(Symfony\Component\HttpFoundation\Request), 1, true) #46 /web/vendor/stack/builder/src/Stack/StackedHttpKernel.php(23): Drupal\Core\StackMiddleware\NegotiationMiddleware->handle(Object(Symfony\Component\HttpFoundation\Request), 1, true) #47 /web/core/lib/Drupal/Core/DrupalKernel.php(656): Stack\StackedHttpKernel->handle(Object(Symfony\Component\HttpFoundation\Request), 1, true) #48 /web/index.php(19): Drupal\Core\DrupalKernel->handle(Object(Symfony\Component\HttpFoundation\Request)) #49 {main}.
Comment #7
maxilein CreditAttribution: maxilein commentedThe output of the views page shows the error message and an empty page:
"Charting libraries for charts_google might not be installed. Run 'composer install' for charts_google sub-module." S. View Page Output.
I am using D 8.3.4 the latest dev version of charts.
Once calling the page there is another log entry:
Warning: file_get_contents(modules/charts/modules/charts_google/vendor/google/loader.js): failed to open stream: No such file or directory in Drupal\Core\Asset\JsOptimizer->optimize() (line 25 of /web/core/lib/Drupal/Core/Asset/JsOptimizer.php) #0 /web/core/includes/bootstrap.inc(566): _drupal_error_handler_real(2, 'file_get_conten...', '/web/c...', 25, Array) #1 [internal function]: _drupal_error_handler(2, 'file_get_conten...', '/web/c...', 25, Array) #2 /web/core/lib/Drupal/Core/Asset/JsOptimizer.php(25): file_get_contents('modules/charts/...') #3 /web/core/lib/Drupal/Core/Asset/JsCollectionOptimizer.php(116): Drupal\Core\Asset\JsOptimizer->optimize(Array) #4 /web/core/lib/Drupal/Core/Asset/AssetResolver.php(297): Drupal\Core\Asset\JsCollectionOptimizer->optimize(Array) #5 /web/core/lib/Drupal/Core/Render/HtmlResponseAttachmentsProcessor.php(298): Drupal\Core\Asset\AssetResolver->getJsAssets(Object(Drupal\Core\Asset\AttachedAssets), true) #6 /web/core/lib/Drupal/Core/Render/HtmlResponseAttachmentsProcessor.php(161): Drupal\Core\Render\HtmlResponseAttachmentsProcessor->processAssetLibraries(Object(Drupal\Core\Asset\AttachedAssets), Array) #7 /web/core/lib/Drupal/Core/EventSubscriber/HtmlResponseSubscriber.php(45): Drupal\Core\Render\HtmlResponseAttachmentsProcessor->processAttachments(Object(Drupal\Core\Render\HtmlResponse)) #8 /web/core/lib/Drupal/Component/EventDispatcher/ContainerAwareEventDispatcher.php(111): Drupal\Core\EventSubscriber\HtmlResponseSubscriber->onRespond(Object(Symfony\Component\HttpKernel\Event\FilterResponseEvent), 'kernel.response', Object(Drupal\Component\EventDispatcher\ContainerAwareEventDispatcher)) #9 /web/vendor/symfony/http-kernel/HttpKernel.php(184): Drupal\Component\EventDispatcher\ContainerAwareEventDispatcher->dispatch('kernel.response', Object(Symfony\Component\HttpKernel\Event\FilterResponseEvent)) #10 /web/vendor/symfony/http-kernel/HttpKernel.php(166): Symfony\Component\HttpKernel\HttpKernel->filterResponse(Object(Drupal\Core\Render\HtmlResponse), Object(Symfony\Component\HttpFoundation\Request), 1) #11 /web/vendor/symfony/http-kernel/HttpKernel.php(64): Symfony\Component\HttpKernel\HttpKernel->handleRaw(Object(Symfony\Component\HttpFoundation\Request), 1) #12 /web/core/lib/Drupal/Core/StackMiddleware/Session.php(57): Symfony\Component\HttpKernel\HttpKernel->handle(Object(Symfony\Component\HttpFoundation\Request), 1, true) #13 /web/core/lib/Drupal/Core/StackMiddleware/KernelPreHandle.php(47): Drupal\Core\StackMiddleware\Session->handle(Object(Symfony\Component\HttpFoundation\Request), 1, true) #14 /web/core/modules/page_cache/src/StackMiddleware/PageCache.php(99): Drupal\Core\StackMiddleware\KernelPreHandle->handle(Object(Symfony\Component\HttpFoundation\Request), 1, true) #15 /web/core/modules/page_cache/src/StackMiddleware/PageCache.php(78): Drupal\page_cache\StackMiddleware\PageCache->pass(Object(Symfony\Component\HttpFoundation\Request), 1, true) #16 /web/core/lib/Drupal/Core/StackMiddleware/ReverseProxyMiddleware.php(47): Drupal\page_cache\StackMiddleware\PageCache->handle(Object(Symfony\Component\HttpFoundation\Request), 1, true) #17 /web/core/lib/Drupal/Core/StackMiddleware/NegotiationMiddleware.php(50): Drupal\Core\StackMiddleware\ReverseProxyMiddleware->handle(Object(Symfony\Component\HttpFoundation\Request), 1, true) #18 /web/vendor/stack/builder/src/Stack/StackedHttpKernel.php(23): Drupal\Core\StackMiddleware\NegotiationMiddleware->handle(Object(Symfony\Component\HttpFoundation\Request), 1, true) #19 /web/core/lib/Drupal/Core/DrupalKernel.php(656): Stack\StackedHttpKernel->handle(Object(Symfony\Component\HttpFoundation\Request), 1, true) #20 /web/index.php(19): Drupal\Core\DrupalKernel->handle(Object(Symfony\Component\HttpFoundation\Request)) #21 {main}.
Comment #8
maxilein CreditAttribution: maxilein commentedThere is a path problem:
modules/charts/modules/charts_google/vendor/google/
Vendor/google does not exist. There is only /js and /src there...
Comment #9
andileco CreditAttribution: andileco at JSI Research & Training Institute, Inc. (JSI) commented@maxilein, this is all expected behavior, and it should work for you once the libraries are added (as part of the license, we can't include them in the module code itself). If you have command line access and are using composer, go to the directory of the charts_google module (for example, cd modules/contrib/charts/modules/charts_google) and run composer install. If you are not using composer, you can see which files need to be created and what their paths should be inside the ..charts_google/composer.json file. That means you will need to create the vendor directory manually and add the js files manually. Eventually, I'm planning on using the libraries API, but it's not stable yet.
Comment #10
maxilein CreditAttribution: maxilein commentedHi,
thanks for the help!
It was the Getting started guide which mislead me... it said:
I have added the instruction to the installation of https://www.drupal.org/docs/8/modules/charts/getting-started
Comment #11
maxilein CreditAttribution: maxilein commentedComment #12
gabrielu CreditAttribution: gabrielu at AG Prime commentedI just tested version 8.x-3.x and 8.x-3.0-alpha5 and could not get a view working.
src/Plugin/views/style/ChartsPluginStyleChart.php:91
$dataFields is NULL then nothing else works. the foreach() below will crash.
Comment #13
andileco CreditAttribution: andileco at JSI Research & Training Institute, Inc. (JSI) commentedThanks, @gabrielu. I think the workaround was documentation...unless you have ideas about how to address.
Comment #14
dbjpanda CreditAttribution: dbjpanda commentedReopening the issue. I am facing the same though I have followed instructions from #4 and #9.
Comment #15
andileco CreditAttribution: andileco at JSI Research & Training Institute, Inc. (JSI) commented@dbjpanda - can you tell me what errors (if any) you are seeing?
Comment #16
kharbat CreditAttribution: kharbat commentedRun
composer install
inside the module directory => charts/modules/charts_google/I had the same error "Charting libraries for charts_google might not be installed. Run 'composer install' for charts_google sub-module." and this fixed it.
Comment #17
andileco CreditAttribution: andileco at JSI Research & Training Institute, Inc. (JSI) commentedThanks, @Ahmad Kharbat. Please note that for the current -dev, this is no longer the case. For the latest -dev, there are very specific instructions in the the readme file for each of the charting sub-modules.
Comment #18
andrezstar CreditAttribution: andrezstar commentedDidnt work for me #16
EDIT: by following this: https://www.ostraining.com/blog/drupal/create-charts-with-views/
composer require drupal/charts + composer install @ dir
But I have no composer.json in the \modules\contrib\charts\modules\charts_google folder
so composer install is doin nothing
Im using the latest version charts 8.x-3.0-alpha8 (the composer.json aint there)!!!
Comment #19
andileco CreditAttribution: andileco commentedThat's outdated documentation. Please follow the README inside the charts_google module folder.
Comment #20
andileco CreditAttribution: andileco commentedComment #22
andileco CreditAttribution: andileco at JSI Research & Training Institute, Inc. (JSI) commentedEnclosing the validation in if (\Drupal::routeMatch()->getRouteName() != 'views_ui.add') {} fixes this issue.
Comment #23
andileco CreditAttribution: andileco at JSI Research & Training Institute, Inc. (JSI) commented