Page 1 of 1

Deprecated: Non-static method JApplicationSite..

Posted: Thu Jul 27, 2017 1:08 pm
by anttihei
Sivuilla tekstin yläpuolella lukee

Deprecated: Non-static method JApplicationSite::getMenu() should not be called statically, assuming $this from incompatible context in /home/ratsa912/public_html/templates/gk_storebox/lib/framework/helper.layout.php on line 148

Deprecated: Non-static method JApplicationCms::getMenu() should not be called statically, assuming $this from incompatible context in /home/ratsa912/public_html/libraries/cms/application/site.php on line 272

Mitenhän nämä saisi poistettua? Muokkausnäkymässä en noita tekstejä näe..?

Re: Deprecated: Non-static method JApplicationSite..

Posted: Sun Jul 30, 2017 11:55 am
by H13
Hi, first of all, in global configuration of Joomla! you can hide php development warnings on your site. Disable error reporting there ( https://www.phoca.cz/documents/50-phoca ... tic-method ).

So then such development warnings will be not displayed in frontend.

If you want to correct the code directly, try to change
FROM

Code: Select all

$menu = JApplicationSite::getMenu() 
TO:

Code: Select all

$app 		= JFactory::getApplication();
		$menu 		= $app->getMenu();
Jan