GLPI 11 - unable to list plugins (without marketplace)
Code of Conduct
- [x] I agree to follow this project's Code of Conduct
Is there an existing issue for this?
- [x] I have searched the existing issues
Version
11.0.0-dev (nightly)
Bug description
I cloned my test server to migrate it to GLPI 11, so I can start testing. The migration seems to have gone well, but when I want to reactivate the plugins, I have an error :
Compile Error: Declaration of PluginPdfConfig::canCreate() must be compatible with CommonGLPI::canCreate(): bool
In /var/www/glpi/plugins/pdf/inc/config.class.php(39)
#0 {main}
My server does not have internet access. So I do not use the marketplace.
if I click on marketplace I have the list of plugins (and a message to say that I don't have internet) and it is indicated that the majority of plugins are not compatible with GLPI 11 ;)
Relevant log output
Page URL
/front/plugin.php
Steps To reproduce
- have v10 plugins in the plugins directory
- go to configuration / plugins
Your GLPI setup information
No response
Anything else?
thank you :)
GLPI 11 is currently in alpha, most of plugins are not compatible; this is not a GLPI issue.
Maybe I misunderstood the issue... Compatible or not; plugins are correctly listed from marketplace view, but not legacy one. So I reopen.
But anyway, you can use marketplace directory/view without an internet access, a warning is indeed displayed but you should be able to manage your plugins this way.
In the future, the legacy UI will certainly be removed.
In the future, the legacy UI will certainly be removed.
I thought the original UI was staying. GLPI 11 adds the ability to block the marketplace. If the current UI gets removed, I think the marketplace UI will need to be able to work in an offline mode where it only shows the present plugins without fetching anything from an external server.
Since the legacy UI use specific code, this is more leagacy code to maintain, and we try to avoid that. That's currently not deprecated. Anyway, that should continue working, and it's currently indeed broken on v11.
Maybe I misunderstood the issue... Compatible or not; plugins are correctly listed from marketplace view, but not legacy one. So I reopen.
But anyway, you can use marketplace directory/view without an internet access, a warning is indeed displayed but you should be able to manage your plugins this way.
In the future, the legacy UI will certainly be removed.
Hi, Are you interested in bug reports on GLPI v11 or is it too early? (menu not working when minimized, printer page counters not displaying anything) Thanks again :)
Yes, you can report issues on GLPI 11, just ensure you're using a recent nightly build (the latest one if possible).
Thanks!
The problem can also be reproduced this way :
- download the pdf plugin in
pluginsdirectory - install the plugin in terminal
./bin/console plugin:install pdf - change the requirements in plugin code
- mark the plugin activated in database (state = 1)
I'm working to prevent this.
@TheRoby have you made changes in your plugin code ? can you tell us what is the current state of the plugin in database (glpi_plugins table) ?
No, I didn't touch the code Now, I have all the plugins that I use with my GLPI 10 :
Thanks for the feedback.
We are dealing with the topic of error handling. Discussions are ongoing. ( #18765 )
Specifically for your problem, you need to modify the plugin code to comply with the CommonDBTM class whose signatures have evolved in version 11. For the presented error, add the return type.
static function canCreate(): bool
{
return Session::haveRight('config', UPDATE);
}
I don't know if the bug should be closed or renamed with a more generic title...