Translate This Page

About Me

profile_picture_120

Name: Joshua Lyon
Birthday: August 8, 1985
Location: Valley Ranch (Irving), TX
E-mail: josh@boshdirect.com

Related Articles

Content View Hits : 1258753
Joomla Templates getItems() Issue
Written by Josh Lyon   
Friday, 15 August 2008 15:54

If you start getting template errors (specifically with JoomlaArt templates) like the one below, just replace the lines of code listed below. I've noticed this happen on JA_Fagus and JA_Purity... although I think JA_Purity was fixed in the 1.5.6 Joomla packages.

Fatal error: Call to a member function getItems() on a non-object in /***/templates/ja_***/ja_menus/Base.class.php on line ***. 

Open up the file that has the error in it and look for the following line:

$menu = @JMenu :: getInstance(); 

And replace it with:

$menu = &JSite::getMenu(); 

Comments (7)

...
0
Great stuff! Solved my problem. Cheers!
FiulPloii , July 11, 2009
thanks .
0
many thanks buddy , i checked atleast a dozen website's to find this fix but atlast when i felt to totally abandon this template ur info assisted me a lot & helped me resume the template . thanks .
pearllysun , October 26, 2009 | url
it's still dosen't work
0
Thanks for Lyon's code, I've install the "Ja_fagus" template,
and the top-menu cannot be viewed,is show that:

Warning: Invalid argument supplied for foreach() in ...templatesja_fagusja_menusBase.class.php on line 30

I couldn't find the way to solve it, help me please smilies/smiley.gif

philsu , December 07, 2009 | url
the error sample view
0
philsu , December 07, 2009 | url
warning at line 34
0
i`ve changed line 21 but it appears another error at line 34
Warning: Invalid argument supplied for foreach() in C:xampphtdocsJoomla150 emplatesja_purityja_menusBase.class.php on line 34

line34: foreach ($items as $index=> $v) {
Simona , December 15, 2009 | url
Perfecto Ok.
0
Definitivamente funciono.
Oscar , June 17, 2010
...
0
You are a Genius...thanks so muchsmilies/cheesy.gifsmilies/cheesy.gifsmilies/cheesy.gifsmilies/cheesy.gifsmilies/cheesy.gifsmilies/cheesy.gifsmilies/cheesy.gif
Some Dude , October 27, 2010

Write comment

smaller | bigger
security image
Write the displayed characters

busy