To solve- Warning: Parameter 1 to modMainMenuHelper::buildXML() expected to be a reference…
To solve- Warning: Parameter 1 to modMainMenuHelper::buildXML() expected to be a reference, value given in /libraries/joomla/cache/handler/callback.php on line 99
I have spent 3 difficult weeks trying to solve an error with Joomla. I recently moved 5 websites from two different servers. The new server did not display any menus. Apparently error reporting was turned off.
I loaded it on my localhost and got the “Warning: Parameter 1 to modMainMenuHelper::buildXML() expected to be a reference, value given in /libraries/joomla/cache/handler/callback.php on line 99” errors (see screenshot).
Here is the solution:
The site currently runs on Joomla 1.5. The previous server ran PHP 5.2.9 while the new server ran a later version of PHP, 5.3.0. This error is thrown because of the reference type used in the helper file.
Locate modules/mod_mainmenu/helper.php, open the file and change the following line from
function buildXML(&$params)
to
function buildXML($params)
Viola! You have your menus back.
I will warn you though, you have to upgrade to the latest version of Joomla.