Problem/Motivation

After updating from 5.0.8 to 5.0.9, the following error appears:

Warning: Undefined array key "" in Drupal\charts\Plugin\views\style\ChartsPluginStyleChart->renderGrouping() (line 585 of modules/contrib/charts/src/Plugin/views/style/ChartsPluginStyleChart.php).

Steps to reproduce

Create or use an existing view with chart format and style using highcharts (probably same issue with other libraries), and no grouping field.

Proposed resolution

My current work around is to regress ChartsPluginStyleChart.php to the version 5.0.8

Issue fork charts-3412637

Command icon Show commands

Start within a Git clone of the project using the version control instructions.

Or, if you do not have SSH keys set up on git.drupalcode.org:

Comments

cdeces created an issue. See original summary.

nikathone made their first commit to this issue’s fork.

nikathone’s picture

Status: Active » Needs review

@cdeces can you give the MR a try? It should solve the issue. You might also need to re-save the view.

  • andileco committed eaae7d02 on 5.0.x authored by nikathone
    Issue #3412637 by nikathone: Error when grouping field is set to none
    
andileco’s picture

I've committed, as this patch does fix a couple bugs, but I would like to know if it fixes @cdeces's issue.

dcam’s picture

For the record, this solves the problem on our project at work. A new grouping field appeared in the display settings every time that they were saved. That led me here to this issue. I checked our logs and discovered that it was filled with the errors mentioned in the OP.

After updating to 5.0.10 the settings form works properly again with no duplicate field grouping elements and there are no more errors being logged.

andileco’s picture

Status: Needs review » Fixed

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.