2

I am trying to transfer Joomla site from one hosting to the other. The error is:

Fatal error: Call to a member function get() on a non-object in     /home/.../templates/beez_20/error.php on line 10

I have found the folowing lines in error.php:

defined('_JEXEC') or die;
$params = JFactory::getApplication()->getTemplate(true)->params;
$logo =  $params->get('logo');

Maybe it can't find the parametres, so I should initialize it someway?

Also there are several warnings before fatal error:

Warning: Invalid argument supplied for foreach() in /home/.../public_html/libraries/joomla/access/access.php on line 409

Warning: Invalid argument supplied for foreach() in /home/.../public_html/libraries/joomla/plugin/helper.php on line 59

Warning: Invalid argument supplied for foreach() in /home/.../public_html/libraries/joomla/plugin/helper.php on line 59

Warning: Invalid argument supplied for foreach() in /home/.../public_html/libraries/joomla/application/menu.php on line 63

Warning: Invalid argument supplied for foreach() in /home/.../public_html/includes/application.php on line 462

2
  • Have you ensured you're running the latest version of the Joomla 2.5 series which is 2.5.22 ?
    – Lodder
    Jul 2 '14 at 11:10
  • @Lodder, I've checked version in libraries\cms\version\version.php, it is 2.5.20. Jul 2 '14 at 12:24
2

Those calls are all related to unexpectedly empty database results so it looks as if Joomla is not connecting to the database correctly. You need to check your database settings on your new site and check that you are using the correct driver (probably mysql or mysqli), as well as the correct database name and credentials. These settings re all found in the configuration.php file in your site's root folder (/home/.../public_html/). You also need to check that the database is populated correctly.

6
  • I am not sure that this error actually related to database connection, cause first I had errors with database, error was something like: 'can't connect to database', and I've fixed these problems. In configuration.php I've set parametres: $dbtype, $host, $user, $password, $db, $dbprefix for database and $log_path, $tmp_path. @David, there are some other parameters that I should set? Jul 2 '14 at 14:23
  • The errors you're seeing can all be caused by empty database results. If you are connecting properly, perhaps the database is empty or the dbprefix is wrong? If you can, check using phpMyAdmin which may be available with your hosting package.
    – David
    Jul 2 '14 at 14:28
  • I've change prefix to correct one, It helped me, thank u! But now there are some other problems Oh..joomla Jul 2 '14 at 19:10
  • Look into your file/folder permissions and that the temp/log path in the confugration file are correct. Also set error reporting to "none" in the configuration file as well. If all goes well that should fix the error or at least hide it enough to do more debugging in the administrator panel. Jul 7 '14 at 23:17
  • If my answer helped with your original problem, please could you mark it as answered?
    – David
    Jul 31 '14 at 12:04

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.