Fix issues with AJAX handlers on dashboard widgets. Replaces #4132
This commit is contained in:
parent
a97a17c4c3
commit
bbf398133e
|
|
@ -15,6 +15,14 @@ class ReportWidgetBase extends WidgetBase
|
|||
{
|
||||
$this->properties = $this->validateProperties($properties);
|
||||
|
||||
/*
|
||||
* Ensure the provided alias (if present) takes effect as the widget configuration is
|
||||
* not passed to the WidgetBase constructor which would normally take care of that
|
||||
*/
|
||||
if (!isset($this->alias)) {
|
||||
$this->alias = $properties['alias'] ?? $this->defaultAlias;
|
||||
}
|
||||
|
||||
parent::__construct($controller);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -236,6 +236,9 @@ class ReportContainer extends WidgetBase
|
|||
}
|
||||
while (array_key_exists($alias, $widgets));
|
||||
|
||||
// Ensure that the widget's alias is correctly set for this request
|
||||
$widget->alias = $alias;
|
||||
|
||||
$sortOrder = 0;
|
||||
foreach ($widgets as $widgetInfo) {
|
||||
$sortOrder = max($sortOrder, $widgetInfo['sortOrder']);
|
||||
|
|
|
|||
Loading…
Reference in New Issue