-
Notifications
You must be signed in to change notification settings - Fork 35
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Error installing example plugin: Undefined constant Glpi\Plugin\Hooks::ADD_CSS_ANONYMOUS_PAGE #85
Comments
I have this issue too: |
I confirm the issue, on a fresh instance of GLPI 10.0.18 I can't install this plugin. I called get_included_files() in the "install" method of "src/Plugin.php", and the hooks file of the plugin is not present in the included files :
|
The plugin can't be installed because of those three lines in setup.php of the plugin 'example' : $PLUGIN_HOOKS[Hooks::PRE_ITIL_INFO_SECTION]['example'] = [ItemForm::class, 'preSection'];
$PLUGIN_HOOKS[Hooks::POST_ITIL_INFO_SECTION]['example'] = [ItemForm::class, 'postSection'];
$PLUGIN_HOOKS[Hooks::SET_ITEM_IMPACT_ICON]['example'] = 'plugin_example_set_impact_icon'; If you comment them you can install the plugin, they were added for the version 11 of GLPI. |
Well, there are several distinct issues here. Original one:
You can remove calls as a workaround. I guess those should have been merged in a specific development branch instead of main, or should have been conditionned. Ping @stonebuzz @cedric-anne |
When cloning a repository that contains an example plugin and installing it on GLPI, an error occurs indicating that a required function for installation does not exist. Additionally, the following warning appears:
The text was updated successfully, but these errors were encountered: