InfotelGLPI / printercounters

Plugin Printercounters for GLPI
http://blogglpi.infotel.com
GNU General Public License v2.0
14 stars 9 forks source link

Problème sql pour afficher la liste des imprimantes quand le plugin compteur d'imprimante est activé #66

Closed Caraseb closed 4 years ago

Caraseb commented 4 years ago

Bonjour, Après avoir mis en place le plugin compteur d'imprimantes, j'ai voulu mettre les champs dernier relevé automatique et relevé automatique activé visible dans la liste de mes imprimantes et depuis impossible de visualiser mes imprimantes Par contre je peut les rendre visible après désactivation du plugin PS: je l'ai déjà désinstallé et réinstallé mais rien n'y fait

Plugin printercounters

[2020-08-21 09:20:10] glpisqllog.ERROR: DBmysql::query() in /var/www/glpi/inc/dbmysql.class.php line 188 *** MySQL query error: SQL: SELECT DISTINCT glpi_printers.id AS id, 'sebastien' AS currentuser, glpi_printers.entities_id, glpi_printers.is_recursive, glpi_printers.name AS ITEM_Printer_1, glpi_printers.id AS ITEM_Printer_1_id, glpi_entities.completename AS ITEM_Printer_80, glpi_plugin_printercounters_items_recordmodels.periodicity AS ITEM_Printer_6095, GROUP_CONCAT(DISTINCT CONCAT(IFNULL(glpi_plugin_printercounters_records_c4e0bb7626ff8a6a87010a66de53ff0e.date, 'NULL'), '$#$',glpi_plugin_printercounters_records_c4e0bb7626ff8a6a87010a66de53ff0e.id) ORDER BY glpi_plugin_printercounters_records_c4e0bb7626ff8a6a87010a66de53ff0e.id SEPARATOR '$$##$$') AS ITEM_Printer_6091,

              `glpi_states`.`completename` AS `ITEM_Printer_31`,  `glpi_printertypes`.`name` AS `ITEM_Printer_4`,  `glpi_printermodels`.`name` AS `ITEM_Printer_40`,   GROUP_CONCAT(DISTINCT CONCAT(IFNULL(`glpi_ipaddresses_0cc35feab42e5909929ff742b4834540`.`name`, '__NULL__'),
                                           '$#$',`glpi_ipaddresses_0cc35feab42e5909929ff742b4834540`.`id`) ORDER BY `glpi_ipaddresses_0cc35feab42e5909929ff742b4834540`.`id` SEPARATOR '$$##$$')
                          AS `ITEM_Printer_126`,

               GROUP_CONCAT(DISTINCT CONCAT(IFNULL(`glpi_networknames_1c35f844286c802e0cbde4560b5d579e`.`name`, '__NULL__'),
                                           '$#$',`glpi_networknames_1c35f844286c802e0cbde4560b5d579e`.`id`) ORDER BY `glpi_networknames_1c35f844286c802e0cbde4560b5d579e`.`id` SEPARATOR '$$##$$')
                          AS `ITEM_Printer_127` FROM `glpi_printers`LEFT JOIN `glpi_entities`
                                      ON (`glpi_printers`.`entities_id` = `glpi_entities`.`id`
                                          )LEFT JOIN `glpi_plugin_printercounters_items_recordmodels`
                                      ON (`glpi_printers`.`plugin_printercounters_items_recordmodels_id` = `glpi_plugin_printercounters_items_recordmodels`.`id`
                                          ) LEFT JOIN `glpi_plugin_printercounters_records`  AS `glpi_plugin_printercounters_records_c4e0bb7626ff8a6a87010a66de53ff0e`
                                         ON (`glpi_plugin_printercounters_items_recordmodels`.`id` = `glpi_plugin_printercounters_records_c4e0bb7626ff8a6a87010a66de53ff0e`.`plugin_printercounters_items_recordmodels_id`
                                             AND `glpi_plugin_printercounters_records_c4e0bb7626ff8a6a87010a66de53ff0e`.`date` = (SELECT max(`glpi_plugin_printercounters_records`.`date`)
                                                                               FROM glpi_plugin_printercounters_records
                                                                               WHERE `glpi_plugin_printercounters_records`.`plugin_printercounters_items_recordmodels_id` = `glpi_plugin_printercounters_items_recordmodels`.`id`)  )LEFT JOIN `glpi_states`
                                      ON (`glpi_printers`.`states_id` = `glpi_states`.`id`
                                          )LEFT JOIN `glpi_printertypes`
                                      ON (`glpi_printers`.`printertypes_id` = `glpi_printertypes`.`id`
                                          )LEFT JOIN `glpi_printermodels`
                                      ON (`glpi_printers`.`printermodels_id` = `glpi_printermodels`.`id`
                                          ) LEFT JOIN `glpi_ipaddresses`  AS `glpi_ipaddresses_0cc35feab42e5909929ff742b4834540`
                                      ON (`glpi_printers`.`id` = `glpi_ipaddresses_0cc35feab42e5909929ff742b4834540`.`mainitems_id`
                                          AND `glpi_ipaddresses_0cc35feab42e5909929ff742b4834540`.`mainitemtype` = 'Printer'
                                          AND `glpi_ipaddresses_0cc35feab42e5909929ff742b4834540`.`is_deleted` = 0 )  LEFT JOIN `glpi_networkports`
                                      ON (`glpi_printers`.`id` = `glpi_networkports`.`items_id`
                                          AND `glpi_networkports`.`itemtype` = 'Printer'
                                          )  LEFT JOIN `glpi_networknames`  AS `glpi_networknames_1c35f844286c802e0cbde4560b5d579e`
                                      ON (`glpi_networkports`.`id` = `glpi_networknames_1c35f844286c802e0cbde4560b5d579e`.`items_id`
                                          AND `glpi_networknames_1c35f844286c802e0cbde4560b5d579e`.`itemtype` = 'NetworkPort'
                                          AND `glpi_networknames_1c35f844286c802e0cbde4560b5d579e`.`is_deleted` = 0 )  WHERE  `glpi_printers`.`is_deleted` = 0  AND `glpi_printers`.`is_template` = 0  GROUP BY `glpi_printers`.`id` ORDER BY ITEM_Printer_1 ASC  LIMIT 0, 15

