diff --git a/pandora_console/ChangeLog b/pandora_console/ChangeLog
index 786d3e2d57..f10faf8a51 100644
--- a/pandora_console/ChangeLog
+++ b/pandora_console/ChangeLog
@@ -1,3 +1,10 @@
+2010-07-13  Sergio Martin <sergio.martin@artica.es>
+
+	* include/functions_visual_map.php
+	godmode/reporting/visual_console_builder.editor.php: Fixed the
+	visualmaps for ignore the disabled and delete pending modules
+	for bug: 3022892
+
 2010-07-13  Darío Rodríguez <dario.rodriguez@artica.es>
 
 	* general/pandora_help.php: Delete interrogation picture to get a 
diff --git a/pandora_console/godmode/reporting/visual_console_builder.editor.php b/pandora_console/godmode/reporting/visual_console_builder.editor.php
index 9bcc4c8a8a..053a23ba34 100644
--- a/pandora_console/godmode/reporting/visual_console_builder.editor.php
+++ b/pandora_console/godmode/reporting/visual_console_builder.editor.php
@@ -221,6 +221,14 @@ echo '<div id="background" class="ui-widget-content" style="background: url(imag
 	border: 2px black solid; width: ' . $widthBackground . 'px; height: ' . $heightBackground . 'px;">';
 
 foreach ($layoutDatas as $layoutData) {
+			
+	// Pending delete and disable modules must be ignored
+	$delete_pending_module = get_db_value ("delete_pending", "tagente_modulo", "id_agente_modulo", $layoutData["id_agente_modulo"]);
+	$disabled_module = get_db_value ("disabled", "tagente_modulo", "id_agente_modulo", $layoutData["id_agente_modulo"]);
+
+	if($delete_pending_module == 1 || $disabled_module == 1)
+		continue;
+	
 	printItemInVisualConsole($layoutData);
 }
 
diff --git a/pandora_console/include/functions_visual_map.php b/pandora_console/include/functions_visual_map.php
index 025cdbf98b..278adeb886 100644
--- a/pandora_console/include/functions_visual_map.php
+++ b/pandora_console/include/functions_visual_map.php
@@ -367,7 +367,14 @@ function print_pandora_visual_map ($id_layout, $show_links = true, $draw_lines =
 			// ****************************************************************
 			// Get parent status (Could be an agent, module, map, others doesnt have parent info)
 			// ****************************************************************
-
+			
+			// Pending delete and disable modules must be ignored
+			$delete_pending_module = get_db_value ("delete_pending", "tagente_modulo", "id_agente_modulo", $layout_data["id_agente_modulo"]);
+			$disabled_module = get_db_value ("disabled", "tagente_modulo", "id_agente_modulo", $layout_data["id_agente_modulo"]);
+			
+			if($delete_pending_module == 1 || $disabled_module == 1)
+				continue;
+				
 			if ($layout_data["parent_item"] != 0){
 				$id_agent_module_parent = get_db_value ("id_agente_modulo", "tlayout_data", "id", $layout_data["parent_item"]);
 				$id_agent_parent = get_db_value ("id_agent", "tlayout_data", "id", $layout_data["parent_item"]);