[Bug] Block name not displayed as clickable link in Fields plugin list #1026
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
The getNameField() method returns 'label' instead of 'name', so the CommonDBTM logic does not render a link.
Bug Description
When viewing the list of blocks in Setup → Plugins → Fields → Blocks, the column Name shows plain text instead of a clickable link to edit the block.
Expected behavior:
Each block name should appear as a clickable hyperlink to the block’s form.
Steps to Reproduce
Expected Result
The “Name” column should contain clickable links leading to the edit form of each block.
Root Cause
In
inc/container.class.php
, the method:The rawSearchOptions() method defines:
Because getNameField() returns 'label' instead of 'name', the GLPI core (CommonDBTM) does not render the itemlink as a hyperlink.
Proposed Fix
Option 1 (Applied)
Change the return value of getNameField():
Option 2 (Alternative)
Modify rawSearchOptions():
Either option restores proper linking behavior.
Result
After applying the fix, the block name is displayed as a clickable link that opens the block edit form.