Page 1 of 1

Rolling back a module upgrade

Posted: Tue Feb 13, 2024 2:32 am
by MantaPro
Hi after doing a DB and file system backup, I have just upgraded from CMSMS v2.2.18 to v2.2.19 just to keep everything up to date.

Also, the Hosting Co I use have an imminent end date on PHP8.0 so I also updated to PHP8.1. Toured the website and Admin back end - all good.

Next step was do upgrades for any outstanding module updates available. After each quick check functionality. Upgrading CMSMSExt from 1.4.1 to 1.4.5 exposed some problems - probably not faults in CMSMSExt, rather doubtless some (aging) modules that are dependant upon CMSMSExt. So as a quick fix I attempted to roll back the CMSMSExt upgrade (so that I can do proper diagnostics in a test system).

I deleted the v1.4.5 version of /modules/CMSMSExt/*
And replaced it with the v1.4.1. version of /modules/CMSMSExt/*

I also edited the entry in _modules table to set the version back to 1.4.1

So to my query - in module manager, for CMSMSExt in the version column it still shows 1.4.5 and in status it includes the comment "Database Version Newer". I have done another backup of the DB then scanned it and can't find where module manager is getting that info from ?

Where is module manager getting that info ?

TIA

Re: Rolling back a module upgrade

Posted: Tue Feb 13, 2024 2:45 am
by DIGI3
Delete or rename the moduleinfo.ini file in the module's folder.

Re: Rolling back a module upgrade

Posted: Tue Feb 13, 2024 3:27 am
by MantaPro
Thanks Matt

but I deleted via FTP /modules/CMSMSExt/*

then uploaded from the backup of the Filesystem the v1.4.1 /modules/CMSMSExt/ so that would have also rolled back the moduleinfo.ini file, I didn't double check, but the FTP also didn't throw any errors or duplicate file conflicts.

It is a mystery - I thought it might be that the DB needed to flush, but that didn't sure it. I'll now go check my FTP to see if it somehow was excluding *.ini files

However. fortunately I have already fixed the problem that necessitated rolling back CMSMSExt - the module help provided great instructions/clue as to the issue.

18 months ago I migrated away from all of the CGE modules, various modules were changed from
class <YourModuleClassName> extends CGExtension
to
class <YourModuleClassName> extends CMSMSExt {}

changing this to below works ;D
class <YourModuleClassName> extends \CMSMSExt\XTModule {}

Thanks for the help Matt