Recently I was doing a VirtueMart upgrade from version 2 to the latest version, as well as upgrading Joomla! 2.5 to latest 3.9.* version. With all of the frustrations and pitfalls that come with this process, the one thing just took me so much time to fix. I was getting this:
Fatal Error: Class 'vmLanguage' not found in /administrator/components/com_virtuemart/helpers/config.php on line 326
This error would just pop up and would totally break the Joomla! admin panel. So you could do nothing else but go to the DB and manually disable the extension.
Trying the usual Joomla! debugging didn’t help at all. Nor did the VirtueMart forum’s search, unfortunately.
The next thing I tried was to do some “raw” debugging going line by line and trying to figure out why the VirtueMart config class didn’t get a reference to the vmLanguage
class, but I realized that that would take me like few hours to debug.
Suddenly I realized that to be able to totally break the Joomla! admin interface the code has to run either as a system plugin or probably as an “Administrator” module. I went to the Extension Manager and filtered extensions with “virtuemart” and started to switch off one by one.
To my surprise, the VirtueMart module “VirtueMart Administrator Menu” was the one that was causing this.
And what this module is doing is outputting a Joomla! admin menu, specifically for Virtuemart’s different views and options:
The issue was that for some reason the files under /administrator/modules/mod_vmmenu
were not upgraded at all during all other upgrades. So I went in and deleted everything from that folder, and manually uploaded the new files taken from the latest VirtueMart installation archive. After doing this and re-enabling the module, the error was fixed and the site started working properly.
Hopefully, this little tip can save you some time if you encounter some similar issues yourselves.