Tuesday, June 7, 2016

Joomla Admin Page Broken After php 7.0.7

I recently upgraded my php version to 7.0.7. Although not a php bug, some strict warnings were reclassified (correctly so) in php 7 leading my Joomla Administrator page to go non compos mentis. The following is the page I got after logging in as Administrator:


1. Go to line 57 of the file "Site folder"/htdocs/administrator/modules/mod_menu/menu.php
2. Remove the ampersand "&"

Before: public function addChild(JMenuNode &$node, $setCurrent = false)
After: public function addChild(JMenuNode $node, $setCurrent = false)

This change will help to get the Admin panel working, but a good coder will also update the parameter description in the comments section for this function.


The purpose of this post is to help beginners who encounter a vrot Administrator Panel right after successfully installing Joomla using php 7.0.7. Anyone above beginners level can read through the reported issue and understand the reason for this behaviour:
or alternatively: https://github.com/joomla/joomla-cms/pull/10452

Fix in non-newbie language:

Error created in the following environment:
Joomla 3.5.1
Apache 2.4.20
MySQL 5.7.12
php 7.0.7