You are not logged in.
Pages: 1
Topic closed
Hi,
I'm trying to connect networking port device or computer port to a special port manage by my plugin TransitNetwork (The plugin is for internal purpose only). I added the following line in the setup.php for the plugin
$CFG_GLPI["netport_types"][]=PLUGIN_TRANSITNETWORK_TYPE;
Now, the device "Transit Network" appears in the dropdown box for connection. But then things became ugly, unlike printer or computer no other dropdown boxes appears. After investigations, it seems the problem occured in dropdownConnectPortDeviceType.php at the line
if (isset($LINK_ID_TABLE[$_POST["type"]])&&$_POST["type"]>0). In fact, the $LINK_ID_TABLE global seems altered.
I printed the $LINK_ID_TABLE after the call for registerPluginType in my plugin and before the call to if (isset($LINK_ID_TABLE[$_POST["type"]])&&$_POST["type"]>0)
After registerPluginType :
Array ( [1] => glpi_computers [2] => glpi_networking [3] => glpi_printers [4] => glpi_monitors [5] => glpi_peripherals [6] => glpi_software [7] => glpi_contacts [8] => glpi_enterprises [9] => glpi_infocoms [10] => glpi_contracts [11] => glpi_cartridges_type [12] => glpi_type_docs [13] => glpi_docs [14] => glpi_kbitems [15] => glpi_users [16] => glpi_tracking [17] => glpi_consumables_type [18] => glpi_consumables [19] => glpi_cartridges [20] => glpi_softwarelicenses [21] => glpi_links [22] => [23] => glpi_phones [24] => ??? [25] => glpi_reminder [26] => ??? [27] => glpi_groups [28] => glpi_entities [29] => glpi_reservation_item [32] => glpi_ocs_config [33] => glpi_registry [34] => glpi_profiles [35] => glpi_mailgate [36] => glpi_rules_descriptions [37] => glpi_transfers [39] => glpi_softwareversions [41] => glpi_computerdisks [42] => glpi_networking_ports [43] => glpi_followups [1050] => glpi_plugin_room [13100] => glpi_plugin_transitnetwork_object )
We can see the two plugins already installed 1050 (room) et 13100 (mine).
Before checking type in dropdownConnectPortDeviceType.php :
Array ( [1] => glpi_computers [2] => glpi_networking [3] => glpi_printers [4] => glpi_monitors [5] => glpi_peripherals [6] => glpi_software [7] => glpi_contacts [8] => glpi_enterprises [9] => glpi_infocoms [10] => glpi_contracts [11] => glpi_cartridges_type [12] => glpi_type_docs [13] => glpi_docs [14] => glpi_kbitems [15] => glpi_users [16] => glpi_tracking [17] => glpi_consumables_type [18] => glpi_consumables [19] => glpi_cartridges [20] => glpi_softwarelicenses [21] => glpi_links [22] => [23] => glpi_phones [24] => ??? [25] => glpi_reminder [26] => ??? [27] => glpi_groups [28] => glpi_entities [29] => glpi_reservation_item [32] => glpi_ocs_config [33] => glpi_registry [34] => glpi_profiles [35] => glpi_mailgate [36] => glpi_rules_descriptions [37] => glpi_transfers [39] => glpi_softwareversions [41] => glpi_computerdisks [42] => glpi_networking_ports [43] => glpi_followups )
The two plugins have disappeared ..
I have tried different values for the plugin type 44, 90 and 24 did not work at all.
Any idea ?
Paolo.
Offline
Try to remove the $AJAX_INCLUDE=1; at the begining of dropdownConnectPortDeviceType.php
+
Dév. Fedora 29 - PHP 5.6/7.0/7.1/7.2/7.3/7.4 - MariaDB 10.3 - GLPI master
Certifié ITILv3 - RPM pour Fedora, RHEL et CentOS sur https://blog.remirepo.net/
Offline
That's right after the removal, things works better but we will give up this solution because we do NOT want to change GLPI and use plug-in instead to enhance the product.
However, my question is still valid. Is this a bug or a feature ;-)
Two weeks ago, i asked if it's possible to connect a NETWORK_TYPE object's port with a object managed in a plugin. The answer was yes. http://www.glpi-project.org/forum/viewt … p?id=16410
Is this still correct ? feature or bug ?
TIA,
Paolo.
Offline
> That's right after the removal, things works better
Fix commited
0.72 : https://forge.indepnet.net/repositories … i?rev=8929
trunk : https://forge.indepnet.net/repositories … i?rev=8928
> we do NOT want to change GLPI and use plug-in instead to enhance the product.
You're right. This is the good solution.
But there is no problem (I think) as this patch will be included in next release.
> feature or bug ?
Fixed bug
+
Dév. Fedora 29 - PHP 5.6/7.0/7.1/7.2/7.3/7.4 - MariaDB 10.3 - GLPI master
Certifié ITILv3 - RPM pour Fedora, RHEL et CentOS sur https://blog.remirepo.net/
Offline
Pages: 1
Topic closed