pluginsGLPI / treeview

Treeview GLPI plugin
GNU General Public License v2.0
5 stars 7 forks source link

GenericObject hook #32

Open fralla2 opened 3 years ago

fralla2 commented 3 years ago

Hi,

I've updated Treeview and genericObject plugins from the markerplace in GLPI today and upon testing, I can't see genericObject assets inside Treeview anymore.

The "Use treeview plugin" option inside genericObject is checked and that option was working before the update.

Not sure if it's coming from Treeview or genericObject since I get no error in php-errors.log or sql-errors.log files.

GLPI v 9.5.5 TreeView v1.9.1 GenericObject v2.11.0

image

image

image

Thanks Francois

stonebuzz commented 3 years ago

Hi @fralla2

with same version og GenericObject and Treeview I do not reproduce

even if the location/entity changes, Treeview always finds the objects of the GenericObject plugin.

Can you try this :

Logout from GLPI Empty the following folders (do not erase folder, juste it's content)

Best regards

fralla2 commented 3 years ago

Thanks for the really fast follow-up :) I emptied the _cache and _session folders + restarted the service on both my production and test environment but still don't see any genericObject items in the TreeView plugins.

On the test server, I was still on v1.9.0 of the plugins (instead of 1.9.1) and did not see them either.....

I suspect something might have changed on the genericObject' side or that the issue might be there since more than one version....

Is there a way to add more logging/debugging in the php files or something I could see on the html debugging side to help troubleshoot?

Thanks again Francois

stonebuzz commented 3 years ago

From setup.php file (genericobject folder)

Can you add this line

Toolbox::logInFile("generiobject_debug","Load ".$itemtype." object to Treeview ");

here

https://github.com/pluginsGLPI/genericobject/blob/e728d204a2a251dca387ae0a2ec83b775c098a41/setup.php#L147

Then, refresh GLPI page and check from log file (glpi/files/_logs/generiobject_debug.log) if GenericObjetc is load into Treeview.

fralla2 commented 3 years ago

2021-06-11 09:30:18 [1151@glpi] Load PluginGenericobjectProjecteur object to Treeview 2021-06-11 09:30:18 [1151@glpi] Load PluginGenericobjectTniepi object to Treeview 2021-06-11 09:30:37 [1151@glpi] Load PluginGenericobjectProjecteur object to Treeview 2021-06-11 09:30:37 [1151@glpi] Load PluginGenericobjectTniepi object to Treeview

Plugins seems to load correctly but it's like it can't find any genericObject assets in the locations it's supposed to....

Could this be related to the fact that installation of the plugins from the marketplace change the relative location of the pages it's supposed to load (glpi/marketplace/genericobject/ VS glpi/plugins/genericobject/) ?

I don't get any "page not found" in the ssl_error_log file but I know that was a problem with another plugins before (formcreator) that used to store form locations in the DB but the links were pointing to glpi/plugins/formcreator and it broke when installing from the marketplace....

Thanks

10.6.22.12 - - [11/Jun/2021:09:42:06 -0400] "GET /glpi/marketplace/treeview/left.php?nodes=9.0&openedType= HTTP/1.1" 200 26099 10.6.22.12 - - [11/Jun/2021:09:42:09 -0400] "GET /glpi/marketplace/treeview/left.php?nodes=158.9.0&openedType= HTTP/1.1" 200 28008 10.6.22.12 - - [11/Jun/2021:09:42:11 -0400] "GET /glpi/front/computer.php?is_deleted=0&criteria[0][field]=3&criteria[0][searchtype]=equals&criteria[0][value]=158&search=Rechercher&start=0&_glpi_csrf_token=5041d4c274ee6b13d54b2175734989c999b89589e0fd6abcecf452e3355362f9 HTTP/1.1" 200 148615 10.6.22.12 - - [11/Jun/2021:09:42:18 -0400] "GET /glpi/marketplace/treeview/index.php HTTP/1.1" 200 899 10.6.22.12 - - [11/Jun/2021:09:42:18 -0400] "GET /glpi/marketplace/treeview/left.php HTTP/1.1" 200 4638