Hacktoberfest 2026: the issues maintainers tagged for October, open and beginner-friendly. Browse Hacktoberfest issues

Report: link to custom assets (GLPI 11+/12 asset definitions) leads to "item not found"

Open Beginner friendly
#127 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
2/5
Estimated time
1-3 hours
Newbie friendliness
78/100
Issue type
Bug
Clarity
Clearly specified
Activity status
Active
Tech stack
php
Domain
backend

Research direction

The bad link is built in src/Report.php around line 203, where Toolbox::getItemTypeFormURL() is used for the "Connected to" column. The issue says $item is already instantiated for each row, so check that the row loop has it in scope and that custom assets override getFormURL(). Reproduce with a custom asset that has the "Network ports" capacity on an IP range. Done when the link opens the asset form for custom assets and core links such as computers still resolve to their existing form URLs.

Written by the indexing model from the issue text.

Description

Version: addressing 3.3.0, GLPI 12.0.0

Steps to reproduce

  1. Create a custom asset definition with the "Network ports" capacity.
  2. Give an asset of this type a network port with an IP inside a range (e.g. via the reservation form).
  3. Open the range report and click the asset name in the "Connected to" column.

Expected: the asset form opens.
Actual: "The requested item has not been found".

Cause
src/Report.php (line 203) builds the link with
Toolbox::getItemTypeFormURL($line['itemtype']) . '?id=' . …, which derives a file name from the class:

URL
generated /front/customasset/ip_reservierungasset.form.php?id=12
correct /front/asset/asset.form.php?class=IP_Reservierung&id=12

Custom assets override getFormURL(); Toolbox::getItemTypeFormURL() does not know about that.

Fix
$item is already instantiated for the row a few lines above, so:

$row['device'] = self::newCell(
    $label,
    $item::getFormURLWithID((int) $line['on_device']),
);

The result is the same as before for core types (e.g. /front/computer.form.php?id=12).

Dominant language
PHP
Stars
43
Forks
24
Avg merge
1h 4m
Merged PRs (30d)
5

Getting set up

This project ships no dev container, Dockerfile or contributing guide, so setting up is up to you: start from its README, and see our first-contribution guide for the general steps.

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from pluginsGLPI/addressing

All issues in pluginsGLPI/addressing

Similar issues

More PHP issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.