Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

No assets anymore in computer after addin business criticity column adding #1860

Closed
satyan01 opened this issue Feb 23, 2017 · 30 comments
Closed

Comments

@satyan01
Copy link

erro in sql log

2017-02-23 14:44:24 [854@UNGSRVGVA118]
*** MySQL query error:
SQL: SELECT 'YLA' AS currentuser,
glpi_computers.entities_id, glpi_computers.is_recursive, glpi_computers.name AS ITEM_0,
glpi_computers.id AS ITEM_0_id,
glpi_entities.completename AS ITEM_1, glpi_computers.serial AS ITEM_2, glpi_states.completename AS ITEM_3, glpi_groups.completename AS ITEM_4, glpi_computertypes.name AS ITEM_5, glpi_groups_groups_id_tech.completename AS ITEM_6, glpi_manufacturers.name AS ITEM_7, GROUP_CONCAT(DISTINCT CONCAT(IFNULL(glpi_ipaddresses_0cc35feab42e5909929ff742b4834540.name, 'NULL'),
'$#$',glpi_ipaddresses_0cc35feab42e5909929ff742b4834540.id) SEPARATOR '$$##$$')
AS ITEM_8,

              `glpi_computers`.`comment` AS `ITEM_9`,   `glpi_users`.`name` AS `ITEM_10`,
                    `glpi_users`.`realname` AS `ITEM_10_realname`,
                    `glpi_users`.`id`  AS `ITEM_10_id`,
                    `glpi_users`.`firstname` AS `ITEM_10_firstname`,
                    `glpi_locations`.`completename` AS `ITEM_11`,  `glpi_computermodels`.`name` AS `ITEM_12`,  `glpi_plugin_fusioninventory_inventorycomputercomputers_id`.`last_fusioninventory_update` AS `ITEM_13`,  `glpi_operatingsystems`.`name` AS `ITEM_14`,   GROUP_CONCAT(DISTINCT CONCAT(IFNULL(`glpi_items_devicenetworkcards`.`mac`, \'__NULL__\'),
                                           \'$#$\',`glpi_items_devicenetworkcards`.`id`) SEPARATOR \'$$##$$\')
                          AS `ITEM_15`,
              
               GROUP_CONCAT(DISTINCT CONCAT(IFNULL(`glpi_businesscriticities_93d644b41c3544155af36e354b01ba13`.`completename`, \'__NULL__\'),
                                           \'$#$\',`glpi_businesscriticities_93d644b41c3544155af36e354b01ba13`.`id`) SEPARATOR \'$$##$$\')
                          AS `ITEM_16`,
              
              `glpi_computers`.`id` AS id  FROM `glpi_computers`LEFT JOIN `glpi_entities` 
                                      ON (`glpi_computers`.`entities_id` = `glpi_entities`.`id`
                                          )LEFT JOIN `glpi_states` 
                                      ON (`glpi_computers`.`states_id` = `glpi_states`.`id`
                                          )LEFT JOIN `glpi_groups` 
                                      ON (`glpi_computers`.`groups_id` = `glpi_groups`.`id`
                                          )LEFT JOIN `glpi_computertypes` 
                                      ON (`glpi_computers`.`computertypes_id` = `glpi_computertypes`.`id`
                                          )LEFT JOIN `glpi_groups`  AS `glpi_groups_groups_id_tech`
                                      ON (`glpi_computers`.`groups_id_tech` = `glpi_groups_groups_id_tech`.`id`
                                          )LEFT JOIN `glpi_manufacturers` 
                                      ON (`glpi_computers`.`manufacturers_id` = `glpi_manufacturers`.`id`
                                          ) LEFT JOIN `glpi_ipaddresses`  AS `glpi_ipaddresses_0cc35feab42e5909929ff742b4834540`
                                      ON (`glpi_computers`.`id` = `glpi_ipaddresses_0cc35feab42e5909929ff742b4834540`.`mainitems_id`
                                          AND `glpi_ipaddresses_0cc35feab42e5909929ff742b4834540`.`mainitemtype` = \'Computer\'
                                          AND `glpi_ipaddresses_0cc35feab42e5909929ff742b4834540`.`is_deleted` = 0 ) LEFT JOIN `glpi_users` 
                                      ON (`glpi_computers`.`users_id` = `glpi_users`.`id`
                                          )LEFT JOIN `glpi_locations` 
                                      ON (`glpi_computers`.`locations_id` = `glpi_locations`.`id`
                                          )LEFT JOIN `glpi_computermodels` 
                                      ON (`glpi_computers`.`computermodels_id` = `glpi_computermodels`.`id`
                                          ) LEFT JOIN `glpi_plugin_fusioninventory_inventorycomputercomputers`
                AS glpi_plugin_fusioninventory_inventorycomputercomputers_id
                ON (`glpi_computers`.`id` = `glpi_plugin_fusioninventory_inventorycomputercomputers_id`.`computers_id` ) LEFT JOIN `glpi_operatingsystems` 
                                      ON (`glpi_computers`.`operatingsystems_id` = `glpi_operatingsystems`.`id`
                                          ) LEFT JOIN `glpi_items_devicenetworkcards` 
                                      ON (`glpi_computers`.`id` = `glpi_items_devicenetworkcards`.`items_id`
                                          AND `glpi_items_devicenetworkcards`.`itemtype` = \'Computer\'
                                          )  LEFT JOIN `glpi_infocoms` 
                                      ON (`glpi_computers`.`id` = `glpi_infocoms`.`items_id`
                                          AND `glpi_infocoms`.`itemtype` = \'Computer\'
                                          ) LEFT JOIN `glpi_businesscriticities`  AS `glpi_businesscriticities_93d644b41c3544155af36e354b01ba13`
                                      ON (`glpi_infocoms`.`businesscriticities_id` = `glpi_businesscriticities_93d644b41c3544155af36e354b01ba13`.`id`
                                          ) WHERE  `glpi_computers`.`is_deleted` = \'0\'  AND `glpi_computers`.`is_template` = \'0\'  GROUP BY `glpi_computers`.`id` ORDER BY ITEM_0 ASC  LIMIT 0, 50

Error: Table 'glpidb91.glpi_businesscriticities' doesn't exist
Backtrace :
inc\search.class.php:915
inc\search.class.php:97 Search::constructDatas()
inc\search.class.php:80 Search::showList()
front\computer.php:44 Search::show()

@wawax
Copy link

wawax commented Feb 23, 2017

Hello,

Are you using a dev version ?

Thanks.

@satyan01
Copy link
Author

PHP Warning: Declaration of PluginFusioninventoryCollect::getSearchOptionsToAdd() should be compatible with CommonDBTM::getSearchOptionsToAdd($itemtype = NULL) in C:\inetpub\wwwroot\glpi\plugins\fusioninventory\inc\collect.class.php at line 0

@satyan01
Copy link
Author

glpi 9.2

@satyan01 satyan01 changed the title No assets anymore in computer after addin business criticity column No assets anymore in computer after addin business criticity column adding Feb 23, 2017
@satyan01
Copy link
Author

even if I delete fusioninventory plugin I have the same error. database is ok but computers displays nothing

image

@satyan01
Copy link
Author

log: 2017-02-24 09:03:06 [597@UNGSRVGVA118]
*** PHP Notice(8): Undefined index: field
Backtrace :
inc\search.class.php:5625
ajax\searchoption.php:66 Search::getActionsFor()
ajax\searchrow.php:186 include()

@satyan01
Copy link
Author

2017-02-24 09:03:35 [854@UNGSRVGVA118]
*** MySQL query error:
SQL: SELECT 'YLA' AS currentuser,
glpi_computers.entities_id, glpi_computers.is_recursive, glpi_computers.name AS ITEM_0,
glpi_computers.id AS ITEM_0_id,
glpi_entities.completename AS ITEM_1, glpi_computers.serial AS ITEM_2, glpi_states.completename AS ITEM_3, glpi_groups.completename AS ITEM_4, glpi_computertypes.name AS ITEM_5, glpi_groups_groups_id_tech.completename AS ITEM_6, glpi_manufacturers.name AS ITEM_7, GROUP_CONCAT(DISTINCT CONCAT(IFNULL(glpi_ipaddresses_0cc35feab42e5909929ff742b4834540.name, 'NULL'),
'$#$',glpi_ipaddresses_0cc35feab42e5909929ff742b4834540.id) SEPARATOR '$$##$$')
AS ITEM_8,

              `glpi_computers`.`comment` AS `ITEM_9`,   `glpi_users`.`name` AS `ITEM_10`,
                    `glpi_users`.`realname` AS `ITEM_10_realname`,
                    `glpi_users`.`id`  AS `ITEM_10_id`,
                    `glpi_users`.`firstname` AS `ITEM_10_firstname`,
                    `glpi_locations`.`completename` AS `ITEM_11`,  `glpi_computermodels`.`name` AS `ITEM_12`,  `glpi_plugin_fusioninventory_inventorycomputercomputers_id`.`last_fusioninventory_update` AS `ITEM_13`,  `glpi_operatingsystems`.`name` AS `ITEM_14`,   GROUP_CONCAT(DISTINCT CONCAT(IFNULL(`glpi_items_devicenetworkcards`.`mac`, \'__NULL__\'),
                                           \'$#$\',`glpi_items_devicenetworkcards`.`id`) SEPARATOR \'$$##$$\')
                          AS `ITEM_15`,
              
               GROUP_CONCAT(DISTINCT CONCAT(IFNULL(`glpi_businesscriticities_93d644b41c3544155af36e354b01ba13`.`completename`, \'__NULL__\'),
                                           \'$#$\',`glpi_businesscriticities_93d644b41c3544155af36e354b01ba13`.`id`) SEPARATOR \'$$##$$\')
                          AS `ITEM_16`,
              
              `glpi_computers`.`id` AS id  FROM `glpi_computers`LEFT JOIN `glpi_entities` 
                                      ON (`glpi_computers`.`entities_id` = `glpi_entities`.`id`
                                          )LEFT JOIN `glpi_states` 
                                      ON (`glpi_computers`.`states_id` = `glpi_states`.`id`
                                          )LEFT JOIN `glpi_groups` 
                                      ON (`glpi_computers`.`groups_id` = `glpi_groups`.`id`
                                          )LEFT JOIN `glpi_computertypes` 
                                      ON (`glpi_computers`.`computertypes_id` = `glpi_computertypes`.`id`
                                          )LEFT JOIN `glpi_groups`  AS `glpi_groups_groups_id_tech`
                                      ON (`glpi_computers`.`groups_id_tech` = `glpi_groups_groups_id_tech`.`id`
                                          )LEFT JOIN `glpi_manufacturers` 
                                      ON (`glpi_computers`.`manufacturers_id` = `glpi_manufacturers`.`id`
                                          ) LEFT JOIN `glpi_ipaddresses`  AS `glpi_ipaddresses_0cc35feab42e5909929ff742b4834540`
                                      ON (`glpi_computers`.`id` = `glpi_ipaddresses_0cc35feab42e5909929ff742b4834540`.`mainitems_id`
                                          AND `glpi_ipaddresses_0cc35feab42e5909929ff742b4834540`.`mainitemtype` = \'Computer\'
                                          AND `glpi_ipaddresses_0cc35feab42e5909929ff742b4834540`.`is_deleted` = 0 ) LEFT JOIN `glpi_users` 
                                      ON (`glpi_computers`.`users_id` = `glpi_users`.`id`
                                          )LEFT JOIN `glpi_locations` 
                                      ON (`glpi_computers`.`locations_id` = `glpi_locations`.`id`
                                          )LEFT JOIN `glpi_computermodels` 
                                      ON (`glpi_computers`.`computermodels_id` = `glpi_computermodels`.`id`
                                          ) LEFT JOIN `glpi_plugin_fusioninventory_inventorycomputercomputers`
                AS glpi_plugin_fusioninventory_inventorycomputercomputers_id
                ON (`glpi_computers`.`id` = `glpi_plugin_fusioninventory_inventorycomputercomputers_id`.`computers_id` ) LEFT JOIN `glpi_operatingsystems` 
                                      ON (`glpi_computers`.`operatingsystems_id` = `glpi_operatingsystems`.`id`
                                          ) LEFT JOIN `glpi_items_devicenetworkcards` 
                                      ON (`glpi_computers`.`id` = `glpi_items_devicenetworkcards`.`items_id`
                                          AND `glpi_items_devicenetworkcards`.`itemtype` = \'Computer\'
                                          )  LEFT JOIN `glpi_infocoms` 
                                      ON (`glpi_computers`.`id` = `glpi_infocoms`.`items_id`
                                          AND `glpi_infocoms`.`itemtype` = \'Computer\'
                                          ) LEFT JOIN `glpi_businesscriticities`  AS `glpi_businesscriticities_93d644b41c3544155af36e354b01ba13`
                                      ON (`glpi_infocoms`.`businesscriticities_id` = `glpi_businesscriticities_93d644b41c3544155af36e354b01ba13`.`id`
                                          ) WHERE  `glpi_computers`.`is_deleted` = \'0\'  AND `glpi_computers`.`is_template` = \'0\'  GROUP BY `glpi_computers`.`id` ORDER BY ITEM_0 ASC  LIMIT 0, 50

Error: Unknown column 'glpi_infocoms.businesscriticities_id' in 'on clause'
Backtrace :
inc\search.class.php:915
inc\search.class.php:97 Search::constructDatas()
inc\search.class.php:80 Search::showList()
front\computer.php:44 Search::show()

@trasher
Copy link
Contributor

trasher commented Feb 24, 2017

This seem to be related to the fusioninventory plugin since there are references to glpi_plugin_fusioninventory tables in your logs.

Please make sure this is really GLPI related.
Also note that plugins (not only FI) may not be compatible yet and can cause several issues.

Feel free to reopen if there is still an issue when all plugins are entirely uninstalled.

@trasher trasher closed this as completed Feb 24, 2017
@satyan01
Copy link
Author

I have already delete all plugins and I have the same issue

@trasher
Copy link
Contributor

trasher commented Feb 24, 2017

So please provide the real logs.

@satyan01
Copy link
Author

i have just that
2017-02-24 09:16:15 [854@UNGSRVGVA218]
*** PHP Warning(2): Declaration of PluginFusioninventoryCollect::getSearchOptionsToAdd() should be compatible with CommonDBTM::getSearchOptionsToAdd($itemtype = NULL)
Backtrace :
inc\autoload.function.php:326
inc\autoload.function.php:326 include_once()
: glpi_autoload()
plugins\fusioninventory\inc\menu.class.php:149 spl_autoload_call()
inc\commonglpi.class.php:292 PluginFusioninventoryMenu::getAdditionalMenuOptions()
inc\html.class.php:1368 CommonGLPI::getMenuContent()
front\plugin.php:94 Html::header()

@satyan01
Copy link
Author

all plugins are uninstalled , do I have to delete all in the folder plugins ?

@satyan01
Copy link
Author

logs sql

2017-02-24 09:19:05 [854@UNGSRVGVA218]
*** MySQL query error:
SQL: SELECT 'YLA' AS currentuser,
glpi_computers.entities_id, glpi_computers.is_recursive, glpi_computers.name AS ITEM_0,
glpi_computers.id AS ITEM_0_id,
glpi_entities.completename AS ITEM_1, glpi_computers.serial AS ITEM_2, glpi_states.completename AS ITEM_3, glpi_groups.completename AS ITEM_4, glpi_computertypes.name AS ITEM_5, glpi_groups_groups_id_tech.completename AS ITEM_6, glpi_manufacturers.name AS ITEM_7, GROUP_CONCAT(DISTINCT CONCAT(IFNULL(glpi_ipaddresses_0cc35feab42e5909929ff742b4834540.name, 'NULL'),
'$#$',glpi_ipaddresses_0cc35feab42e5909929ff742b4834540.id) SEPARATOR '$$##$$')
AS ITEM_8,

              `glpi_computers`.`comment` AS `ITEM_9`,   `glpi_users`.`name` AS `ITEM_10`,
                    `glpi_users`.`realname` AS `ITEM_10_realname`,
                    `glpi_users`.`id`  AS `ITEM_10_id`,
                    `glpi_users`.`firstname` AS `ITEM_10_firstname`,
                    `glpi_locations`.`completename` AS `ITEM_11`,  `glpi_computermodels`.`name` AS `ITEM_12`,  `glpi_operatingsystems`.`name` AS `ITEM_13`,   GROUP_CONCAT(DISTINCT CONCAT(IFNULL(`glpi_items_devicenetworkcards`.`mac`, \'__NULL__\'),
                                           \'$#$\',`glpi_items_devicenetworkcards`.`id`) SEPARATOR \'$$##$$\')
                          AS `ITEM_14`,
              
               GROUP_CONCAT(DISTINCT CONCAT(IFNULL(`glpi_businesscriticities_93d644b41c3544155af36e354b01ba13`.`completename`, \'__NULL__\'),
                                           \'$#$\',`glpi_businesscriticities_93d644b41c3544155af36e354b01ba13`.`id`) SEPARATOR \'$$##$$\')
                          AS `ITEM_15`,
              
              `glpi_computers`.`id` AS id  FROM `glpi_computers`LEFT JOIN `glpi_entities` 
                                      ON (`glpi_computers`.`entities_id` = `glpi_entities`.`id`
                                          )LEFT JOIN `glpi_states` 
                                      ON (`glpi_computers`.`states_id` = `glpi_states`.`id`
                                          )LEFT JOIN `glpi_groups` 
                                      ON (`glpi_computers`.`groups_id` = `glpi_groups`.`id`
                                          )LEFT JOIN `glpi_computertypes` 
                                      ON (`glpi_computers`.`computertypes_id` = `glpi_computertypes`.`id`
                                          )LEFT JOIN `glpi_groups`  AS `glpi_groups_groups_id_tech`
                                      ON (`glpi_computers`.`groups_id_tech` = `glpi_groups_groups_id_tech`.`id`
                                          )LEFT JOIN `glpi_manufacturers` 
                                      ON (`glpi_computers`.`manufacturers_id` = `glpi_manufacturers`.`id`
                                          ) LEFT JOIN `glpi_ipaddresses`  AS `glpi_ipaddresses_0cc35feab42e5909929ff742b4834540`
                                      ON (`glpi_computers`.`id` = `glpi_ipaddresses_0cc35feab42e5909929ff742b4834540`.`mainitems_id`
                                          AND `glpi_ipaddresses_0cc35feab42e5909929ff742b4834540`.`mainitemtype` = \'Computer\'
                                          AND `glpi_ipaddresses_0cc35feab42e5909929ff742b4834540`.`is_deleted` = 0 ) LEFT JOIN `glpi_users` 
                                      ON (`glpi_computers`.`users_id` = `glpi_users`.`id`
                                          )LEFT JOIN `glpi_locations` 
                                      ON (`glpi_computers`.`locations_id` = `glpi_locations`.`id`
                                          )LEFT JOIN `glpi_computermodels` 
                                      ON (`glpi_computers`.`computermodels_id` = `glpi_computermodels`.`id`
                                          )LEFT JOIN `glpi_operatingsystems` 
                                      ON (`glpi_computers`.`operatingsystems_id` = `glpi_operatingsystems`.`id`
                                          ) LEFT JOIN `glpi_items_devicenetworkcards` 
                                      ON (`glpi_computers`.`id` = `glpi_items_devicenetworkcards`.`items_id`
                                          AND `glpi_items_devicenetworkcards`.`itemtype` = \'Computer\'
                                          )  LEFT JOIN `glpi_infocoms` 
                                      ON (`glpi_computers`.`id` = `glpi_infocoms`.`items_id`
                                          AND `glpi_infocoms`.`itemtype` = \'Computer\'
                                          ) LEFT JOIN `glpi_businesscriticities`  AS `glpi_businesscriticities_93d644b41c3544155af36e354b01ba13`
                                      ON (`glpi_infocoms`.`businesscriticities_id` = `glpi_businesscriticities_93d644b41c3544155af36e354b01ba13`.`id`
                                          ) WHERE  `glpi_computers`.`is_deleted` = \'0\'  AND `glpi_computers`.`is_template` = \'0\'  GROUP BY `glpi_computers`.`id` ORDER BY ITEM_0 ASC  LIMIT 0, 50

Error: Unknown column 'glpi_infocoms.businesscriticities_id' in 'on clause'
Backtrace :
inc\search.class.php:915
inc\search.class.php:97 Search::constructDatas()
inc\search.class.php:80 Search::showList()
front\computer.php:44 Search::show()

@satyan01
Copy link
Author

fields Name: Additionnal fields Version: 1.3.2 State: Not installed
news Name: Alerts Version: 0.90-1.3 State: Not installed
badges Name: Badges Version: 2.2.0 State: Not installed
behaviors Name: Behaviours Version: 1.1 State: Not installed
positions Name: Cartography Version: 4.3.1 State: Not installed
certificates Name: Certificates Version: 2.2.0 State: Not installed
dashboard Name: Dashboard Version: 0.7.7 State: Not installed
databases Name: Databases Version: 1.9.0 State: Not installed
escalade Name: Escalation Version: 2.1.0 State: Not installed
formcreator Name: Forms Version: 0.90-1.4-beta7 State: Not installed
fpsoftware Name: FP Software Version: 1.1.0 State: Not installed
fusioninventory Name: FusionInventory Version: 9.1+1.0 State: Not installed
resources Name: Human Resources Version: 2.3.1 State: Not installed
uninstall Name: Item's uninstallation Version: 0.90-1.4 State: Not installed
genericobject Name: Objects management Version: 2.4.0 State: Not installed
reservation Name: Réservation Version: 1.3.2 State: Not installed
simcard Name: Sim cards management Version: 1.4.2 State: Not installed
ticketcleaner Name: Ticket Cleaner Version: 2.0.4 State: Not installed
timelineticket Name: Timeline of tickets Version: 0.90+1.0 State: Not installed
timezones Name: Timezones Version: 2.0.2 State: Not activated
webapplications Name: Web applications Version: 2.2.0 State: Not installed
webservices Name: Web Services Version: 1.6.0 State: Not installed

@trasher
Copy link
Contributor

trasher commented Feb 24, 2017

OK, the last log no longer reference fusioninventory; so the issue is in the core. Reopening.

@trasher trasher reopened this Feb 24, 2017
@trasher
Copy link
Contributor

trasher commented Feb 24, 2017

I've checked; the field that is reported as missing should exists in the database (it is present in both empty schema and upgrade scripts).

So:

  • check if your infocom table do have a businesscriticities_id field
  • if not, run again update script

@satyan01
Copy link
Author

Could you tell me which script to launch please ?

@trasher
Copy link
Contributor

trasher commented Feb 24, 2017

You have to upgrade or reinstall you GLPI instance.

@satyan01
Copy link
Author

ok thx

@satyan01
Copy link
Author

satyan01 commented Feb 24, 2017

I tried but I have this message

image

@satyan01
Copy link
Author

satyan01 commented Feb 24, 2017

not fixed by composer upgrade
image

@trasher
Copy link
Contributor

trasher commented Feb 24, 2017

I've not talked about "composer"; the issue is in your database. Check empty.sql file to do it manually.

@satyan01
Copy link
Author

what is the result of this script ? it will not empty my database ? or erase data ?

@satyan01
Copy link
Author

I have done it on staging issue is not fixed.

Great thx for your help

@satyan01
Copy link
Author

it has been empty my database

@satyan01
Copy link
Author

and business criticity is not in infocom

@satyan01
Copy link
Author

I have installed the last version of glpi and copy my database, it works but i have a question, during database copy i have this message
image

@trasher
Copy link
Contributor

trasher commented Feb 24, 2017

I don't know. As far as I can see, there never been any date_creation field in the clpi_changetasks table.

@trasher trasher closed this as completed Feb 24, 2017
@satyan01
Copy link
Author

the issue seems to come from my profile, for other users it works correctly

@satyan01
Copy link
Author

it is just when I am in super admin profile

@satyan01
Copy link
Author

PHP Warning: array_map(): Argument #2 should be an array in C:\inetpub\wwwroot\glpi\inc\toolbox.class.php at line 2567
PHP Warning: array_map(): Argument #2 should be an array in C:\inetpub\wwwroot\glpi\inc\toolbox.class.php at line 2568
Fatal error: Uncaught Error: Class 'Glpi\Event' not found in C:\inetpub\wwwroot\glpi\front\preference.php:63 Stack trace: #0 {main} thrown in C:\inetpub\wwwroot\glpi\front\preference.php on line 63

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants