Skip to content

fix(migration): resolve compile error during plugin update with genericobject asset#1118

Merged
stonebuzz merged 3 commits into
pluginsGLPI:mainfrom
MyvTsv:ticket41370
Feb 10, 2026
Merged

fix(migration): resolve compile error during plugin update with genericobject asset#1118
stonebuzz merged 3 commits into
pluginsGLPI:mainfrom
MyvTsv:ticket41370

Conversation

@MyvTsv

@MyvTsv MyvTsv commented Jan 20, 2026

Copy link
Copy Markdown
Contributor
  • I have performed a self-review of my code.
  • I have added tests (when available) that prove my fix is effective or that my feature works.
  • I have updated the CHANGELOG with a short functional description of the fix or new feature.
  • This change requires a documentation update.

Description

  • It fixes !41370
  • When migrating the Fields plugin, container files are regenerated. However, if the targeted itemtype classes are not loaded, the file is not updated, which poses a problem in the event of a major change.

In GLPI 10, this behavior occurs when a container targets a deleted GenericObject: the CustomAsset is then not migrated to version 11 and the file remains obsolete.

[2026-01-20 13:57:37] glpi.ALERT: *** Fatal Compile Error: Declaration of PluginFieldsPlugingenericobjectprojecteurprojecteurtab::addField($fieldname, $type, array $options) must be compatible with PluginFieldsAbstractContainerInstance::addField($fieldname, $type, array $options = []) Backtrace : ...ericobjectprojecteurprojecteurtab.class.php:169

@MyvTsv MyvTsv self-assigned this Jan 20, 2026
@stonebuzz stonebuzz self-requested a review January 20, 2026 13:38

@stonebuzz stonebuzz left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I agree with this change and suggest waiting for more cases before validating the fix.

@MyvTsv MyvTsv requested a review from Rom1-B January 20, 2026 14:10
@MyvTsv MyvTsv marked this pull request as ready for review January 20, 2026 14:13

@Rom1-B Rom1-B left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

OK, I'm not approving it just to block the merge and wait for other cases.

@BigBadSheep

Copy link
Copy Markdown

I kindly ask for marge, fields in the latest version does't work :( @Rom1-B

@stonebuzz

Copy link
Copy Markdown
Contributor

@BigBadSheep

have you try this fix ?

@stonebuzz stonebuzz requested a review from Rom1-B February 9, 2026 14:46
@stonebuzz stonebuzz merged commit f63617f into pluginsGLPI:main Feb 10, 2026
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants