diff --git a/pandora_console/godmode/massive/massive_delete_modules.php b/pandora_console/godmode/massive/massive_delete_modules.php
index be10127a80..8725c713aa 100755
--- a/pandora_console/godmode/massive/massive_delete_modules.php
+++ b/pandora_console/godmode/massive/massive_delete_modules.php
@@ -385,6 +385,9 @@ echo '';
echo '
';
ui_require_jquery_file ('form');
+//Hack to translate text "none" in PHP to javascript
+echo '' . __('None') . '';
+echo '' . __('Please, select an agent first') . '';
ui_require_jquery_file ('pandora.controls');
if ($selection_mode == 'modules') {
diff --git a/pandora_console/godmode/massive/massive_edit_modules.php b/pandora_console/godmode/massive/massive_edit_modules.php
index b12093aaf5..a7056636b0 100755
--- a/pandora_console/godmode/massive/massive_edit_modules.php
+++ b/pandora_console/godmode/massive/massive_edit_modules.php
@@ -709,6 +709,7 @@ echo '';
echo '
';
//Hack to translate text "none" in PHP to javascript
echo '' . __('None') . '';
+echo '' . __('Please, select an agent first') . '';
ui_require_jquery_file ('pandora.controls');
if ($selection_mode == 'modules') {
diff --git a/pandora_console/include/javascript/pandora.js b/pandora_console/include/javascript/pandora.js
index 0788f43c70..2b323a55f1 100644
--- a/pandora_console/include/javascript/pandora.js
+++ b/pandora_console/include/javascript/pandora.js
@@ -189,8 +189,10 @@ function agent_changed_by_multiple_agents (event, id_agent, selected) {
$('#module').empty ();
if (isEmptyObject(data)) {
- var noneText = $("#none_text").html(); //Trick for catch the translate text.
-
+ //Trick for catch the translate text.
+ var noneText = $("#id_agents").val() === null
+ ? $("#select_agent_first_text").html()
+ : $("#none_text").html();
if (noneText == null) {
noneText = 'None';
}
diff --git a/pandora_console/operation/agentes/ver_agente.php b/pandora_console/operation/agentes/ver_agente.php
index 00d5839046..df7a2777ff 100644
--- a/pandora_console/operation/agentes/ver_agente.php
+++ b/pandora_console/operation/agentes/ver_agente.php
@@ -340,6 +340,11 @@ if (is_ajax ()) {
'tmetaconsole_setup', 'id', $id_server);
}
+ if (empty($idAgents[0])) {
+ echo json_encode(array());
+ return;
+ }
+
$filter = '1 = 1';
$all = (string)get_parameter('all', 'all');