InfotelGLPI / environment

Plugin environment for GLPI
GNU General Public License v2.0
6 stars 6 forks source link

SQL Error "1146": Table 'g9495.glpi_plugin_webapplications_webapplications' doesn't exist #12

Open jcervantes-sipecom opened 3 years ago

jcervantes-sipecom commented 3 years ago

Hi, I'm getting the error on the title with the new version of GLPI 9.5.2. I know Web Applications migrating to GLPI core as Appliances, but Enviroment still references to Web Applications' tables of that doesn't exist anymore once it's migrated.

  1. Go to asset
  2. Click on Enviroment
  3. Click on Web applications
  4. See error

SQL Error "1146": Table 'g9495.glpi_plugin_webapplications_webapplications' doesn't exist in query "SELECT COUNT(glpi_plugin_webapplications_webapplications.id) AS total, glpi_plugin_webapplications_webapplicationtypes.name AS TYPE, glpi_plugin_webapplications_webapplications.entities_id FROM glpi_plugin_webapplications_webapplications LEFT JOIN glpi_plugin_webapplications_webapplicationtypes ON (glpi_plugin_webapplications_webapplications.plugin_webapplications_webapplicationtypes_id = glpi_plugin_webapplications_webapplicationtypes.id) LEFT JOIN glpi_entities ON (glpi_entities.id=glpi_plugin_webapplications_webapplications.entities_id) WHERE glpi_plugin_webapplications_webapplications.is_deleted = '0' GROUP BY glpi_plugin_webapplications_webapplications.entities_id,TYPE ORDER BY glpi_entities.completename, glpi_plugin_webapplications_webapplicationtypes.name " PHP Notice (8): Trying to get property 'num_rows' of non-object in /var/www/html/g952/inc/dbmysql.class.php at line 419

image

gguib commented 3 years ago

Hi,

Please try last version on master branch

jcervantes-sipecom commented 3 years ago

Hello, sorry for the delay in responding. I tried the latest version of the master branch and the error is effectively gone now referring to Appliances. However, since there are other plugins that continue to reference WebApplication such as Accounts and Databases, and these have not corrected the errors of the reference to tables when migrating to Appliances, it would be good if Environment refers to both tables, in case If the WebApplication tables do not exist, refer to Appliances, and if they do exist, do not make the reference.

gguib commented 3 years ago

Hi,

I push new commit on master branch. Migration delete all 'PluginWebapplicationsWebapplication' associated to accounts & databases plugins.

jcervantes-sipecom commented 3 years ago

Ok, Thank you I will try.