Error coming from t3-framework while updating joomla

by Smolikas   Last Updated October 06, 2019 09:10 AM - source

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 from 2.4.1 to 2.6.4 immediately (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" and so I kept updating until version 2.7.0 and then the site loaded but our 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 and so, 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 148".

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 start 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 but I cannot understand why this would cause such a problem and how can this be fixed correctly and not by randomly commenting out lines where they shouldn't. 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 to.

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?

Best regards, Aristotelis

Related Questions

Call com_ajax from module backend

Updated July 19, 2019 21:10 PM

Cannot update RokSprocket Module 2.1.x to latest 2.1.24

Updated September 27, 2018 13:10 PM