Error: Unknown column 'glpi_printers.plugin_printercounters_items_recordmodels_id' in 'on clause' Backtrace : inc/search.class.php:1246 inc/search.class.php:98 Search::constructData() inc/search.class.php:80 Search::showList() front/printer.php:39 Search::show() {"user":"39@monserveur"}

keha35 commented 4 years ago

Bonjour,

Effectivement j'ai réussi a reproduire. Pouvez vous essayer avec ce fix?

Caraseb commented 4 years ago

Bonjour,

Je vous remercie pour votre efficacité et votre rapidité. Tout est rentré dans l'ordre

Le ven. 21 août 2020 à 10:17, Kevin HAINRY notifications@github.com a écrit :

Bonjour,

Effectivement j'ai réussi a reproduire. Pouvez vous essayer avec ce fix?

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/InfotelGLPI/printercounters/issues/66#issuecomment-678110176, or unsubscribe https://github.com/notifications/unsubscribe-auth/AMHQ43HGWJUX2ZR6HFAOZ7DSBYURBANCNFSM4QG723QQ .

Caraseb commented 4 years ago

Le ven. 21 août 2020 à 15:31, Sébestien Stirnemann stirseb@gmail.com a écrit :

Bonjour,

Je vous remercie pour votre efficacité et votre rapidité. Tout est rentré dans l'ordre

Le ven. 21 août 2020 à 10:17, Kevin HAINRY notifications@github.com a écrit :

Bonjour,

Effectivement j'ai réussi a reproduire. Pouvez vous essayer avec ce fix?

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/InfotelGLPI/printercounters/issues/66#issuecomment-678110176, or unsubscribe https://github.com/notifications/unsubscribe-auth/AMHQ43HGWJUX2ZR6HFAOZ7DSBYURBANCNFSM4QG723QQ .