diff --git a/pandora_console/include/lib/Dashboard/Widget.php b/pandora_console/include/lib/Dashboard/Widget.php
index 1c5904e74a..2065c2d92a 100644
--- a/pandora_console/include/lib/Dashboard/Widget.php
+++ b/pandora_console/include/lib/Dashboard/Widget.php
@@ -474,11 +474,10 @@ class Widget
} else if ($this->loadError === true) {
$output .= '
';
$output .= \ui_print_error_message(
- __('Widget cannot be loaded'),
+ __('Widget cannot be loaded').'. '.__('Please, configure the widget again to recover it'),
'',
true
);
- $output .= __('Please, configure the widget again to recover it');
$output .= '
';
} else {
$output .= $this->load();
diff --git a/pandora_console/include/lib/Dashboard/Widgets/maps_made_by_user.php b/pandora_console/include/lib/Dashboard/Widgets/maps_made_by_user.php
index 0b5667e491..84cd900ac0 100644
--- a/pandora_console/include/lib/Dashboard/Widgets/maps_made_by_user.php
+++ b/pandora_console/include/lib/Dashboard/Widgets/maps_made_by_user.php
@@ -182,6 +182,17 @@ class MapsMadeByUser extends Widget
$this->configurationRequired = false;
if (empty($this->values['vcId']) === true) {
$this->configurationRequired = true;
+ } else {
+ $check_exist = db_get_value(
+ 'id',
+ 'tlayout',
+ 'id',
+ $this->values['vcId']
+ );
+
+ if ($check_exist === false) {
+ $this->loadError = true;
+ }
}
$this->overflow_scrollbars = false;
@@ -368,7 +379,7 @@ class MapsMadeByUser extends Widget
$visualConsole = VisualConsole::fromDB(
['id' => $this->values['vcId']]
);
- } catch (Throwable $e) {
+ } catch (\Throwable $e) {
db_pandora_audit(
AUDIT_LOG_ACL_VIOLATION,
'Trying to access visual console without Id'
diff --git a/pandora_console/include/lib/Dashboard/Widgets/reports.php b/pandora_console/include/lib/Dashboard/Widgets/reports.php
index 8611665128..4328eb66f4 100644
--- a/pandora_console/include/lib/Dashboard/Widgets/reports.php
+++ b/pandora_console/include/lib/Dashboard/Widgets/reports.php
@@ -172,6 +172,17 @@ class ReportsWidget extends Widget
$this->configurationRequired = false;
if (empty($this->values['reportId']) === true) {
$this->configurationRequired = true;
+ } else {
+ $check_exist = db_get_value(
+ 'id_report',
+ 'treport',
+ 'id_report',
+ $this->values['reportId']
+ );
+
+ if ($check_exist === false) {
+ $this->loadError = true;
+ }
}
$this->overflow_scrollbars = false;
diff --git a/pandora_console/views/dashboard/list.php b/pandora_console/views/dashboard/list.php
index ade98dc91c..c1117e3f36 100644
--- a/pandora_console/views/dashboard/list.php
+++ b/pandora_console/views/dashboard/list.php
@@ -220,12 +220,11 @@ if ($writeDashboards === 1) {
$output = ' $text,
- 'btn_text' => __('Ok'),
- 'btn_cancel' => __('Cancel'),
- 'url' => $ajaxController,
- 'url_ajax' => ui_get_full_url('ajax.php'),
- 'dashboardId' => $dashboardId,
+ 'title' => $text,
+ 'btn_text' => __('Ok'),
+ 'btn_cancel' => __('Cancel'),
+ 'url' => $ajaxController,
+ 'url_ajax' => ui_get_full_url('ajax.php'),
]
);
$output .= ')\'>';
diff --git a/pandora_console/views/dashboard/listWidgets.php b/pandora_console/views/dashboard/listWidgets.php
index 4b227cc947..ee8f2d7885 100644
--- a/pandora_console/views/dashboard/listWidgets.php
+++ b/pandora_console/views/dashboard/listWidgets.php
@@ -31,7 +31,6 @@ require_once $config['homedir'].'/include/class/HTML.class.php';
$form = [
'id' => 'form-search-widget',
- 'action' => $url,
'onsubmit' => 'return false;',
'class' => 'modal-dashboard',
'enctype' => 'multipart/form-data',