One of my longtime customers, Craig Reid, recently inquired if I could help with an issue his parents were having on their site, and I said I'd be happy to help. The only problem? It was with Joomla! - a platform that I rarely use. Still, I wanted to help if I could. So off we went.
The error - Warning: Parameter 1 to modMainMenuHelper::buildXML() expected to be a reference, value given - seemed to be common enough, with plenty of references available, the problem was figuring out which provided the correct resolution for our needs.
Unfortunately, the simplest one was changing the menu type from one to another, didn't seem to help, so we had to move on. That one involved editing part of the Joomla! code, and required getting access to the files.
Luckily, it was a simple fix.
First, find /modules/mod_mainmenu/helper.php, then make a backup (always important if you are editing things), then remove a single character.
Change this:
function buildXML(&$params)
To this:
function buildXML($params)
And that took care of the problem - menus came back. Even better, the errors that were surfacing on the admin side of Joomla! went away too. Sweet.
Leave a comment