[fixed in svn]Noticed error in Joomla 1.5

Locked
myden
Joomla! Apprentice
Joomla! Apprentice
Posts: 14
Joined: Sun Nov 18, 2007 8:41 pm

[fixed in svn]Noticed error in Joomla 1.5

Post by myden » Sun Jan 27, 2008 1:15 am

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" .
Last edited by infograf768 on Thu Jan 31, 2008 8:13 am, edited 1 time in total.

myden
Joomla! Apprentice
Joomla! Apprentice
Posts: 14
Joined: Sun Nov 18, 2007 8:41 pm

Re: Noticed error in Joomla 1.5

Post by myden » Sun Jan 27, 2008 9:04 pm

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.

User avatar
withincontext
Joomla! Apprentice
Joomla! Apprentice
Posts: 18
Joined: Sun Jan 27, 2008 6:24 am

Re: Noticed error in Joomla 1.5

Post by withincontext » Sun Jan 27, 2008 9:11 pm

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.

myden
Joomla! Apprentice
Joomla! Apprentice
Posts: 14
Joined: Sun Nov 18, 2007 8:41 pm

Re: Noticed error in Joomla 1.5

Post by myden » Mon Jan 28, 2008 5:50 pm

Your description is exactly what I met. Hope they notice this problem and fix it.

scsa20
Joomla! Apprentice
Joomla! Apprentice
Posts: 20
Joined: Sun Jan 13, 2008 10:01 am

Re: Noticed error in Joomla 1.5

Post by scsa20 » Mon Jan 28, 2008 6:11 pm

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

User avatar
withincontext
Joomla! Apprentice
Joomla! Apprentice
Posts: 18
Joined: Sun Jan 27, 2008 6:24 am

Re: Noticed error in Joomla 1.5

Post by withincontext » Tue Jan 29, 2008 11:53 pm

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]

User avatar
withincontext
Joomla! Apprentice
Joomla! Apprentice
Posts: 18
Joined: Sun Jan 27, 2008 6:24 am

Re: Noticed error in Joomla 1.5

Post by withincontext » Wed Jan 30, 2008 12:01 am

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.

0vermind
Joomla! Enthusiast
Joomla! Enthusiast
Posts: 126
Joined: Tue Jun 05, 2007 10:12 pm

Re: Noticed error in Joomla 1.5

Post by 0vermind » Wed Jan 30, 2008 12:13 am

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

User avatar
infograf768
Joomla! Master
Joomla! Master
Posts: 18872
Joined: Fri Aug 12, 2005 3:47 pm
Location: **Translation Matters**

Re: Noticed error in Joomla 1.5

Post by infograf768 » Wed Jan 30, 2008 8:00 am

Moving to 1.5 Q&T
Jean-Marie Simonet / infograf · http://www.info-graf.fr
---------------------------------
ex-Joomla Translation Coordination Team • ex-Joomla! Production Working Group

wardy83
Joomla! Intern
Joomla! Intern
Posts: 80
Joined: Tue Jul 17, 2007 8:13 am

Re: Noticed error in Joomla 1.5

Post by wardy83 » Wed Jan 30, 2008 1:23 pm

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!
Last edited by wardy83 on Wed Jan 30, 2008 1:25 pm, edited 1 time in total.

User avatar
withincontext
Joomla! Apprentice
Joomla! Apprentice
Posts: 18
Joined: Sun Jan 27, 2008 6:24 am

Re: Noticed error in Joomla 1.5

Post by withincontext » Wed Jan 30, 2008 4:51 pm

Code: Select all

if (isset( $menuItem->query['id']) && $query['id'] != $menuItem->query['id']) {
Worked for me!

User avatar
ianmac
Joomla! Virtuoso
Joomla! Virtuoso
Posts: 4784
Joined: Sat Sep 24, 2005 11:01 pm
Location: Toronto, Canada

Re: Noticed error in Joomla 1.5

Post by ianmac » Wed Jan 30, 2008 7:09 pm

Fixed in SVN.



Ian

User avatar
ircmaxell
Joomla! Ace
Joomla! Ace
Posts: 1926
Joined: Thu Nov 10, 2005 3:10 am
Location: New Jersey, USA
Contact:

Re: Noticed error in Joomla 1.5

Post by ircmaxell » Wed Jan 30, 2008 7:20 pm

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


Locked

Return to “Q&T 1.5.x Resolved”