当前位置: 动力学知识库 > 问答 > 编程问答 >

Joomla error ($this->app) after upgrade

问题描述:

I just upgrade my Joomla website from 3.1.1 to 3.3.6.

As found on https://github.com/joomla/joomla-cms/releases/tag/3.3.6 I downloaded Joomla_3.3.6-Stable-Update_Package.zip pack and uploaded all the files over my previous Joomla installation.

Unfortunately, I cannot login and the following error is displayed:

Fatal error: Call to a member function checkSession() on a non-object in /home/www/.../web/plugins/user/joomla/joomla.php on line 209

Line 209: $this->app->checkSession();

I did additional tests and it seems that all the "$this-app->..." command fail!

I opened the 3.1.1 joomla.php file and found another syntax:

 $app = JFactory::getApplication();

$app->checkSession();

Replacing the 3.3.6 syntax with this one solved my problem, but I can see that similar "calls" are done when logout, so I would need to change them as well.

It looks like the new syntax ($this->app->) is not working in joomla.php after upgrade to 3.3.6 and now I'm afraid similar errors can occurs in other scripts.

Does someone already get similar errors, is that a known problem with Joomla upgrade, how to solve this issue correctely?

Thank you in advance for your help.

Joel

网友答案:

Why on earth would you do this? For a long time now Joomla has had a built-in updater that does several things beyond just copying the files to the correct location, like updating the table definitions, adding new tables, data migration and removing old files.

My guess is that your database schema is now out of sync with the PHP. You'll have to role back to your backup as there is no clear way to say if records have been damaged etc.

Once you've restored your backup, use one of the methods described in the Upgrading from an Existing Version FAQ on Joomla's Doc's site.

As this question is about Joomla management and implementation details, you may get a better answer if you, try asking on the Joomla Q&A StackExhange site in the future.

分享给朋友:
您可能感兴趣的文章:
随机阅读: