No Referenceable Objects in Location List of Server/Switch etc.
-
Hello Everybody,
We are using I-Doit 0.9.9-8 PRO as a productive system and a 0.9.9-9 PRO as testing environment.
The problem is the following:
On the -9 Version i can simply reference location-objects by editing the location property in any switch or server etc, but on the -8 Version, i cant because the location-popup is just blank.( when i click on rooms or buildings, they are all there )
I did a little bit of debugging and figured out that there is a little difference beetween the SQL querys which should get the locations list.
On the normal Working -9 the SQL Statement is:
SELECT (SELECT COUNT(child.isys_catg_location_list__id) FROM isys_catg_location_list child INNER JOIN isys_obj childObject ON child.isys_catg_location_list__isys_obj__id = childObject.isys_obj__id INNER JOIN isys_obj_type childType ON childObject.isys_obj__isys_obj_type__id = childType.isys_obj_type__id INNER JOIN isys_cmdb_status ON childObject.isys_obj__isys_cmdb_status__id = isys_cmdb_status__id WHERE child.isys_catg_location_list__parentid = parentObject.isys_obj__id AND childType.isys_obj_type__container = 1) AS ChildrenCount, parent.*, parentObject.*, parentType.* FROM isys_catg_location_list parent INNER JOIN isys_obj parentObject ON parent.isys_catg_location_list__isys_obj__id = parentObject.isys_obj__id INNER JOIN isys_obj_type parentType ON parentObject.isys_obj__isys_obj_type__id = parentType.isys_obj_type__id WHERE TRUE AND parent.isys_catg_location_list__parentid = '1' AND parentType.isys_obj_type__container = 1 AND parentObject.isys_obj__status = '2' GROUP BY parent.isys_catg_location_list__id ORDER BY parentObject.isys_obj__title
and the not working code of the -8 Version is :
SELECT (SELECT COUNT(child.isys_catg_location_list__id) FROM isys_catg_location_list child INNER JOIN isys_obj childObject ON child.isys_catg_location_list__isys_obj__id = childObject.isys_obj__id INNER JOIN isys_obj_type childType ON childObject.isys_obj__isys_obj_type__id = childType.isys_obj_type__id INNER JOIN isys_cmdb_status ON childObject.isys_obj__isys_cmdb_status__id = isys_cmdb_status__id WHERE child.isys_catg_location_list__parentid = parentObject.isys_obj__id AND childType.isys_obj_type__container = 1) AS ChildrenCount, parent.*, parentObject.*, parentType.* FROM isys_catg_location_list parent INNER JOIN isys_obj parentObject ON parent.isys_catg_location_list__isys_obj__id = parentObject.isys_obj__id INNER JOIN isys_obj_type parentType ON parentObject.isys_obj__isys_obj_type__id = parentType.isys_obj_type__id WHERE TRUE AND parent.isys_catg_location_list__isys_obj__id = '1' AND parentType.isys_obj_type__container = 1 AND parentObject.isys_obj__status = '2' GROUP BY parent.isys_catg_location_list__id ORDER BY parentObject.isys_obj__title
( sorry for posting the whole sql statement..)
the difference beetween these two statements is at:
… WHERE TRUE AND parent.isys_catg_location_list__isys_obj__id = '1' ... -> wrong statement
... WHERE TRUE AND parent.isys_catg_location_list__parentid = '1' ... -> correct statementi have testet both statements on both databases directy in sql and the wrong statement always returns 1 result ( the root location ) and the korrekt statement returns the correct list of locations in both versions.
So i guess there went something wrong with the SQL statement.
is there any possibility to change how the SQL statement is builded, just to see if something changes?
Or do you have any other ideas?I will be grateful for any help you can provide.
Duffkess -
I recovered the programms folder from a few weeks ago and tried it again. I could see that the i-doit used the correct sql statement (the one from the -9 version) a few weeks ago, but i have no idea how this could be happen..
-
Hello,
have you installed any third party modules or extensions? The program-files are never altered at runtime (this just happenes during setup and i-doit updates).
Also the i-doit system does not try to optimize queries, it just builds queries together - depending on which data is being called.I think the queries you are looking for can be found inside src/classes/cmdb/dao/category/global/isys_cmdb_dao_category_g_location.class.php
-
I have uploaded files to remote server but all the files have a ? mark on them , What does this mean ..