Skip to content
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

[GLPI 9.4.3] [Plugin v1.4] Plugin installation errors #31

Open
pingax opened this issue Aug 22, 2019 · 2 comments
Open

[GLPI 9.4.3] [Plugin v1.4] Plugin installation errors #31

pingax opened this issue Aug 22, 2019 · 2 comments
Assignees
Labels
bug Something isn't working

Comments

@pingax
Copy link

pingax commented Aug 22, 2019

Hi,

I wanted to install the extension on fresh updated 9.4.3 GLPI. After clicking on the install button on plugins management' page, I only got a blank page.

In the files/_log/php-errors.log, I got these lines :

[2019-08-22 16:44:31] glpiphplog.ERROR: Toolbox::userErrorHandlerNormal() in /var/www/html/glpi/inc/toolbox.class.php line 659
  *** PHP Warning(2): Illegal string offset 'COUNT'
  Backtrace :
  inc/dbutils.class.php:327
  inc/db.function.php:178                            DbUtils->countElementsInTable()
  plugins/dporegister/inc/profile.class.php:279      countElementsInTable()
  plugins/dporegister/inc/profile.class.php:61       PluginDporegisterProfile::initProfile()
  plugins/dporegister/hook.php:74                    PluginDporegisterProfile::install()
  inc/plugin.class.php:521                           plugin_dporegister_install()
  front/plugin.form.php:47       

When using the php's built-in server, I got this :


[Thu Aug 22 16:47:19 2019] PHP Fatal error:  Uncaught Error: Access to undeclared static property: PluginDporegisterLawfulBasisModel::$gdprValue in /var/www/html/glpi/plugins/dporegister/inc/processing.class.php:626
Stack trace:
#0 /var/www/html/glpi/plugins/dporegister/inc/lawfulbasismodel.class.php(94): PluginDporegisterProcessing::checkLawfulbasisField()
#1 /var/www/html/glpi/plugins/dporegister/hook.php(74): PluginDporegisterLawfulBasisModel::install(Object(Migration), '1.4')
#2 /var/www/html/glpi/inc/plugin.class.php(521): plugin_dporegister_install()
#3 /var/www/html/glpi/front/plugin.form.php(47): Plugin->install('105')
#4 {main}
  thrown in /var/www/html/glpi/plugins/dporegister/inc/processing.class.php on line 626
[Thu Aug 22 16:47:19 2019] 192.168.1.13:57954 [500]: /front/plugin.form.php - Uncaught Error: Access to undeclared static property: PluginDporegisterLawfulBasisModel::$gdprValue in /var/www/html/glpi/plugins/dporegister/inc/processing.class.php:626
Stack trace:
#0 /var/www/html/glpi/plugins/dporegister/inc/lawfulbasismodel.class.php(94): PluginDporegisterProcessing::checkLawfulbasisField()
#1 /var/www/html/glpi/plugins/dporegister/hook.php(74): PluginDporegisterLawfulBasisModel::install(Object(Migration), '1.4')
#2 /var/www/html/glpi/inc/plugin.class.php(521): plugin_dporegister_install()
#3 /var/www/html/glpi/front/plugin.form.php(47): Plugin->install('105')
#4 {main}
  thrown in /var/www/html/glpi/plugins/dporegister/inc/processing.class.php on line 626
@pingax pingax changed the title [GLPI 9.4.3] Plugin installation errors [GLPI 9.4.3] [Plugin v1.4] Plugin installation errors Aug 22, 2019
@karhel karhel self-assigned this Oct 6, 2019
@karhel karhel added the bug Something isn't working label Oct 6, 2019
@pingax
Copy link
Author

pingax commented Dec 19, 2019

Hi,

Some precisions on this bug : I'm running php-7.3.11 on Apache 2.4.38.

This bug seems to occur when the plugin has already been installed on a previous GLPI installation. I also had an SQL syntax error (with existing tables), in file /inc/processing.class.php. It seems that $name = PluginDporegisterLawfulBasisModel::$gdprValue[$resultSet['lawfulbasis']]; does not take any value or take a wrong value, according to plugin's tables.

@yild
Copy link
Contributor

yild commented Mar 6, 2020

modify line 279 "name = '" . $data['field'] . "'"
to
['name' => $data['field']]

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants