You are not logged in.

Announcement

 Téléchargez la dernière version stable de GLPI      -     Et vous, que pouvez vous faire pour le projet GLPI ? :  Contribuer
 Download last stable version of GLPI                      -     What can you do for GLPI ? :  Contribute

#1 2025-03-07 10:10:59

ITPM
Member
Registered: 2022-06-20
Posts: 16

Missing network adapters

Hello,
we have a problem with network adapters. In some of computers we added network adapters manually like:
Zrzut-ekranu-2025-03-07-090418.png

Every full import or command "c:\Program Files\GLPI-Agent\glpi-agent.bat" --force --full
delete all manually added adapters.

We use:
GLPI: 10.0.18
GLPI-Inventory 1.5.0
GLPI-Agent 1.12

How to disable autoremove adapters?

Last edited by ITPM (2025-03-07 10:12:31)

Offline

#2 2025-03-07 10:36:13

WebGreg
Member
Registered: 2020-02-27
Posts: 771

Re: Missing network adapters

Hi

I wanted to check if it is possible to set it to front/lockedfield.form.php > add global lock but I have:

Uncaught Exception TypeError: Lockedfield::canAccessItemEntity(): Argument #2 ($items_id) must be of type int, string given, called in /var/www/html/glpi/src/Lockedfield.php on line 73 in /var/www/html/glpi/src/Lockedfield.php at line 104


--
GLPI 10.0.18
GLPI-Inventory 1.5.0
Ubuntu Server 20.04 LTS

Offline

#3 2025-03-07 11:04:53

ITPM
Member
Registered: 2022-06-20
Posts: 16

Re: Missing network adapters

WebGreg wrote:

Hi

I wanted to check if it is possible to set it to front/lockedfield.form.php > add global lock but I have:

Uncaught Exception TypeError: Lockedfield::canAccessItemEntity(): Argument #2 ($items_id) must be of type int, string given, called in /var/www/html/glpi/src/Lockedfield.php on line 73 in /var/www/html/glpi/src/Lockedfield.php at line 104


Thanks for reply.

I check global lock and "Add global lock" doesn't work. When i click button its show only empty page
Zrzut-ekranu-2025-03-07-100306.png

And in Debug mode also see:
Uncaught Exception TypeError: Lockedfield::canAccessItemEntity(): Argument #2 ($items_id) must be of type int, string given, called in /var/www/html/glpi/src/Lockedfield.php on line 73 in /var/www/html/glpi/src/Lockedfield.php at line 104

Last edited by ITPM (2025-03-07 11:07:53)

Offline

#4 2025-03-07 11:31:10

WebGreg
Member
Registered: 2020-02-27
Posts: 771

Re: Missing network adapters

Thanks for the confirmation. I'll report it as a bug. Unfortunately, we can't check at the moment whether you can set it there smile


--
GLPI 10.0.18
GLPI-Inventory 1.5.0
Ubuntu Server 20.04 LTS

Offline

#5 2025-03-07 11:56:50

ITPM
Member
Registered: 2022-06-20
Posts: 16

Re: Missing network adapters

Thanks smile

Offline

#6 2025-03-07 12:28:38

WebGreg
Member
Registered: 2020-02-27
Posts: 771

Re: Missing network adapters

Change your file according to this:

https://github.com/glpi-project/glpi/pull/19126/files

Adding a global lock should work. There's something called "network port - name". Try that. But I don't know if that's what you're looking for.


--
GLPI 10.0.18
GLPI-Inventory 1.5.0
Ubuntu Server 20.04 LTS

Offline

#7 2025-03-07 15:15:43

ITPM
Member
Registered: 2022-06-20
Posts: 16

Re: Missing network adapters

Now Lockedfield.php loading selectbox but network port - name do nothing sad

Zrzut-ekranu-2025-03-07-140854.png

Zrzut-ekranu-2025-03-07-141022.png

And after full import manually added network adapter is gone

Is any solution to collect networks from computer but no delete old/disconnected?

Offline

#8 2025-03-07 15:44:13

WebGreg
Member
Registered: 2020-02-27
Posts: 771

Re: Missing network adapters

Sorry, but I don't have a way to verify this, so I'll just throw it out there... maybe here? front/networkporttype.php

Or try create own rule: front/ruleimportasset.php

Also check out this: front/inventory.conf.php

Last edited by WebGreg (2025-03-07 15:48:16)


--
GLPI 10.0.18
GLPI-Inventory 1.5.0
Ubuntu Server 20.04 LTS

Offline

#9 2025-03-14 17:09:31

ITPM
Member
Registered: 2022-06-20
Posts: 16

Re: Missing network adapters

I restore glpi/src/Inventory/Asset/InventoryNetworkPort.php
from version 10.0.17 and now its work ok.
Manually added ports is still here after periodic full import

Anyway thanks smile

Offline

Board footer

Powered by FluxBB