pluginsGLPI / fields

Additionals fields for GLPI
http://glpi-plugins.rtfd.io/en/latest/fields/index.html
GNU General Public License v2.0
89 stars 66 forks source link

Update does not update the version number #811

Closed montoia closed 1 month ago

montoia commented 1 month ago

Hello, the plugin has an update problem. When updating, it updates the repository but does not change the version code in database. When accessing the setup.php file after updating, the version define('PLUGIN_FIELDS_VERSION', '1.21.11'); Right in principle.

However, the database contains version 1.21.8, which would be my previous version.

I believe that when updating it is not updating the database.

This problem causes cron to disable the plugin because there is a version conflict.

You can analyze this problem.

An observation: The plugin is currently active because I changed the version in setup.php to define('PLUGIN_FIELDS_VERSION', '1.21.8'); I tried removing it and reinstalling it but the version conflict remains.

image

stonebuzz commented 1 month ago

Hi @montoia

I don't reproduce

The version change has updated the version in the database. (1.21.8 -> 1.21.11)

MariaDB [test_10bugfixes]> select * from glpi_plugins where directory = 'fields';
+----+-----------+-------------------+---------+-------+------------------------+---------------------------------------+---------+
| id | directory | name              | version | state | author                 | homepage                              | license |
+----+-----------+-------------------+---------+-------+------------------------+---------------------------------------+---------+
| 23 | fields    | Additional fields | 1.21.11 |     1 | Teclib', Olivier Moron | https://github.com/pluginsGLPI/fields | GPLv2+  |
+----+-----------+-------------------+---------+-------+------------------------+---------------------------------------+---------+

Perhaps you had an error during the update?

can you run this command (at the root of GLPI)

php bin/console glpi:plugin:install fields -f

Then activate plugin and check database value with this SQL query

select * from glpi_plugins where directory = 'fields';

montoia commented 1 month ago

Very good, my problem was a user conflict when running the update. I appreciate the support.