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

GenericObject hook #32

Open
fralla2 opened this issue Jun 10, 2021 · 4 comments
Open

GenericObject hook #32

fralla2 opened this issue Jun 10, 2021 · 4 comments
Assignees

Comments

@fralla2
Copy link

fralla2 commented Jun 10, 2021

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
Copy link
Contributor

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)

  • /glpi/files/_cache/
  • /glpi/files/_session/
    Restart web server
    Login to GLPI

Best regards

@stonebuzz stonebuzz self-assigned this Jun 11, 2021
@fralla2
Copy link
Author

fralla2 commented Jun 11, 2021

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
Copy link
Contributor

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
Copy link
Author

fralla2 commented Jun 11, 2021

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

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

2 participants