InfotelGLPI / printercounters

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

Records dissapeared #27

Closed grego1981 closed 6 years ago

grego1981 commented 7 years ago

Hello all,

After upgrading to 9.1.5 of GLPI all the records have dissapeared from my printers. In the databse I can see records flowing data but not in the frontend. Is there something I can to to resolve??

Thank you Gregory

amma35 commented 7 years ago

Do you have any error logs files/log/php-errors.log & files/log/sql-errors.log ?

grego1981 commented 6 years ago

Hello and sorry for the looooooong delay (totaly missed the github notif). I have upgraded using the latest code here in github also upgraded to 9.2 of GLPI same behaviour. I have seen errors being produced in php-errors log

2017-10-18 15:36:57 [7@itsrv-05] PHP Warning(2): Illegal string offset 'name' Backtrace : plugins/printercounters/inc/search.class.php:232 plugins/printercounters/inc/search.class.php:162 PluginPrintercountersSearch->addSearchField() plugins/printercounters/inc/search.class.php:328 PluginPrintercountersSearch->showHistoryGenericSearch() ...tercounters/inc/item_billingmodel.class.php:224 PluginPrintercountersSearch->showSearch() ...tercounters/inc/item_billingmodel.class.php:174 PluginPrintercountersItem_Billingmodel->showForItem() inc/commonglpi.class.php:482 PluginPrintercountersItem_Billingmodel::displayTabContent ajax/common.tabs.php:96 CommonGLPI::displayStandardTab() 2017-10-18 15:39:18 [7@itsrv-05] PHP Warning(2): Illegal string offset 'table' Backtrace : plugins/printercounters/inc/search.class.php:1728 plugins/printercounters/inc/search.class.php:541 PluginPrintercountersSearch::addSelect() plugins/printercounters/inc/search.class.php:66 PluginPrintercountersSearch->getHistoryFromDB() plugins/printercounters/inc/search.class.php:320 PluginPrintercountersSearch->manageHistoryGetValues() ...tercounters/inc/item_recordmodel.class.php:1162 PluginPrintercountersSearch->showSearch() ...ntercounters/front/item_recordmodel.form.php:61 PluginPrintercountersItem_Recordmodel->showRecordPlanning() 2017-10-18 15:39:18 [7@itsrv-05] PHP Warning(2): Illegal string offset 'field' Backtrace : plugins/printercounters/inc/search.class.php:1729 plugins/printercounters/inc/search.class.php:541 PluginPrintercountersSearch::addSelect() plugins/printercounters/inc/search.class.php:66 PluginPrintercountersSearch->getHistoryFromDB() plugins/printercounters/inc/search.class.php:320 PluginPrintercountersSearch->manageHistoryGetValues() ...tercounters/inc/item_recordmodel.class.php:1162 PluginPrintercountersSearch->showSearch() ...ntercounters/front/item_recordmodel.form.php:61 PluginPrintercountersItem_Recordmodel->showRecordPlanning() 2017-10-18 15:39:18 [7@itsrv-05] PHP Warning(2): Illegal string offset 'linkfield' Backtrace : plugins/printercounters/inc/search.class.php:1742 plugins/printercounters/inc/search.class.php:541 PluginPrintercountersSearch::addSelect() plugins/printercounters/inc/search.class.php:66 PluginPrintercountersSearch->getHistoryFromDB() plugins/printercounters/inc/search.class.php:320 PluginPrintercountersSearch->manageHistoryGetValues() ...tercounters/inc/item_recordmodel.class.php:1162 PluginPrintercountersSearch->showSearch() ...ntercounters/front/item_recordmodel.form.php:61 PluginPrintercountersItem_Recordmodel->showRecordPlanning() 2017-10-18 15:39:18 [7@itsrv-05] PHP Notice(8): Trying to get property of non-object Backtrace : inc/dbmysql.class.php:275 plugins/printercounters/inc/search.class.php:655 DBmysql->numrows() plugins/printercounters/inc/search.class.php:66 PluginPrintercountersSearch->getHistoryFromDB() plugins/printercounters/inc/search.class.php:320 PluginPrintercountersSearch->manageHistoryGetValues() ...tercounters/inc/item_recordmodel.class.php:1162 PluginPrintercountersSearch->showSearch() ...ntercounters/front/item_recordmodel.form.php:61 PluginPrintercountersItem_Recordmodel->showRecordPlanning() 2017-10-18 15:39:18 [7@itsrv-05] PHP Warning(2): Illegal string offset 'table' Backtrace : ...tercounters/inc/item_recordmodel.class.php:1278 ...tercounters/inc/item_recordmodel.class.php:1217 PluginPrintercountersItem_Recordmodel->formatSearchData() plugins/printercounters/inc/search.class.php:68 PluginPrintercountersItem_Recordmodel->countLines() plugins/printercounters/inc/search.class.php:320 PluginPrintercountersSearch->manageHistoryGetValues() ...tercounters/inc/item_recordmodel.class.php:1162 PluginPrintercountersSearch->showSearch() ...ntercounters/front/item_recordmodel.form.php:61 PluginPrintercountersItem_Recordmodel->showRecordPlanning() 2017-10-18 15:39:18 [7@itsrv-05] PHP Warning(2): Illegal string offset 'table' Backtrace : ...tercounters/inc/item_recordmodel.class.php:1282 ...tercounters/inc/item_recordmodel.class.php:1217 PluginPrintercountersItem_Recordmodel->formatSearchData() plugins/printercounters/inc/search.class.php:68 PluginPrintercountersItem_Recordmodel->countLines() plugins/printercounters/inc/search.class.php:320 PluginPrintercountersSearch->manageHistoryGetValues() ...tercounters/inc/item_recordmodel.class.php:1162 PluginPrintercountersSearch->showSearch() ...ntercounters/front/item_recordmodel.form.php:61 PluginPrintercountersItem_Recordmodel->showRecordPlanning() 2017-10-18 15:39:18 [7@itsrv-05] PHP Warning(2): Illegal string offset 'table' Backtrace : ...tercounters/inc/item_recordmodel.class.php:1286 ...tercounters/inc/item_recordmodel.class.php:1217 PluginPrintercountersItem_Recordmodel->formatSearchData() plugins/printercounters/inc/search.class.php:68 PluginPrintercountersItem_Recordmodel->countLines() plugins/printercounters/inc/search.class.php:320 PluginPrintercountersSearch->manageHistoryGetValues() ...tercounters/inc/item_recordmodel.class.php:1162 PluginPrintercountersSearch->showSearch() ...ntercounters/front/item_recordmodel.form.php:61 PluginPrintercountersItem_Recordmodel->showRecordPlanning() 2017-10-18 15:39:18 [7@itsrv-05] PHP Warning(2): Illegal string offset 'table' Backtrace : ...tercounters/inc/item_recordmodel.class.php:1290 ...tercounters/inc/item_recordmodel.class.php:1217 PluginPrintercountersItem_Recordmodel->formatSearchData() plugins/printercounters/inc/search.class.php:68 PluginPrintercountersItem_Recordmodel->countLines() plugins/printercounters/inc/search.class.php:320 PluginPrintercountersSearch->manageHistoryGetValues() ...tercounters/inc/item_recordmodel.class.php:1162 PluginPrintercountersSearch->showSearch() ...ntercounters/front/item_recordmodel.form.php:61 PluginPrintercountersItem_Recordmodel->showRecordPlanning() 2017-10-18 15:39:18 [7@itsrv-05] PHP Warning(2): Illegal string offset 'table' Backtrace : ...tercounters/inc/item_recordmodel.class.php:1294 ...tercounters/inc/item_recordmodel.class.php:1217 PluginPrintercountersItem_Recordmodel->formatSearchData() plugins/printercounters/inc/search.class.php:68 PluginPrintercountersItem_Recordmodel->countLines() plugins/printercounters/inc/search.class.php:320 PluginPrintercountersSearch->manageHistoryGetValues() ...tercounters/inc/item_recordmodel.class.php:1162 PluginPrintercountersSearch->showSearch() ...ntercounters/front/item_recordmodel.form.php:61 PluginPrintercountersItem_Recordmodel->showRecordPlanning() 2017-10-18 15:39:18 [7@itsrv-05] PHP Warning(2): Illegal string offset 'table' Backtrace : ...tercounters/inc/item_recordmodel.class.php:1298 ...tercounters/inc/item_recordmodel.class.php:1217 PluginPrintercountersItem_Recordmodel->formatSearchData() plugins/printercounters/inc/search.class.php:68 PluginPrintercountersItem_Recordmodel->countLines() plugins/printercounters/inc/search.class.php:320 PluginPrintercountersSearch->manageHistoryGetValues() ...tercounters/inc/item_recordmodel.class.php:1162 PluginPrintercountersSearch->showSearch() ...ntercounters/front/item_recordmodel.form.php:61 PluginPrintercountersItem_Recordmodel->showRecordPlanning() 2017-10-18 15:39:18 [7@itsrv-05] PHP Warning(2): Illegal string offset 'table' Backtrace : ...tercounters/inc/item_recordmodel.class.php:1302 ...tercounters/inc/item_recordmodel.class.php:1217 PluginPrintercountersItem_Recordmodel->formatSearchData() plugins/printercounters/inc/search.class.php:68 PluginPrintercountersItem_Recordmodel->countLines() plugins/printercounters/inc/search.class.php:320 PluginPrintercountersSearch->manageHistoryGetValues() ...tercounters/inc/item_recordmodel.class.php:1162 PluginPrintercountersSearch->showSearch() ...ntercounters/front/item_recordmodel.form.php:61 PluginPrintercountersItem_Recordmodel->showRecordPlanning() 2017-10-18 15:39:18 [7@itsrv-05] PHP Notice(8): Undefined offset: 8 Backtrace : inc/search.class.php:5002 ...tercounters/inc/item_recordmodel.class.php:1423 Search::giveItem() ...tercounters/inc/item_recordmodel.class.php:1217 PluginPrintercountersItem_Recordmodel->formatSearchData() plugins/printercounters/inc/search.class.php:68 PluginPrintercountersItem_Recordmodel->countLines() plugins/printercounters/inc/search.class.php:320 PluginPrintercountersSearch->manageHistoryGetValues() ...tercounters/inc/item_recordmodel.class.php:1162 PluginPrintercountersSearch->showSearch() ...ntercounters/front/item_recordmodel.form.php:61 PluginPrintercountersItem_Recordmodel->showRecordPlanning() 2017-10-18 15:39:18 [7@itsrv-05] PHP Notice(8): Undefined offset: 9 Backtrace : plugins/tag/hook.php:79 inc/search.class.php:4769 plugin_tag_giveItem() ...tercounters/inc/item_recordmodel.class.php:1423 Search::giveItem() ...tercounters/inc/item_recordmodel.class.php:1217 PluginPrintercountersItem_Recordmodel->formatSearchData() plugins/printercounters/inc/search.class.php:68 PluginPrintercountersItem_Recordmodel->countLines() plugins/printercounters/inc/search.class.php:320 PluginPrintercountersSearch->manageHistoryGetValues() ...tercounters/inc/item_recordmodel.class.php:1162 PluginPrintercountersSearch->showSearch() ...ntercounters/front/item_recordmodel.form.php:61 PluginPrintercountersItem_Recordmodel->showRecordPlanning() 2017-10-18 15:39:18 [7@itsrv-05] PHP Warning(2): Invalid argument supplied for foreach() Backtrace : plugins/tag/hook.php:79 inc/search.class.php:4769 plugin_tag_giveItem() ...tercounters/inc/item_recordmodel.class.php:1423 Search::giveItem() ...tercounters/inc/item_recordmodel.class.php:1217 PluginPrintercountersItem_Recordmodel->formatSearchData() plugins/printercounters/inc/search.class.php:68 PluginPrintercountersItem_Recordmodel->countLines() plugins/printercounters/inc/search.class.php:320 PluginPrintercountersSearch->manageHistoryGetValues() ...tercounters/inc/item_recordmodel.class.php:1162 PluginPrintercountersSearch->showSearch() ...ntercounters/front/item_recordmodel.form.php:61 PluginPrintercountersItem_Recordmodel->showRecordPlanning() 2017-10-18 15:39:18 [7@itsrv-05] PHP Notice(8): Undefined offset: 8 Backtrace : inc/search.class.php:5002 ...tercounters/inc/item_recordmodel.class.php:1423 Search::giveItem() ...tercounters/inc/item_recordmodel.class.php:1217 PluginPrintercountersItem_Recordmodel->formatSearchData() plugins/printercounters/inc/search.class.php:68 PluginPrintercountersItem_Recordmodel->countLines() plugins/printercounters/inc/search.class.php:320 PluginPrintercountersSearch->manageHistoryGetValues() ...tercounters/inc/item_recordmodel.class.php:1162 PluginPrintercountersSearch->showSearch() ...ntercounters/front/item_recordmodel.form.php:61 PluginPrintercountersItem_Recordmodel->showRecordPlanning() 2017-10-18 15:39:18 [7@itsrv-05] PHP Notice(8): Undefined offset: 9 Backtrace : plugins/tag/hook.php:79 inc/search.class.php:4769 plugin_tag_giveItem() ...tercounters/inc/item_recordmodel.class.php:1423 Search::giveItem() ...tercounters/inc/item_recordmodel.class.php:1217 PluginPrintercountersItem_Recordmodel->formatSearchData() plugins/printercounters/inc/search.class.php:68 PluginPrintercountersItem_Recordmodel->countLines() plugins/printercounters/inc/search.class.php:320 PluginPrintercountersSearch->manageHistoryGetValues() ...tercounters/inc/item_recordmodel.class.php:1162 PluginPrintercountersSearch->showSearch() ...ntercounters/front/item_recordmodel.form.php:61 PluginPrintercountersItem_Recordmodel->showRecordPlanning() 2017-10-18 15:39:18 [7@itsrv-05] PHP Warning(2): Invalid argument supplied for foreach() Backtrace : plugins/tag/hook.php:79 inc/search.class.php:4769 plugin_tag_giveItem() ...tercounters/inc/item_recordmodel.class.php:1423 Search::giveItem() ...tercounters/inc/item_recordmodel.class.php:1217 PluginPrintercountersItem_Recordmodel->formatSearchData() plugins/printercounters/inc/search.class.php:68 PluginPrintercountersItem_Recordmodel->countLines() plugins/printercounters/inc/search.class.php:320 PluginPrintercountersSearch->manageHistoryGetValues() ...tercounters/inc/item_recordmodel.class.php:1162 PluginPrintercountersSearch->showSearch() ...ntercounters/front/item_recordmodel.form.php:61 PluginPrintercountersItem_Recordmodel->showRecordPlanning() 2017-10-18 15:39:18 [7@itsrv-05] PHP Notice(8): Undefined offset: 8 Backtrace : inc/search.class.php:5002 ...tercounters/inc/item_recordmodel.class.php:1423 Search::giveItem() ...tercounters/inc/item_recordmodel.class.php:1217 PluginPrintercountersItem_Recordmodel->formatSearchData() plugins/printercounters/inc/search.class.php:68 PluginPrintercountersItem_Recordmodel->countLines() plugins/printercounters/inc/search.class.php:320 PluginPrintercountersSearch->manageHistoryGetValues() ...tercounters/inc/item_recordmodel.class.php:1162 PluginPrintercountersSearch->showSearch() ...ntercounters/front/item_recordmodel.form.php:61 PluginPrintercountersItem_Recordmodel->showRecordPlanning() 2017-10-18 15:39:18 [7@itsrv-05] PHP Notice(8): Undefined offset: 9 Backtrace : plugins/tag/hook.php:79 inc/search.class.php:4769 plugin_tag_giveItem() ...tercounters/inc/item_recordmodel.class.php:1423 Search::giveItem() ...tercounters/inc/item_recordmodel.class.php:1217 PluginPrintercountersItem_Recordmodel->formatSearchData() plugins/printercounters/inc/search.class.php:68 PluginPrintercountersItem_Recordmodel->countLines() plugins/printercounters/inc/search.class.php:320 PluginPrintercountersSearch->manageHistoryGetValues() ...tercounters/inc/item_recordmodel.class.php:1162 PluginPrintercountersSearch->showSearch() ...ntercounters/front/item_recordmodel.form.php:61 PluginPrintercountersItem_Recordmodel->showRecordPlanning() 2017-10-18 15:39:18 [7@itsrv-05] PHP Warning(2): Invalid argument supplied for foreach() Backtrace : plugins/tag/hook.php:79 inc/search.class.php:4769 plugin_tag_giveItem() ...tercounters/inc/item_recordmodel.class.php:1423 Search::giveItem() ...tercounters/inc/item_recordmodel.class.php:1217 PluginPrintercountersItem_Recordmodel->formatSearchData() plugins/printercounters/inc/search.class.php:68 PluginPrintercountersItem_Recordmodel->countLines() plugins/printercounters/inc/search.class.php:320 PluginPrintercountersSearch->manageHistoryGetValues() ...tercounters/inc/item_recordmodel.class.php:1162 PluginPrintercountersSearch->showSearch() ...ntercounters/front/item_recordmodel.form.php:61 PluginPrintercountersItem_Recordmodel->showRecordPlanning() 2017-10-18 15:39:18 [7@itsrv-05] PHP Notice(8): Undefined offset: 8 Backtrace : inc/search.class.php:5002 ...tercounters/inc/item_recordmodel.class.php:1423 Search::giveItem() ...tercounters/inc/item_recordmodel.class.php:1217 PluginPrintercountersItem_Recordmodel->formatSearchData() plugins/printercounters/inc/search.class.php:68 PluginPrintercountersItem_Recordmodel->countLines() plugins/printercounters/inc/search.class.php:320 PluginPrintercountersSearch->manageHistoryGetValues() ...tercounters/inc/item_recordmodel.class.php:1162 PluginPrintercountersSearch->showSearch() ...ntercounters/front/item_recordmodel.form.php:61 PluginPrintercountersItem_Recordmodel->showRecordPlanning() 2017-10-18 15:39:18 [7@itsrv-05] PHP Notice(8): Undefined offset: 9 Backtrace : plugins/tag/hook.php:79 inc/search.class.php:4769 plugin_tag_giveItem() ...tercounters/inc/item_recordmodel.class.php:1423 Search::giveItem() ...tercounters/inc/item_recordmodel.class.php:1217 PluginPrintercountersItem_Recordmodel->formatSearchData() plugins/printercounters/inc/search.class.php:68 PluginPrintercountersItem_Recordmodel->countLines() plugins/printercounters/inc/search.class.php:320 PluginPrintercountersSearch->manageHistoryGetValues() ...tercounters/inc/item_recordmodel.class.php:1162 PluginPrintercountersSearch->showSearch() ...ntercounters/front/item_recordmodel.form.php:61 PluginPrintercountersItem_Recordmodel->showRecordPlanning() 2017-10-18 15:39:18 [7@itsrv-05] PHP Warning(2): Invalid argument supplied for foreach() Backtrace : plugins/tag/hook.php:79 inc/search.class.php:4769 plugin_tag_giveItem() ...tercounters/inc/item_recordmodel.class.php:1423 Search::giveItem() ...tercounters/inc/item_recordmodel.class.php:1217 PluginPrintercountersItem_Recordmodel->formatSearchData() plugins/printercounters/inc/search.class.php:68 PluginPrintercountersItem_Recordmodel->countLines() plugins/printercounters/inc/search.class.php:320 PluginPrintercountersSearch->manageHistoryGetValues() ...tercounters/inc/item_recordmodel.class.php:1162 PluginPrintercountersSearch->showSearch() ...ntercounters/front/item_recordmodel.form.php:61 PluginPrintercountersItem_Recordmodel->showRecordPlanning() 2017-10-18 15:39:18 [7@itsrv-05] PHP Notice(8): Undefined offset: 8 Backtrace : inc/search.class.php:5002 ...tercounters/inc/item_recordmodel.class.php:1423 Search::giveItem() ...tercounters/inc/item_recordmodel.class.php:1217 PluginPrintercountersItem_Recordmodel->formatSearchData() plugins/printercounters/inc/search.class.php:68 PluginPrintercountersItem_Recordmodel->countLines() plugins/printercounters/inc/search.class.php:320 PluginPrintercountersSearch->manageHistoryGetValues() ...tercounters/inc/item_recordmodel.class.php:1162 PluginPrintercountersSearch->showSearch() ...ntercounters/front/item_recordmodel.form.php:61 PluginPrintercountersItem_Recordmodel->showRecordPlanning() 2017-10-18 15:39:18 [7@itsrv-05] PHP Notice(8): Undefined offset: 9 Backtrace : plugins/tag/hook.php:79 inc/search.class.php:4769 plugin_tag_giveItem() ...tercounters/inc/item_recordmodel.class.php:1423 Search::giveItem() ...tercounters/inc/item_recordmodel.class.php:1217 PluginPrintercountersItem_Recordmodel->formatSearchData() plugins/printercounters/inc/search.class.php:68 PluginPrintercountersItem_Recordmodel->countLines() plugins/printercounters/inc/search.class.php:320 PluginPrintercountersSearch->manageHistoryGetValues() ...tercounters/inc/item_recordmodel.class.php:1162 PluginPrintercountersSearch->showSearch() ...ntercounters/front/item_recordmodel.form.php:61 PluginPrintercountersItem_Recordmodel->showRecordPlanning() 2017-10-18 15:39:18 [7@itsrv-05] PHP Warning(2): Invalid argument supplied for foreach() Backtrace : plugins/tag/hook.php:79 inc/search.class.php:4769 plugin_tag_giveItem() ...tercounters/inc/item_recordmodel.class.php:1423 Search::giveItem() ...tercounters/inc/item_recordmodel.class.php:1217 PluginPrintercountersItem_Recordmodel->formatSearchData() plugins/printercounters/inc/search.class.php:68 PluginPrintercountersItem_Recordmodel->countLines() plugins/printercounters/inc/search.class.php:320 PluginPrintercountersSearch->manageHistoryGetValues() ...tercounters/inc/item_recordmodel.class.php:1162 PluginPrintercountersSearch->showSearch() ...ntercounters/front/item_recordmodel.form.php:61 PluginPrintercountersItem_Recordmodel->showRecordPlanning() 2017-10-18 15:39:18 [7@itsrv-05] PHP Notice(8): Undefined offset: 8 Backtrace : inc/search.class.php:5002 ...tercounters/inc/item_recordmodel.class.php:1423 Search::giveItem() ...tercounters/inc/item_recordmodel.class.php:1217 PluginPrintercountersItem_Recordmodel->formatSearchData() plugins/printercounters/inc/search.class.php:68 PluginPrintercountersItem_Recordmodel->countLines() plugins/printercounters/inc/search.class.php:320 PluginPrintercountersSearch->manageHistoryGetValues() ...tercounters/inc/item_recordmodel.class.php:1162 PluginPrintercountersSearch->showSearch() ...ntercounters/front/item_recordmodel.form.php:61 PluginPrintercountersItem_Recordmodel->showRecordPlanning() 2017-10-18 15:39:18 [7@itsrv-05] *** PHP Notice(8): Undefined offset: 9 Backtrace : plugins/tag/hook.php:79 inc/search.class.php:4769 plugin_tag_giveItem() ...tercounters/inc/item_recordmodel.class.php:1423 Search::giveItem() ...tercounters/inc/item_recordmodel.class.php:1217 PluginPrintercountersItem_Recordmodel->formatSearchData() plugins/printercounters/inc/search.class.php:68 PluginPrintercountersItem_Recordmodel->countLines() plugins/printercounters/inc/search.class.php:320 PluginPrintercountersSearch->manageHistoryGetValues() ...tercounters/inc/item_recordmodel.class.php:1162 PluginPrintercountersSearch->showSearch() ...ntercounters/front/item_recordmodel.form.php:61 PluginPrintercountersItem_Recordmodel->showRecordPlanning()

Hope it helps to resolve the issue. Plugin is realy useful!!

amma35 commented 6 years ago

The plugin is not currently available for 9.2. Have you upgraded from what version the plugin?

grego1981 commented 6 years ago

I've just downloaded the master branch, the version is 1.4.0 and I upgraded from the latest release 1.3.0 which I had in GLPI 9.1.5 before I moved to 9.2

amma35 commented 6 years ago

The master branch is a development version. Chances are there are mistakes.

grego1981 commented 6 years ago

I agree, thought the error is exactly the same using older version with current release

amma35 commented 6 years ago

No errors in sql-error.log file? I can not reproduce your bug, an update has a bad time.

amma35 commented 6 years ago

I just noticed that you have the TAG plugin.

There is a conflict with the TAG plugin, two elements linked to printercounters should be added in the tag/inc/tag. class. php file in the getBlacklistItemtype () function:

         'PluginPrintercountersItem_Billingmodel',
         'PluginPrintercountersRecord',
grego1981 commented 6 years ago

Yes it works with the above patch! Thank you!