- πΊπΈUnited States smustgrave
Wonder if this can be retested on the latest version?
How to reproduce:
- attach Plotly.js Graph field to any entity that is being later attached to a node (e.g. Paragraphs)
- open node form, click "Add Additional Series"
Result: nothing happens, Ajax request fails on following error:
Argument 1 passed to Drupal\Core\Renderer\MainContent\AjaxRenderer::renderResponse() must be of the type array, null given, called in /docroot/core/lib/Drupal/core/Form/FormAjaxResponseBuilder.php on line 89
Taking a quick look into the code, it looks like the problem is in PlotlyJsGraphWidget.php::addSeriesCallback() , which returns $form[$this->fieldName] array. However, on subforms, this array does not exist, the field is stored in $form['field_name_of_parent_field']['widget'][$parent_field_delta]['subform'][$this->fieldName]
In addition, calling the callback that way also triggers a form validator on adding, which has an additional negative side effect - the form validation errors will prevent adding the series as well, if any validation fails (e.g. mandatory field is empty). So not sure if this is an appropriate way of triggering this.
Postponed: needs info
1.4
Code
Not all content is available!
It's likely this issue predates Contrib.social: some issue and comment data are missing.
Wonder if this can be retested on the latest version?