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.
43 comments
Thanks, Man! This post was very useful for me! I appreciate it!
This post saved me. Thanks a million!
thanks a lot!!!!!
Thanks a lot!
Thanks. This worked a treat.
However it is still not possible to edit the menu items in the Administrator panel. As you said though maybe time to do an upgrade..
Yes I think you should just upgrade. I know it could be painful doing a whole new site for the upgrade, but its worth all the stress
Thanks a lot, Seye!
So nice of you to share this fix!
THANKS A BILLION$$!!!
One word – genius.
Oh…. you saved me… thanks a lot
Awesome.. 🙂
Thank you very much Seye…successful!
Thanks Seye! This solved my problem!
THANK YOU LOT OF !!!
Found your help quickly, dont need to read lot of forum postings 🙂
Tnx, work for me!
Thank you, it works for me too!
Hello! This is my first visit to your blog! We are a group of volunteers and starting a new initiative in a community in the same niche. Your blog provided us valuable information to work on. You have done a marvellous job! 332640
Thanks !!!
this works, but now the links in the main menu are not working
Thank you for sharing!!!!
The problem that I see in here is that the call to the function is undefined. Try making a call from within the global function. The parameters of the called function are assigned to local, so it cannot be called from another function. That might be a problem.
Thank you a lot, this solved my issue. Now I can run my joomla 2.5 website on the same server as my old joomla 1.5 🙂
Nice solution 🙂
thaaaaaaaaaaaaaaaaaaaaaanks a million , good arrow !!!
Appreciated.
This post saved me. Thanks!!!!!!
Hi Kuyinu..
Could you please advise me to solve this problem ?
Warning: Parameter 1 to JHTMLGrid::access() expected to be a reference, value given in /home/k5477460/public_html/libraries/joomla/html/html.php on line 87
Thanks before.
this post saved my time thanks
Thankyou Thankyou Thankyou!!
This worked for the same issue but I am using superfish menu (mod_superfishmenu)
Thank you for the solution. It worked for me.
Merci tu m'as sauvé la vie ( surtout une bonne partie de ma journée !!!!!!!!!!!!!!
Doesn't work for me…dammit!
It worked! all websites that say this is solved were referring to the wrong module…In Joomla 1.5 it is modules/mod_superfishmenu/
Thank you!! It was really helpful!!
TKS so much
Thanks, worked for me – life saver!
Awesome – thanks so much!!
Thnx man
Awesome. Thanks very much for sharing this. Our host just upgraded their server and we were left with this issue.
You're welcome!
Gracias, super útil
Thank you
Thanx a lot, You just saved me 🙂
Comments are closed.