Undefined index / variable error - SOLVED!
Moderator: General Support Moderators
Forum rules
Forum Rules
Absolute Beginner's Guide to Joomla! <-- please read before posting, this means YOU.
Forum Rules
Absolute Beginner's Guide to Joomla! <-- please read before posting, this means YOU.
- violinar
- Joomla! Apprentice
- Posts: 12
- Joined: Mon Jan 10, 2011 8:27 pm
Undefined index / variable error - SOLVED!
When I install a new template to Joomla! Version 1.5.22, on my homepage above the content on the white background it says:
Notice: Undefined index: ALL_HTTP in /var/www/html/websitename/templates/nameofthetemplate/index.php on line 28
Notice: Undefined variable: user123 in /var/www/html/websitename/templates/nameofthetemplate/layouts/default/header.php on line 9
Notice: Undefined variable: user45 in /var/www/html/websitename/templates/nameofthetemplate/layouts/default/header.php on line 15
PHP on this server is : 5.2.13
Notice: Undefined index: ALL_HTTP in /var/www/html/websitename/templates/nameofthetemplate/index.php on line 28
Notice: Undefined variable: user123 in /var/www/html/websitename/templates/nameofthetemplate/layouts/default/header.php on line 9
Notice: Undefined variable: user45 in /var/www/html/websitename/templates/nameofthetemplate/layouts/default/header.php on line 15
PHP on this server is : 5.2.13
Last edited by violinar on Tue Jan 11, 2011 10:50 am, edited 1 time in total.
- Webdongle
- Joomla! Master
- Posts: 44093
- Joined: Sat Apr 05, 2008 9:58 pm
Re: Undefined index / variable when I install new template
Local or remote install ?
Custom Template ?
Custom Template ?
http://www.weblinksonline.co.uk/
https://www.weblinksonline.co.uk/updating-joomla.html
"When I'm right no one remembers but when I'm wrong no one forgets".
https://www.weblinksonline.co.uk/updating-joomla.html
"When I'm right no one remembers but when I'm wrong no one forgets".
- violinar
- Joomla! Apprentice
- Posts: 12
- Joined: Mon Jan 10, 2011 8:27 pm
Re: Undefined index / variable when I install new template
I've been installing Joomla! using FileZilla FTP Client.
Here I've found free templates http://www.joomla24.com/ which perfectly function on my other Joomla! (Version 1.5.21) website (which is on another server).
This server (where is Joomla! which has problems with installing new templates) is on Linux.
Here I've found free templates http://www.joomla24.com/ which perfectly function on my other Joomla! (Version 1.5.21) website (which is on another server).
This server (where is Joomla! which has problems with installing new templates) is on Linux.
- Webdongle
- Joomla! Master
- Posts: 44093
- Joined: Sat Apr 05, 2008 9:58 pm
Re: Undefined index / variable when I install new template
Look at Joomla admin >>>> Help >>> System info ... Directory permissions Tab
What does it say ?
What does it say ?
http://www.weblinksonline.co.uk/
https://www.weblinksonline.co.uk/updating-joomla.html
"When I'm right no one remembers but when I'm wrong no one forgets".
https://www.weblinksonline.co.uk/updating-joomla.html
"When I'm right no one remembers but when I'm wrong no one forgets".
- violinar
- Joomla! Apprentice
- Posts: 12
- Joined: Mon Jan 10, 2011 8:27 pm
Re: Undefined index / variable when I install new template
Everything was writable (today afternoon) but still I keep receiving those annoying notes. This evening I've reinstalled Joomla! but everything became unwritable with the same annoying notes on the website page (after installing new templates). Right now I'm making everything writable again, and I will let you know if anything changed (but I doubt that Undefined index / variable notes are gone).
I was searching a lot on Joomla! forum for the answer, but it seams that I'm the only one who get Undefined index / variable notes after installing new templates...
I must tell you that each template has it's own note. Here is another message which I keep receiving above the content:
Notice: Undefined variable: my in /var/www/html/websitename/templates/templatename/index.php on line 34
Notice: Trying to get property of non-object in /var/www/html/websitename/templates/templatename/index.php on line 34
I was searching a lot on Joomla! forum for the answer, but it seams that I'm the only one who get Undefined index / variable notes after installing new templates...
I must tell you that each template has it's own note. Here is another message which I keep receiving above the content:
Notice: Undefined variable: my in /var/www/html/websitename/templates/templatename/index.php on line 34
Notice: Trying to get property of non-object in /var/www/html/websitename/templates/templatename/index.php on line 34
- violinar
- Joomla! Apprentice
- Posts: 12
- Joined: Mon Jan 10, 2011 8:27 pm
Re: Undefined index / variable when I install new template
Everything is writable.Webdongle wrote:Look at Joomla admin >>>> Help >>> System info ... Directory permissions Tab
What does it say ?
- Webdongle
- Joomla! Master
- Posts: 44093
- Joined: Sat Apr 05, 2008 9:58 pm
Re: Undefined index / variable when I install new template
It appears that your Template is asking for a variable that it (or one of it's files) did not define. Either because the person who designed the Template forgot to put it in or because the index.php file can not find/read the file it is defined in.
http://en.wikipedia.org/wiki/Undefined_variable
http://en.wikipedia.org/wiki/Undefined_variable
http://www.weblinksonline.co.uk/
https://www.weblinksonline.co.uk/updating-joomla.html
"When I'm right no one remembers but when I'm wrong no one forgets".
https://www.weblinksonline.co.uk/updating-joomla.html
"When I'm right no one remembers but when I'm wrong no one forgets".
- violinar
- Joomla! Apprentice
- Posts: 12
- Joined: Mon Jan 10, 2011 8:27 pm
Re: Undefined index / variable when I install new template
With every template which I install I receive notes/errors. So, I doubt that all of the designers made the same mistake.Webdongle wrote:It appears that your Template is asking for a variable that it (or one of it's files) did not define. Either because the person who designed the Template forgot to put it in or because the index.php file can not find/read the file it is defined in.
http://en.wikipedia.org/wiki/Undefined_variable
If index.php can't find/read the file, what should I do?
- Webdongle
- Joomla! Master
- Posts: 44093
- Joined: Sat Apr 05, 2008 9:58 pm
Re: Undefined index / variable when I install new template
It must be a path or permissions issue
What is the url ?
What is the url ?
http://www.weblinksonline.co.uk/
https://www.weblinksonline.co.uk/updating-joomla.html
"When I'm right no one remembers but when I'm wrong no one forgets".
https://www.weblinksonline.co.uk/updating-joomla.html
"When I'm right no one remembers but when I'm wrong no one forgets".
- violinar
- Joomla! Apprentice
- Posts: 12
- Joined: Mon Jan 10, 2011 8:27 pm
Re: Undefined index / variable when I install new template
Webdongle wrote:It must be a path or permissions issue
What is the url ?
Last edited by violinar on Tue Jan 11, 2011 10:21 am, edited 1 time in total.
- Webdongle
- Joomla! Master
- Posts: 44093
- Joined: Sat Apr 05, 2008 9:58 pm
Re: Undefined index / variable when I install new template
The output is
So it is complaining about (see the line ?
Then it complains about
Code: Select all
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" lang="<br />
<b>Notice</b>: Use of undefined constant _LANGUAGE - assumed '_LANGUAGE' in <b>/var/www/html/stradivari/templates/morit/index.php</b> on line <b>25</b><br />
_LANGUAGE" xml:lang="<br />
<b>Notice</b>: Use of undefined constant _LANGUAGE - assumed '_LANGUAGE' in <b>/var/www/html/stradivari/templates/morit/index.php</b> on line <b>25</b><br />
_LANGUAGE">
<head>
Code: Select all
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="<?php echo $this->language; ?>" lang="<?php echo $this->language; ?>" >
<head>
Code: Select all
<script type="text/javascript" src="/media/system/js/caption.js"></script>
<br />
<b>Notice</b>: Undefined variable: my in <b>/var/www/html/stradivari/templates/morit/index.php</b> on line <b>36</b><br />
<br />
<b>Notice</b>: Trying to get property of non-object in <b>/var/www/html/stradivari/templates/morit/index.php</b> on line <b>36</b><br />
<meta http-equiv="Content-Type" content="text/html; <br />
http://www.weblinksonline.co.uk/
https://www.weblinksonline.co.uk/updating-joomla.html
"When I'm right no one remembers but when I'm wrong no one forgets".
https://www.weblinksonline.co.uk/updating-joomla.html
"When I'm right no one remembers but when I'm wrong no one forgets".
- violinar
- Joomla! Apprentice
- Posts: 12
- Joined: Mon Jan 10, 2011 8:27 pm
Re: Undefined index / variable when I install new template
Thank you Webdongle. Could you tell me how can I fix that? Which file (index.php ?) should I edit (and which information should I type)?
- kurchania
- Joomla! Hero
- Posts: 2070
- Joined: Mon Sep 21, 2009 6:56 am
- Location: indore,india
- Contact:
Re: Undefined index / variable when I install new template
hi violinar,
in live site you you want to show the warning and message.not a good practice.
open
/var/www/html/stradivari/templates/morit/index.php
after line
defined( '_JEXEC' ) or die( 'Restricted access' );
add this line
Regards
Abhijeet
in live site you you want to show the warning and message.not a good practice.
open
/var/www/html/stradivari/templates/morit/index.php
after line
defined( '_JEXEC' ) or die( 'Restricted access' );
add this line
Code: Select all
error_reporting(0);
Abhijeet
abhijeet kurchania
The future depends on what you do today
The future depends on what you do today
- violinar
- Joomla! Apprentice
- Posts: 12
- Joined: Mon Jan 10, 2011 8:27 pm
Re: Undefined index / variable when I install new template
Thank you Abhijeet! You solve the problem!
Now I apply that code to all new templates which I install...
Now I apply that code to all new templates which I install...
- kurchania
- Joomla! Hero
- Posts: 2070
- Joined: Mon Sep 21, 2009 6:56 am
- Location: indore,india
- Contact:
Re: Undefined index / variable when I install new template
hi violinar,
also you can go to
http://docs.joomla.org/Screen.config.15#Server
you can see error_reporting option there.
make it to none.
please close the topic by marking right button or write at header solved.
Regards
Abhijeet
also you can go to
http://docs.joomla.org/Screen.config.15#Server
you can see error_reporting option there.
make it to none.
please close the topic by marking right button or write at header solved.
Regards
Abhijeet
abhijeet kurchania
The future depends on what you do today
The future depends on what you do today
- violinar
- Joomla! Apprentice
- Posts: 12
- Joined: Mon Jan 10, 2011 8:27 pm
Re: Undefined index / variable when I install new template
Done! Thanks again!
-
- Joomla! Fledgling
- Posts: 3
- Joined: Fri Jul 22, 2011 4:44 am
Re: Undefined index / variable when I install new template
Hy...i have the same problem with joomla 1.5 im using themza_j15_26 ... *Webdongle wrote:Local or remote install ?
Custom Template ?
Notice: Undefined variable: title in C:\wamp\www\Joomla 1.5.23\templates\themza_j15_26\functions.php on line 172
how do i fix it ???pls help
- Webdongle
- Joomla! Master
- Posts: 44093
- Joined: Sat Apr 05, 2008 9:58 pm
Re: Undefined index / variable error - SOLVED!
http://www.weblinksonline.co.uk/
https://www.weblinksonline.co.uk/updating-joomla.html
"When I'm right no one remembers but when I'm wrong no one forgets".
https://www.weblinksonline.co.uk/updating-joomla.html
"When I'm right no one remembers but when I'm wrong no one forgets".