Fix PDF export of tabs renamed in GLPI 11 - #82
Merged
Conversation
Rom1-B
approved these changes
Aug 5, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Checklist before requesting a review
Please delete options that are not relevant.
Description
It fixes !45654
Several export checkboxes produced nothing in the generated PDF: the tab keys in the plugin's dispatch switches still used pre-GLPI 11 class names, so they never matched. The ticket reported for Tickets on a computer but the same cause affected three more tabs:
Glpi\Asset\Asset_PeripheralAsset$1,ItemVirtualMachine$1andItemAntivirus$1.Tab keys fixed :
Ticket$1only ->Item_Ticket$1(Ticket$1kept for User/Group/SLA)Computer_Item$1->Glpi\Asset\Asset_PeripheralAsset$1ComputerVirtualMachine$1->ItemVirtualMachine$1ComputerAntivirus$1->ItemAntivirus$1The handlers behind them were also still querying pre-11 columns, so I did the following column modifications in the queries :
glpi_itemantiviruses/glpi_itemvirtualmachines:computers_id→itemtype + items_id.glpi_assets_assets_peripheralassets:computers_id/itemtype/items_id→itemtype_asset/items_id_assetitemtype_peripheral/items_id_peripheral.glpi_computersinstead of the VM table, which listed the exported computer as its own host; its Operating system column read a field removed fromglpi_computersand now shows Serial number, matching core.Renamed the antivirus and VM handlers and moved them to the common switch because they are no longer Computer-only (GLPI registers those tabs on Phone and on custom asset types ).
pdfForComputer()iterates$CFG_GLPI['directconnect_types']instead of a hardcoded type list to keep the plugin consistent with the core.