ocsinventoryng icon indicating copy to clipboard operation
ocsinventoryng copied to clipboard

DataTable is not a function

Open zekuraz opened this issue 4 months ago • 2 comments

Hello !

When I arrive at the page where I can import new PCs, the table does not display.

Image

I have this error in the console

Image

I have other errors before

https://support.myentreprise.net/glpi/glpi/plugins/ocsinventoryng/lib/DataTables/datatables.min.css?v=a8cdfc91038f17173761c0e5246d0f999f5cbb45
[HTTP/1.1 404 Not Found 272ms]

The correct url must be https://support.myentreprise.net/glpi/plugins/ocsinventoryng/lib/DataTables/datatables.min.css?v=a8cdfc91038f17173761c0e5246d0f999f5cbb45

he adds a 'glpi' but i dont know why. i suppose the issue come the variable PLUGIN_OCS_WEBDIR

zekuraz avatar Oct 16 '25 06:10 zekuraz

If i edit OcsServer.php and replace all code like

echo Html::css(PLUGIN_OCS_WEBDIR . "/lib/DataTables/datatables.min.css");

by

echo Html::css("/plugins/ocsinventoryng/lib/DataTables/datatables.min.css");

it's work

zekuraz avatar Oct 16 '25 07:10 zekuraz

I think it's because you have two folder glpi on your url : https://support.myentreprise.net/glpi/glpi/

tsmr avatar Oct 21 '25 10:10 tsmr