Wrong Module Version Reported in Admin

I have a module that is reporting the wrong version number.  How does Dolphin handle the version number of modules listed in the admin?  The module in question was versioned wrong by the developer who later corrected it.  I thought the version number was read from the module but I have checked the config.php file and the correct version is listed there.  Tonight I upgraded the module; replacing all the files with the current ones; there was no database change for the module.  Yet it is still reporting the incorrect version number and I cleared all the caches.  If the version number is read from the database, then one can not just replace files when there is a version upgrade of the module.  If so, then I need to go and check the version numbers of all the third party modules against their real version numbers in the config.php files of each module.

Geeks, making the world a better place
Quote · 19 Apr 2014

Unless the module is uninstalled and re-installed the version number in the database will not be updated to the new version. Simply replacing the files does not do it. The version is read from the sys_modules table in the database, not from the modules config file. The config file just contains the settings that get set into the database when the module is installed. The config file also determines what checks to perform during the install and uninstall and what cache items are to be rebuilt.

https://www.deanbassett.com
Quote · 19 Apr 2014

Thanks for the information.  The problem is that one can not always uninstall a module because it loses members' data; members don't like it when their data is lost, they don't like it one little bit.

Geeks, making the world a better place
Quote · 19 Apr 2014

I was under the impression data is preserved & not removed, only the module files however, you could back up the data directory for that module as a precaution & try uninstalling & reinstalling if the correct version displaying is a concern. Restore the data directory after reinstalling.

Quote · 19 Apr 2014

 

I was under the impression data is preserved & not removed, only the module files however, you could back up the data directory for that module as a precaution & try uninstalling & reinstalling if the correct version displaying is a concern. Restore the data directory after reinstalling.

Uninstalling a module drops the tables; so goodbye data.  When you install a module, it is installing the necessary tables in the database and inserting data in other tables.  The files are uploaded manually.  If there are no database changes, then you just upload the files over the old ones.  Even if there is a database change, it is not always necessary to uninstall the module; minor changes can be added by running a sql query.  In this case, I would just go into the database and correct the version number.

Geeks, making the world a better place
Quote · 19 Apr 2014

 

I was under the impression data is preserved & not removed, only the module files however, you could back up the data directory for that module as a precaution & try uninstalling & reinstalling if the correct version displaying is a concern. Restore the data directory after reinstalling.


You would be wrong. GG is correct. When a module is uninstalled it drops all of it's tables. The data in the folders normally remains.

https://www.deanbassett.com
Quote · 19 Apr 2014

Then back up the database too! It's easy enough to fix the problem if it's a concern.

Quote · 19 Apr 2014

 

Then back up the database too! It's easy enough to fix the problem if it's a concern.

If there are a lot of database changes; then yes, I would have to uninstall the module and bite the bullet.  I had one module in which I had to uninstall to upgrade but only had to export the data from one table; so I was able to save the member's data.  In this case, I just log into the database and change the number for the version; no need to backup or import anything.

Geeks, making the world a better place
Quote · 19 Apr 2014
 
 
Below is the legacy version of the Boonex site, maintained for Dolphin.Pro 7.x support.
The new Dolphin solution is powered by UNA Community Management System.