I am trying to update the Joomla version and T3-Framework version of our website and there seems to be a bug somewhere.

Current JOOMLA version: 3.7.4 Current T3-FRAMEWORK version: 2.4.1

I first update joomla from 3.7.4 to 3.7.5 without updating the T3-framework. All works fine, but I have to keep updating to the latest versions and therefore I then update Joomla to the next version which is 3.8.0 and then this error comes up:

*Fatal error: Cannot redeclare class JModuleHelper in C:\xampp\htdocs\taus-up\plugins\system\t3\includes\joomla30\modulehelper.php on line 38

which is clear that it comes from the t3-framework.

So then thought that I should start updating the T3 to keep up with the Joomla versions and I do so by immediately jumping from 2.4.1 to 2.6.4 (as I was not able to find earlier versions) only to get the same error but on different line:

Fatal error: Cannot redeclare class JModuleHelper in C:\xampp\htdocs\taus-up\plugins\system\t3\includes\joomla30\modulehelper.php on line 20

So I kept updating until version 2.7.0 and then the site loaded, but the landing pages on our website are made via Custom Modules and therefore we only get blank white pages since the new error has to do with the advancedmodules plugin. Essentially, we had only the header and the footer working fine and in between just blank white space and the following warning:

Warning: Invalid argument supplied for foreach() in C:\xampp\htdocs\taus-up\plugins\system\advancedmodules\advancedmodulehelper.php on line 14

We kept updating until Joomla version 3.9.3 (as this is the latest compatible version with the latest T3-framework version) and T3-framework latest version 2.7.4 but nothing changed.

I then started digging into the files and opened the whole website folder as a project on PhpStorm and search for the function "onPrepareModuleList" as this is responsible for the error. I was able to trace down all of the places in the code where this function is being called and found out that if I comment out this line:

JFactory::getApplication()->registerEvent('onPrepareModuleList', array($class, 'onPrepareModuleList'));

which is at the file /plugins/system/advancedmodules/helper.php on line 46, the website loads normally again. However, I cannot understand why this would cause such a problem and how can this be fixed correctly and not by randomly commenting out lines.

Also, by doing this fix even if the website loads back again normally there seems to be some strange behavior in the modules in general and some modules are being displayed in places where these aren't assigned to be displayed.

PS. If we don't update Joomla and leave it at 3.7.4 and simply update only T3-framework to the latest version 2.7.4 everything works fine and it seems like T3 works fine on older Joomla versions like 3.7.x.

This is not a solution though as we cannot leave Joomla un-updated.

Has anyone else come up with this case before? Could anyone provide some knowledge on this and some help?

  • Not a full answer but some generic advice which seems to work for me is to upgrade all third party extensions to the latest versions first and then update Joomla to the latest version last. There's no need to upgrade Joomla incrementally one version at a time. Oct 6 '19 at 22:19

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.