Deprecated: Non-static method JApplicationSite..

Moderator: toivo

Locked
anttihei
Joomla! Fledgling
Joomla! Fledgling
Posts: 1
Joined: Thu Jul 27, 2017 12:59 pm

Deprecated: Non-static method JApplicationSite..

Post by anttihei » Thu Jul 27, 2017 1:08 pm

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..?

User avatar
H13
Joomla! Ace
Joomla! Ace
Posts: 1545
Joined: Sun Dec 10, 2006 6:39 pm
Location: Czech Republic
Contact:

Re: Deprecated: Non-static method JApplicationSite..

Post by H13 » Sun Jul 30, 2017 11:55 am

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
- Phoca Cart - Joomla eCommerce App - https://www.phoca.cz/phocacart
- Phoca Gallery - powerful image gallery
- Phoca Restaurant Menu - https://www.phoca.cz/phocamenu
- Phoca Download - download manager for Joomla


Locked

Return to “Finnish Forum”