?
avatar eaexo
eaexo
15 Oct 2018

Steps to reproduce the issue

Run Joomla 3.8.13 (updated from 3.8.12) on PHP 7.x (both 7.1 and 7.2) does not work, then instead of showing a frontend, an error page with error code 0 and error message "Using $this when not in object context" is shown.

To fix it edit in CMSApplication.php

the method
public function getMenu($name = null, $options = array())

and replace
$options['app'] = $this;
by
$options['app'] = \JFactory::getApplication();

Expected result

One can open the frontend page

Actual result

error page with message "Using $this when not in object context" is shown.

Swithching PHP version to 5.6 "fixes" the error.

avatar eaexo eaexo - open - 15 Oct 2018
avatar joomla-cms-bot joomla-cms-bot - labeled - 15 Oct 2018
avatar SharkyKZ
SharkyKZ - comment - 15 Oct 2018

Duplicate of #22597. The issue is in 3rd party extension or template. Update your extensions or enable debug to see where the error is coming from and follow #22597 (comment) to fix it.

avatar eaexo
eaexo - comment - 15 Oct 2018

It is clearly not a template - tried also a default joomla template -> same issue.

But I will double-check the code and look for the calls such "JSite::getMenu()" or "JApplicationSite::getMenu()"


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/22619.

avatar ggppdk
ggppdk - comment - 15 Oct 2018

Why don't you enable Joomla debug as it was suggested above by @SharkyKZ ?
it should tell you which extension code is doing this

avatar PhilETaylor
PhilETaylor - comment - 15 Oct 2018

This is most likely to be your template OVERRIDES.

Joomla 3.8.13 is fully compatible with all PHP 7.0 7.1 7.2 and 7.3RC1 versions.

avatar brianteeman
brianteeman - comment - 15 Oct 2018

I am closing this as a non core joomla issue

avatar brianteeman brianteeman - close - 15 Oct 2018
avatar brianteeman brianteeman - change - 15 Oct 2018
Status New Closed
Closed_Date 0000-00-00 00:00:00 2018-10-15 08:29:26
Closed_By brianteeman

Add a Comment

Login with GitHub to post a comment