You are not logged in.
Pages: 1
Bonjour,
Dans la version publier pour le version 0.84 du plugin adressing
il y a une erreur dans l'affichage des adresses IP .
erreur dans la requêtes ci-dessous
la table
dev
n'est pas connu
version de glpi 0.84
cf la requéte :
SELECT `port`.`id`, 'NetworkEquipment' AS itemtype, `dev`.`id` AS on_device, `dev`.`name` AS dname, '' AS pname, `glpi_ipaddresses`.`name` as ip, `port`.`mac`, `dev`.`users_id`, INET_ATON(`glpi_ipaddresses`.`name`) AS ipnum
FROM `glpi_networkports` port
LEFT JOIN `glpi_networkequipments` dev ON (`port`.`items_id` = `dev`.`id` AND `port`.`itemtype` = 'NetworkEquipment')
LEFT JOIN `glpi_networknames` ON (`port`.`id` = `glpi_networknames`.`items_id`)
LEFT JOIN `glpi_ipaddresses` ON (`glpi_ipaddresses`.`items_id` = `glpi_networknames`.`id`)
WHERE INET_ATON(`glpi_ipaddresses`.`name`) >= '3232236288' AND INET_ATON(`glpi_ipaddresses`.`name`) <= '3232236337' AND `dev`.`is_deleted` = 0 AND `dev`.`is_template` = 0 AND ( `dev`.`entities_id` IN ('10', '12', '6', '11', '20', '23', '18', '21', '24', '17', '19', '1', '22') )
UNION
SELECT `port`.`id`, 'Computer' AS `itemtype`, `port`.`items_id`, `dev`.`name` AS dname, `port`.`name` AS pname, `glpi_ipaddresses`.`name` as ip, `port`.`mac`, `dev`.`users_id`, INET_ATON(`glpi_ipaddresses`.`name`) AS ipnum
FROM `glpi_networkports` port
LEFT JOIN `glpi_computers` dev ON (`port`.`items_id` = `dev`.`id` AND `port`.`itemtype` = 'Computer')
LEFT JOIN `glpi_networknames` ON (`port`.`id` = `glpi_networknames`.`items_id`)
LEFT JOIN `glpi_ipaddresses` ON (`glpi_ipaddresses`.`items_id` = `glpi_networknames`.`id`)
WHERE INET_ATON(`glpi_ipaddresses`.`name`) >= '3232236288' AND INET_ATON(`glpi_ipaddresses`.`name`) <= '3232236337' AND `dev`.`is_deleted` = 0 AND `dev`.`is_template` = 0 AND ( `dev`.`entities_id` IN ('10', '12', '6', '11', '20', '23', '18', '21', '24', '17', '19', '1', '22') )
UNION
SELECT `port`.`id`, 'NetworkEquipment' AS `itemtype`, `port`.`items_id`, `dev`.`name` AS dname, `port`.`name` AS pname, `glpi_ipaddresses`.`name` as ip, `port`.`mac`, `dev`.`users_id`, INET_ATON(`glpi_ipaddresses`.`name`) AS ipnum
FROM `glpi_networkports` port
LEFT JOIN `glpi_networkequipments` dev ON (`port`.`items_id` = `dev`.`id` AND `port`.`itemtype` = 'NetworkEquipment')
LEFT JOIN `glpi_networknames` ON (`port`.`id` = `glpi_networknames`.`items_id`)
LEFT JOIN `glpi_ipaddresses` ON (`glpi_ipaddresses`.`items_id` = `glpi_networknames`.`id`)
WHERE INET_ATON(`glpi_ipaddresses`.`name`) >= '3232236288' AND INET_ATON(`glpi_ipaddresses`.`name`) <= '3232236337' AND `dev`.`is_deleted` = 0 AND `dev`.`is_template` = 0 AND ( `dev`.`entities_id` IN ('10', '12', '6', '11', '20', '23', '18', '21', '24', '17', '19', '1', '22') )
UNION
SELECT `port`.`id`, 'Peripheral' AS `itemtype`, `port`.`items_id`, `dev`.`name` AS dname, `port`.`name` AS pname, `glpi_ipaddresses`.`name` as ip, `port`.`mac`, `dev`.`users_id`, INET_ATON(`glpi_ipaddresses`.`name`) AS ipnum
FROM `glpi_networkports` port
LEFT JOIN `glpi_peripherals` dev ON (`port`.`items_id` = `dev`.`id` AND `port`.`itemtype` = 'Peripheral')
LEFT JOIN `glpi_networknames` ON (`port`.`id` = `glpi_networknames`.`items_id`)
LEFT JOIN `glpi_ipaddresses` ON (`glpi_ipaddresses`.`items_id` = `glpi_networknames`.`id`)
WHERE INET_ATON(`glpi_ipaddresses`.`name`) >= '3232236288' AND INET_ATON(`glpi_ipaddresses`.`name`) <= '3232236337' AND `dev`.`is_deleted` = 0 AND `dev`.`is_template` = 0 AND ( `dev`.`entities_id` IN ('10', '12', '6', '11', '20', '23', '18', '21', '24', '17', '19', '1', '22') )
UNION
SELECT `port`.`id`, 'Phone' AS `itemtype`, `port`.`items_id`, `dev`.`name` AS dname, `port`.`name` AS pname, `glpi_ipaddresses`.`name` as ip, `port`.`mac`, `dev`.`users_id`, INET_ATON(`glpi_ipaddresses`.`name`) AS ipnum
FROM `glpi_networkports` port
LEFT JOIN `glpi_phones` dev ON (`port`.`items_id` = `dev`.`id` AND `port`.`itemtype` = 'Phone')
LEFT JOIN `glpi_networknames` ON (`port`.`id` = `glpi_networknames`.`items_id`)
LEFT JOIN `glpi_ipaddresses` ON (`glpi_ipaddresses`.`items_id` = `glpi_networknames`.`id`)
WHERE INET_ATON(`glpi_ipaddresses`.`name`) >= '3232236288' AND INET_ATON(`glpi_ipaddresses`.`name`) <= '3232236337' AND `dev`.`is_deleted` = 0 AND `dev`.`is_template` = 0 AND ( `dev`.`entities_id` IN ('10', '12', '6', '11', '20', '23', '18', '21', '24', '17', '19', '1', '22') )
UNION
SELECT `port`.`id`, 'Printer' AS `itemtype`, `port`.`items_id`, `dev`.`name` AS dname, `port`.`name` AS pname, `glpi_ipaddresses`.`name` as ip, `port`.`mac`, `dev`.`users_id`, INET_ATON(`glpi_ipaddresses`.`name`) AS ipnum
FROM `glpi_networkports` port
LEFT JOIN `glpi_printers` dev ON (`port`.`items_id` = `dev`.`id` AND `port`.`itemtype` = 'Printer')
LEFT JOIN `glpi_networknames` ON (`port`.`id` = `glpi_networknames`.`items_id`)
LEFT JOIN `glpi_ipaddresses` ON (`glpi_ipaddresses`.`items_id` = `glpi_networknames`.`id`)
WHERE INET_ATON(`glpi_ipaddresses`.`name`) >= '3232236288' AND INET_ATON(`glpi_ipaddresses`.`name`) <= '3232236337' AND `dev`.`is_deleted` = 0 AND `dev`.`is_template` = 0 AND ( `dev`.`entities_id` IN ('10', '12', '6', '11', '20', '23', '18', '21', '24', '17', '19', '1', '22') )
UNION
SELECT `port`.`id`, 'PluginFusioninventoryUnknownDevice' AS `itemtype`, `port`.`items_id`, `dev`.`name` AS dname, `port`.`name` AS pname, `glpi_ipaddresses`.`name` as ip, `port`.`mac`, `dev`.`users_id`, INET_ATON(`glpi_ipaddresses`.`name`) AS ipnum
FROM `glpi_networkports` port
LEFT JOIN `glpi_plugin_fusioninventory_unknowndevices` dev ON (`port`.`items_id` = `dev`.`id` AND `port`.`itemtype` = 'PluginFusioninventoryUnknownDevice')
LEFT JOIN `glpi_networknames` ON (`port`.`id` = `glpi_networknames`.`items_id`)
LEFT JOIN `glpi_ipaddresses` ON (`glpi_ipaddresses`.`items_id` = `glpi_networknames`.`id`)
WHERE INET_ATON(`glpi_ipaddresses`.`name`) >= '3232236288' AND INET_ATON(`glpi_ipaddresses`.`name`) <= '3232236337' AND `dev`.`is_deleted` = 0 AND `dev`.`is_template` = 0 AND ( `dev`.`entities_id` IN ('10', '12', '6', '11', '20', '23', '18', '21', '24', '17', '19', '1', '22') )
Navigateurs : Chrome
Installation : Package GLPI 0.84.2
Serveur : Apache 2 / Base : 5.0.15 / Langage : PHP 4.4.1 pl1 / PhpMyAdmin 2.6.4-pl3
Offline
Pour corriger le problème :
Modifier le fichier inc\addressing.class.php
Remplacer la ligne Ligne 328 :
$sql .= " AND `glpi_networkequipments`.`networks_id` = ".$this->fields["networks_id"];
Par
$sql .= " AND `dev`.`networks_id` = ".$this->fields["networks_id"];
Remplacer la ligne Ligne 354 :
$sql .= " AND `" . $itemtable . "`.`networks_id`= ".$this->fields["networks_id"];
Par
$sql .= " AND `dev`.`networks_id`= ".$this->fields["networks_id"];
Last edited by daprod (2013-09-06 09:25:14)
Offline
Merci, cela fonctionne parfaitement; Par contre la seconde modification est à la ligne 354 ;-)
Offline
copier/coller
Offline
Merci pour cette correction
Mais nouvelle erreur
Unknown column 'dev.users_id' in 'field list'
dans la même requéte
Last edited by Jm0u (2013-09-06 09:39:17)
Navigateurs : Chrome
Installation : Package GLPI 0.84.2
Serveur : Apache 2 / Base : 5.0.15 / Langage : PHP 4.4.1 pl1 / PhpMyAdmin 2.6.4-pl3
Offline
Salut,
Vraisemblablement le même problème que celui qui est évoqué ici : http://www.glpi-project.org/forum/viewt … 85#p178385
Non ?
Offline
Pages: 1