Update a Joomla 8.10.3 Installation from PHP 7.0 to 7.1 or 7.2
Starting the Website
Normal Operation:
Withe Page with
--> Fatal Error 0 Using $this when not in object context
Call stack
Function Location
1 ()JROOT/libraries/src/Application/CMSApplication.php:369
2 Joomla\CMS\Application\CMSApplication::getMenu() JROOT/libraries/src/Application/SiteApplication.php:275
3 Joomla\CMS\Application\SiteApplication::getMenu() JROOT/templates/aerzte_theme517/index.php:209
4 require() JROOT/libraries/src/Document/HtmlDocument.php:658
5 Joomla\CMS\Document\HtmlDocument->_loadTemplate() JROOT/libraries/src/Document/HtmlDocument.php:720
6 Joomla\CMS\Document\HtmlDocument->_fetchTemplate() JROOT/libraries/src/Document/HtmlDocument.php:535
7 Joomla\CMS\Document\HtmlDocument->parse() JROOT/libraries/src/Application/CMSApplication.php:1027
8 Joomla\CMS\Application\CMSApplication->render() JROOT/libraries/src/Application/SiteApplication.php:780
9 Joomla\CMS\Application\SiteApplication->render() JROOT/libraries/src/Application/CMSApplication.php:201
10 Joomla\CMS\Application\CMSApplication->execute() JROOT/index.php:49
Labels |
Added:
?
|
Status | New | ⇒ | Closed |
Closed_Date | 0000-00-00 00:00:00 | ⇒ | 2018-07-25 14:18:50 |
Closed_By | ⇒ | mbabker |
Thank you, just worked for me on a Joomla site, changed the file as specified and site returned to normal opeation on PHP 7.1. Joomla recommended the update but without your change to the index.php site would not display, much appreciated.
Подскажите, у меня такая же проблема, но такого кода в index нет. Как решить? ошибка: Error: Call to undefined method Error::get(): Using $this when not in object context
Unfortunately this is an error in your template
JROOT/templates/aerzte_theme517/index.php:209
. Basically, it's doing something likeJSite::getMenu()
orJoomla\CMS\Application\SiteApplication::getMenu()
which calls thegetMenu
method in a static context, which is the incorrect way of calling that method. The code should beJFactory::getApplication()->getMenu()
.