diff --git a/application/dashboard.class.inc.php b/application/dashboard.class.inc.php index 6a748fc06..7bece1104 100644 --- a/application/dashboard.class.inc.php +++ b/application/dashboard.class.inc.php @@ -183,9 +183,11 @@ abstract class Dashboard $aGridDashlet['width'] = intval($oPosDashletNode->GetChildText('width', '2')); $aGridDashlet['height'] = intval($oPosDashletNode->GetChildText('height', '1')); $oDashletNode = $oPosDashletNode->GetUniqueElement('dashlet'); - $aGridDashlet['dashlet'] = $this->InitDashletFromDOMNode($oDashletNode); $sId = $oPosDashletNode->getAttribute('id'); - $this->aGridDashlets[$sId] = $aGridDashlet; + $oDashlet = $this->InitDashletFromDOMNode($oDashletNode); + $oDashlet->SetID($sId); + $aGridDashlet['dashlet'] = $oDashlet; + $this->aGridDashlets[] = $aGridDashlet; } } diff --git a/application/dashlet.class.inc.php b/application/dashlet.class.inc.php index a0fdf85ce..577030cef 100644 --- a/application/dashlet.class.inc.php +++ b/application/dashlet.class.inc.php @@ -1093,10 +1093,10 @@ abstract class DashletGroupBy extends Dashlet $sGroupBy = $this->aProperties['group_by']; $this->sAggregationFunction = $this->aProperties['aggregation_function']; - $this->sAggregationAttribute = $this->aProperties['aggregation_attribute']; + $this->sAggregationAttribute = $this->aProperties['aggregation_attribute'] ?? ''; - $this->sLimit = $this->aProperties['limit']; - $this->sOrderBy = $this->aProperties['order_by']; + $this->sLimit = $this->aProperties['limit'] ?? 0; + $this->sOrderBy = $this->aProperties['order_by'] ?? null; if (empty($this->sOrderBy)) { if ($this->aProperties['style'] == 'pie') { $this->sOrderBy = 'function'; diff --git a/sources/Application/Dashboard/Layout/DashboardLayoutGrid.php b/sources/Application/Dashboard/Layout/DashboardLayoutGrid.php index 65b08b5b8..ada459c8a 100644 --- a/sources/Application/Dashboard/Layout/DashboardLayoutGrid.php +++ b/sources/Application/Dashboard/Layout/DashboardLayoutGrid.php @@ -18,11 +18,11 @@ class DashboardLayoutGrid extends \DashboardLayout $oDashboardGrid = new DashboardGrid(); $oDashboardLayout->SetGrid($oDashboardGrid); - foreach ($aDashlets as $sDashletId => $aPosDashlet) { + foreach ($aDashlets as $aPosDashlet) { /** @var \Dashlet $oDashlet */ $oDashlet = $aPosDashlet['dashlet']; if ($oDashlet::IsVisible()) { - $oDashlet->SetID($sDashletId); + $sDashletId = $oDashlet->GetID(); $sDashletClass = get_class($oDashlet); $aDashletDenormalizedProperties = $oDashlet->GetDenormalizedProperties(); $aDashletsInfo = $sDashletClass::GetInfo(); diff --git a/sources/Forms/Controller/FormsController.php b/sources/Forms/Controller/FormsController.php index bedd966c2..d8959cda3 100644 --- a/sources/Forms/Controller/FormsController.php +++ b/sources/Forms/Controller/FormsController.php @@ -38,7 +38,8 @@ class FormsController extends Controller if ($oForm->isSubmitted()) { if ($oForm->isValid()) { - IssueLog::Info('form is valid'); + $sDashletName = json_encode($sDashletClass); + IssueLog::Debug("form for $sDashletName is valid"); } // Compute blocks to redraw