[fixed in svn]Noticed error in Joomla 1.5
-
- Joomla! Apprentice
- Posts: 14
- Joined: Sun Nov 18, 2007 8:41 pm
[fixed in svn]Noticed error in Joomla 1.5
I got this error info below.
"Notice: Trying to get property of non-object in ..\includes\router.php on line 302"
This is a stranger problem. It's only happened when you change to other page after I got the notice error, "Notice: Undefined index: id in C:\php\www\support\components\com_content\router.php on line 38" .
"Notice: Trying to get property of non-object in ..\includes\router.php on line 302"
This is a stranger problem. It's only happened when you change to other page after I got the notice error, "Notice: Undefined index: id in C:\php\www\support\components\com_content\router.php on line 38" .
Last edited by infograf768 on Thu Jan 31, 2008 8:13 am, edited 1 time in total.
-
- Joomla! Apprentice
- Posts: 14
- Joined: Sun Nov 18, 2007 8:41 pm
Re: Noticed error in Joomla 1.5
I found this problem is about Joomla SEF. When I turned off Joomla SEF in Global configuration, this noticed error never showed up. It came again after I turned on Joomla SEF.
- withincontext
- Joomla! Apprentice
- Posts: 18
- Joined: Sun Jan 27, 2008 6:24 am
Re: Noticed error in Joomla 1.5
If you have Joomla SEF turned on in the global config, and you create a menu item that links to the homepage (type: Frontpage Blog), then it will generate this error on the homepage. What's frustrating is that if you go to http://dev.site.com/ the homepage displays fine with Joomla SEF. If you click the menu item and browser to http://dev.site.com/home.html, you get the aforementioned index error:
"Notice: Undefined index: id in...router.php on line 38"
I think it just needs an extra conditional to make sure [id] isn't empty.
"Notice: Undefined index: id in...router.php on line 38"
I think it just needs an extra conditional to make sure [id] isn't empty.
-
- Joomla! Apprentice
- Posts: 14
- Joined: Sun Nov 18, 2007 8:41 pm
Re: Noticed error in Joomla 1.5
Your description is exactly what I met. Hope they notice this problem and fix it.
-
- Joomla! Apprentice
- Posts: 20
- Joined: Sun Jan 13, 2008 10:01 am
Re: Noticed error in Joomla 1.5
I can not seem to re-generate the same error and it works just fine for me when I made a new menu item for my top menu that links to the front page (blog style). Perhaps you're using an older version of .htaccess? (care to post what your .htaccess looks like).
- withincontext
- Joomla! Apprentice
- Posts: 18
- Joined: Sun Jan 27, 2008 6:24 am
Re: Noticed error in Joomla 1.5
Perhaps I'm using old rewrite code? Here is what I've got in .htaccess:
RewriteEngine On
RewriteCond %{REQUEST_URI} ^(/component/option,com) [NC,OR] ##optional - see notes##
RewriteCond %{REQUEST_URI} (/|\.htm|\.php|\.html|/[^.]*)$ [NC]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule (.*) index.php
RewriteCond %{QUERY_STRING} mosConfig_[a-zA-Z_]{1,21}(=|\%3D) [OR]
RewriteCond %{QUERY_STRING} base64_encode.*\(.*\) [OR]
RewriteCond %{QUERY_STRING} (\|%3E) [NC,OR]
RewriteCond %{QUERY_STRING} GLOBALS(=|\[|\%[0-9A-Z]{0,2}) [OR]
RewriteCond %{QUERY_STRING} _REQUEST(=|\[|\%[0-9A-Z]{0,2})
RewriteRule ^(.*)$ index.php [F,L]
RewriteEngine On
RewriteCond %{REQUEST_URI} ^(/component/option,com) [NC,OR] ##optional - see notes##
RewriteCond %{REQUEST_URI} (/|\.htm|\.php|\.html|/[^.]*)$ [NC]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule (.*) index.php
RewriteCond %{QUERY_STRING} mosConfig_[a-zA-Z_]{1,21}(=|\%3D) [OR]
RewriteCond %{QUERY_STRING} base64_encode.*\(.*\) [OR]
RewriteCond %{QUERY_STRING} (\|%3E) [NC,OR]
RewriteCond %{QUERY_STRING} GLOBALS(=|\[|\%[0-9A-Z]{0,2}) [OR]
RewriteCond %{QUERY_STRING} _REQUEST(=|\[|\%[0-9A-Z]{0,2})
RewriteRule ^(.*)$ index.php [F,L]
- withincontext
- Joomla! Apprentice
- Posts: 18
- Joined: Sun Jan 27, 2008 6:24 am
Re: Noticed error in Joomla 1.5
Well, it looks like I was using an old .htaccess. Unfortunately, updating to the version included with 1.5 stable didn't solve my problem.
-
- Joomla! Enthusiast
- Posts: 126
- Joined: Tue Jun 05, 2007 10:12 pm
Re: Noticed error in Joomla 1.5
If any one knows what to fix this please post it here as alot of users including me are having this problem.
I actually started out with a full Joomla 1.5 Stable install and stuff and with the correct .htaccess unforently my site says "Direct access to this location is not allowed" and it usaully has the name of the menuitem about that. I changed the default menuitem to a different menu and I can't changing it back doesn't help (although I'm not sure what it was before I changed it) but changing it to Frontpage or anything else won't work. Disabling SEF won't work for me either. Disabling .htaccess for me doesn't work either.
Hoping someone can help me and the others that have this problem.
-Mike
I actually started out with a full Joomla 1.5 Stable install and stuff and with the correct .htaccess unforently my site says "Direct access to this location is not allowed" and it usaully has the name of the menuitem about that. I changed the default menuitem to a different menu and I can't changing it back doesn't help (although I'm not sure what it was before I changed it) but changing it to Frontpage or anything else won't work. Disabling SEF won't work for me either. Disabling .htaccess for me doesn't work either.
Hoping someone can help me and the others that have this problem.
-Mike
- infograf768
- Joomla! Master
- Posts: 19133
- Joined: Fri Aug 12, 2005 3:47 pm
- Location: **Translation Matters**
Re: Noticed error in Joomla 1.5
Moving to 1.5 Q&T
Jean-Marie Simonet / infograf
---------------------------------
ex-Joomla Translation Coordination Team • ex-Joomla! Production Working Group
---------------------------------
ex-Joomla Translation Coordination Team • ex-Joomla! Production Working Group
-
- Joomla! Intern
- Posts: 80
- Joined: Tue Jul 17, 2007 8:13 am
Re: Noticed error in Joomla 1.5
Found out how to fix this:
Change line 38 in router.php (directory: components/com_content) from:
if ($query['id'] != $menuItem->query['id']) {
to:
if (isset( $menuItem->query['id']) && $query['id'] != $menuItem->query['id']) {
Works a treat!
Change line 38 in router.php (directory: components/com_content) from:
if ($query['id'] != $menuItem->query['id']) {
to:
if (isset( $menuItem->query['id']) && $query['id'] != $menuItem->query['id']) {
Works a treat!
Last edited by wardy83 on Wed Jan 30, 2008 1:25 pm, edited 1 time in total.
- withincontext
- Joomla! Apprentice
- Posts: 18
- Joined: Sun Jan 27, 2008 6:24 am
Re: Noticed error in Joomla 1.5
Code: Select all
if (isset( $menuItem->query['id']) && $query['id'] != $menuItem->query['id']) {
- ianmac
- Joomla! Virtuoso
- Posts: 4784
- Joined: Sat Sep 24, 2005 11:01 pm
- Location: Toronto, Canada
Re: Noticed error in Joomla 1.5
Fixed in SVN.
Ian
Ian
- ircmaxell
- Joomla! Ace
- Posts: 1926
- Joined: Thu Nov 10, 2005 3:10 am
- Location: New Jersey, USA
- Contact:
Re: Noticed error in Joomla 1.5
Fixed in SVN (tracker item 9535).
Anthony Ferrara - Core Team - Development Coordinator - Bug Squad - JSST
http://moovum.com/ - The Bird is in the air! Get Mollom Anti-Spam on your Joomla! website with Moovur...
http://www.joomlaperformance.com For All Your Joomla Performance Needs
http://moovum.com/ - The Bird is in the air! Get Mollom Anti-Spam on your Joomla! website with Moovur...
http://www.joomlaperformance.com For All Your Joomla Performance Needs