InfotelGLPI / mydashboard

Plugin mydashboard for GLPI
http://blogglpi.infotel.com/
GNU General Public License v2.0
43 stars 19 forks source link

No data available #45

Closed felipe-magalhaes-DevCorner closed 5 years ago

felipe-magalhaes-DevCorner commented 6 years ago

GLPi 9.3;0 Latest commit After clean install of glpi, and install of dashboard, all users only get no data available, also the add widget button not working. All these functions work for the GLPI admin user, but not for any other user, not even the administrator group.

keha35 commented 6 years ago

Hello, I tried with a clean install of GLPI and can't reproduce. Can you add screen capture of the problem ?

Dayflare commented 6 years ago

vivaldi_2018-08-27_07-51-27 i get the same error. There are no log entries, tried to reinstall the plugin, same error.

GLPI 9.3 running on Apache.

Dayflare commented 6 years ago

fixed the error by deleting all rights for mydashboard in my profile (super-admin), saving and then giving back the Full rights. After a refresh the charts are working again.

amma35 commented 6 years ago

In the plugin profile you set up? For right "Dashboard Access" : "Full" or "Custom" ?

Dayflare commented 6 years ago

@amma35 i had checked "Full".

amma35 commented 6 years ago

Can you test with this release, the problem doesn't exist: https://github.com/InfotelGLPI/mydashboard/releases/tag/1.6.1

julgeb commented 5 years ago

Can you test with this release, the problem doesn't exist: https://github.com/InfotelGLPI/mydashboard/releases/tag/1.6.1

Same issue for me and same workaround...

keha35 commented 5 years ago

Which are the rights on the plugin for the user profil?

sworlls commented 5 years ago

I have the same issue, any workaround? I stated that if i chose custom access GLPI>Administration>Profile>"Select profile like Super Admin">mydashboard tab>Select Custom instead of full and save the config, when saving it go back to "NO" in all items no matter what i change. seems more like for some reason it is not saving config with privileges, i just made sure the folder mydashboard had chmod 777 but no matter what, i got the same result inclusing using various different versions of the pluggin.

In Debug mode this is what i got when accessing mydashboard

Fatal error: Uncaught Error: Call to a member function fetch_array() on boolean in /var/www/html/inc/dbmysql.class.php:296 Stack trace: #0 /var/www/html/plugins/mydashboard/inc/userwidget.class.php(117): DBmysql->fetch_array(false) #1 /var/www/html/plugins/mydashboard/inc/menu.class.php(885): PluginMydashboardUserWidget->getWidgets() #2 /var/www/html/plugins/mydashboard/inc/menu.class.php(1048): PluginMydashboardMenu->getDashboardForUser('14') #3 /var/www/html/plugins/mydashboard/front/menu.php(100): PluginMydashboardMenu->loadDashboard('4', 0) #4 {main} thrown in /var/www/html/inc/dbmysql.class.php on line 296

any guess?

keha35 commented 5 years ago

Hi,

Have you configure which custom Dashboard the profil can acces?

Have you something in your sql-errors.log file ?

sworlls commented 5 years ago

Hi Keha35, thank you for your contact. The error with Mysql goes as follows: 13:15:28 ### CREATE TABLE glpi_plugin_mydashboard_userwidgets ( id INT(11) NOT NULL AUTO_INCREMENT, -- id users_id INT(11) NOT NULL COMMENT 'RELATION to glpi_users(id)', widgets_id INT(11) NOT NULL, -- id du widget place INT(11) NOT NULL, -- placement du widget PRIMARY KEY (id), FOREIGN KEY (users_id) REFERENCES glpi_users (id) ) ENGINE = InnoDB DEFAULT CHARSET = utf8 COLLATE = utf8_unicode_ci Error Code: 1215. Cannot add foreign key constraint 0.031 sec

Now i got from other post that it is caused due to my DB engine not be InnoDB. i was reading some posts about convert my db from myisam to innodb and there could be issues converting it. so my question for you if there is any script to work with myisam instead of innodb. thank you

keha35 commented 5 years ago

This error appeard because of a foreign key on glpi_users table and the table need to be in InnoDB too. Since GLPI 9.3 we have update the DB engin used by the plugin.

We have no script for myisam. But you can change the engin from InnoDB to MyISAM in the sql Install file manualy.

However, it would be better to migrate to InnoDB engine for all glpi's table.

sworlls commented 5 years ago

Hello Keha35, Thank you again for your feedback. now i cog lucky putting it to work. i just followed the instructions here https://rdr-it.com/en/glpi-9-3-convert-tables-to-innodb/ and after that reinstalled Mydashboard and now wokring like a charm. Thank you and happy new year to you all guys!