Many Errors

Professional Jomal template designed to be easily adaptable to all kinds of business
GK User
Wed Aug 01, 2012 11:01 pm
Hello

After installing the template "Corporate 2" appeared many errors in the template.

Please help me!

Thanks

Errors attached

Strict Standards: Only variables should be assigned by reference in C:\xampp\htdocs\joomla\templates\gk_corporate2\lib\gk.framework.php on line 891
Strict Standards: Non-static method JSite::getMenu() should not be called statically, assuming $this from incompatible context in C:\xampp\htdocs\joomla\templates\gk_corporate2\lib\gk.framework.php on line 645

Strict Standards: Non-static method JApplication::getMenu() should not be called statically, assuming $this from incompatible context in C:\xampp\htdocs\joomla\includes\application.php on line 539

Strict Standards: Non-static method JSite::getMenu() should not be called statically, assuming $this from incompatible context in C:\xampp\htdocs\joomla\templates\gk_corporate2\lib\gk.framework.php on line 645

Strict Standards: Non-static method JApplication::getMenu() should not be called statically, assuming $this from incompatible context in C:\xampp\htdocs\joomla\includes\application.php on line 539

Strict Standards: Non-static method JSite::getMenu() should not be called statically, assuming $this from incompatible context in C:\xampp\htdocs\joomla\templates\gk_corporate2\lib\gk.framework.php on line 645

Strict Standards: Non-static method JApplication::getMenu() should not be called statically, assuming $this from incompatible context in C:\xampp\htdocs\joomla\includes\application.php on line 539

Strict Standards: Non-static method JSite::getMenu() should not be called statically, assuming $this from incompatible context in C:\xampp\htdocs\joomla\templates\gk_corporate2\lib\gk.framework.php on line 645

Strict Standards: Non-static method JApplication::getMenu() should not be called statically, assuming $this from incompatible context in C:\xampp\htdocs\joomla\includes\application.php on line 539

Strict Standards: Non-static method JSite::getMenu() should not be called statically, assuming $this from incompatible context in C:\xampp\htdocs\joomla\templates\gk_corporate2\lib\gk.framework.php on line 645

Strict Standards: Non-static method JApplication::getMenu() should not be called statically, assuming $this from incompatible context in C:\xampp\htdocs\joomla\includes\application.php on line 539

Strict Standards: Non-static method JSite::getMenu() should not be called statically, assuming $this from incompatible context in C:\xampp\htdocs\joomla\templates\gk_corporate2\lib\gk.framework.php on line 645

Strict Standards: Non-static method JApplication::getMenu() should not be called statically, assuming $this from incompatible context in C:\xampp\htdocs\joomla\includes\application.php on line 539
User avatar
Fresh Boarder

GK User
Thu Aug 02, 2012 11:14 am
Please disable strict standards in your server (probably local server). Then please also disable display_errors option in php.ini file. All this settings are recommended by Joomla installer and it was mentioned many times on our forum.
User avatar
Platinum Boarder

GK User
Fri Aug 03, 2012 6:44 pm
Your solution hides the errors, but not solved. Could you give me a real solution to each error that occur?

Thanks
User avatar
Fresh Boarder

GK User
Fri Aug 03, 2012 10:39 pm
First of all this are not errors - only messages about strict standars. Please configure you server according to Joomla CMS - this is the solution.
User avatar
Platinum Boarder

GK User
Mon Oct 29, 2012 1:41 pm
Hi all,

in my case (using Gavern3), I solved that make this:

In the declaration (lines 105 at 111 - templates/meet_gavern/lib/framework/helper.layout.php):
Code: Select all
// function to check if the page is frontpage
function isFrontpage() {
   // get all known languages
   $languages = JLanguage::getKnownLanguages();
   $menu = JSite::getMenu();  // line with generated error


I commented the line with $menu and put this two lines:
Code: Select all
   $app = JFactory::getApplication();
   $menu = $app->getMenu();


And, the new declaration is:
Code: Select all
function isFrontpage() {
   // get all known languages
   $languages = JLanguage::getKnownLanguages();
   $app = JFactory::getApplication();
   $menu = $app->getMenu();
   // $menu = JSite::getMenu();


And, the warnings of the Strict Standards gone. I hope this helps you. ;)
User avatar
Fresh Boarder

GK User
Tue Oct 30, 2012 9:08 am
I'm not sure whether this solution will work properly with multi-language menu. As you can see here http://www.kavdesign.net/blog/category/joomla/

There are some differences in 1.6/1.7/2.5 to avoid Strict Standards errors. Use the following code for a site where all content is in the same language:
<?php
$app = JFactory::getApplication();
$menu = $app->getMenu();
if ($menu->getActive() == $menu->getDefault()) {
echo 'This is the front page';
}
?>
User avatar
Platinum Boarder

GK User
Fri Dec 28, 2012 4:12 am
It happened to our sites after upgrading to php 5.4.9 version from previous 5.2.17
Still the server admin for our VPS can't fix it. One sub-domain gets redirected to the main-domain now.

Waiting for solutions urgently.

The upgrade was necessary since many extension won't work on outdated php versions.
User avatar
Fresh Boarder

GK User
Fri Dec 28, 2012 9:30 pm
You just need to configure your server properly - there is no other way. You need to disable strict standards and displaying errors in PHP configuraiton not in template but of course you can try with some ini_set rules but this thing should be changed in server config.
User avatar
Platinum Boarder


cron
Remember me
Register New Account
If you are old Gavick user, click HERE for steps to retrieve your account.