ItemID missing in com_frontpage

General questions relating to Joomla! There are other boards for more specific help on Joomla! features and extensions.

Moderator: General Support Moderators

Forum rules
Forum Rules
Absolute Beginner's Guide to Joomla! <-- please read before posting, this means YOU.
Forum Post Assistant - If you are serious about wanting help, you will use this tool to help you post.
Locked
User avatar
eyezberg
Joomla! Hero
Joomla! Hero
Posts: 2860
Joined: Thu Aug 25, 2005 5:48 pm
Location: Geneva mostly
Contact:

ItemID missing in com_frontpage

Post by eyezberg » Thu Jul 13, 2006 9:32 pm

A french user asked me to take a look at his site because of a weird problem.

On the frontpage, all menu links work fine, but all links in content (com_frontpage) are missing the itemID.
This means that clicking any read more or article title will display the "not authorised" message.

Once logged into the frontend (which is not supposed to provide login functionality, all content is public access!), everything works again.

If anyone has any hint as to what could be done to fix this, I (he)'d be most gratefull.

Not logged=com_frontpage misses itemID, logged=all ok!?

No SEF, all caches cleared, Joomla 1.0.10, all menus, sections, cat's items etc are public, Trash is empty..
Sometimes one pays most for the things one gets for nothing.
The important thing is not to stop questioning. Curiosity has its own reason for existing. AE
http://joomla15.[URL banned].com for J! 1.5 screenshots
http://www.eyezberg.com

walb
Joomla! Guru
Joomla! Guru
Posts: 824
Joined: Thu Aug 18, 2005 9:46 am

Re: ItemID missing in com_frontpage

Post by walb » Thu Jul 20, 2006 4:32 pm

Hi Joe,
did you get any further on this?

Today I experienced the same on the frontpage.
I'm comparing 2 1.0.10 systems now.
One generates links with Itemid's. The other not.  ???
I'll try to get my fingers behind it.

walb
Joomla! Guru
Joomla! Guru
Posts: 824
Joined: Thu Aug 18, 2005 9:46 am

Re: ItemID missing in com_frontpage

Post by walb » Fri Jul 21, 2006 8:18 am

Let's have an update on this one.
Actually the J that is generating Itemid's, is generating wrong ones from a menuitem blog- content section type. Which is 9 in my case, but it should be 1 for the frontpage. So this is a wrong match.
In my second J not generating Itemid's apparently no match was found, hence no Itemiid was generated

So there is something wrong in the function getItemid in Joomla.
If I change in includes/joomla.php line 1745 from
} else if ( $Itemid != 99999999 && $Itemid === 0 ) {
to
} else if ( $Itemid != 99999999 && $Itemid !== 0 ) {

This is not the final solution, since it will not avoid the first J to generate wrong Itemid's.
But for the second J it returns now the correct Itemid and is displayed in the frontpage

Awaiting for a better solution I will update my production site with this fix.

walb
Joomla! Guru
Joomla! Guru
Posts: 824
Joined: Thu Aug 18, 2005 9:46 am

Re: ItemID missing in com_frontpage

Post by walb » Fri Jul 21, 2006 9:45 am

OK, there we go for the final to get the right Itemid in both cases.
includes/joomla.php line 1496

Code: Select all

		global $Itemid,;
change to

Code: Select all

		global $Itemid, $option;
insert after line 1498 holding

Code: Select all

		$_Itemid = '';
This piece of coding

Code: Select all

		if ($option == 'com_frontpage') {
			$_Itemid = $Itemid;
		}
This works! ;)

The previously mentioned change will not hurt, so I left it in, since it makes more sense to me. :)

AmyStephen

Re: ItemID missing in com_frontpage

Post by AmyStephen » Tue Aug 01, 2006 5:30 pm

Walb and Joe -

I was researching this problem for someone, and stumbled across a number of these. Did Walb's fix the problem? Did Rey check this out?

Thanks guys!
Amy

It looks like the same problem here and the following two places:

Click on Read More - Links shows "You are not allowed...." Since 1.0.10
Re: [KNOWN ISSUE] Wrong itemid on frontpage
Last edited by AmyStephen on Tue Aug 01, 2006 9:05 pm, edited 1 time in total.

beausoleilb1
Joomla! Apprentice
Joomla! Apprentice
Posts: 9
Joined: Sat Jan 28, 2006 11:37 pm

Re: ItemID missing in com_frontpage

Post by beausoleilb1 » Thu Aug 03, 2006 2:36 pm

Just made the change and it works for me.

waldorf75
Joomla! Apprentice
Joomla! Apprentice
Posts: 5
Joined: Fri Aug 04, 2006 10:29 pm

Re: ItemID missing in com_frontpage

Post by waldorf75 » Mon Aug 07, 2006 11:37 pm

Hi folks,

I had a similar problem with one my Joomla sites as initially posted by eyezberg. But on my J the Itemid in the read more links was just missing for all content items that are linked in the menu with an "Link - Content Item". The ItemID of the read more links of other articles were fine.

I just changed a 0 to a 1 the file components/com_content/content.html.php on line 556 (if I didn't add/deleted lines while changing code) in function _Itemid():

Original:

Code: Select all

$row->_Itemid = $mainframe->getItemid( $row->id, 0, 0 );
Changed to:

Code: Select all

$row->_Itemid = $mainframe->getItemid( $row->id, 0, 1 );
It seems as if this triggers the ContentItemLink support in getItemid() of joomla.php

Hope this helps

waldorf

AmyStephen

Re: ItemID missing in com_frontpage

Post by AmyStephen » Tue Aug 08, 2006 3:09 am

Thanks so much, Waldorf for the code, the analysis and for your feedback on the FAQ item. I wanted to inform you, and anyone else who is tracking this problem, that I posted your reply #6 in "Re: [KNOWN ISSUE] Wrong itemid on frontpage" topic http://forum.joomla.org/index.php/topic ... #msg428508 . (I also asked you a question there, if you get a chance to respond.)

@Walb - your code is there, as well.

Robin is watching over this problem at that location, so, I am trying to consolidate this information into one place.

Thanks all for your work on this. The ItemID is a real challenge at times. Robin and Rey take very good care of us and their work is much appreciated.

Amy

pasquatch
Joomla! Apprentice
Joomla! Apprentice
Posts: 14
Joined: Tue Jul 25, 2006 12:08 am

Re: ItemID missing in com_frontpage

Post by pasquatch » Wed Aug 09, 2006 9:02 pm

1 to a 0 worked like a charm!

I didn't need to post, but just wanted to thank you waldorf.  I had posted this problem elsewhere as I couldn't track this topic down until hours after the fact.  I will have to refine my tracking abilities. 

Bobo.
.

diri
Joomla! Guru
Joomla! Guru
Posts: 702
Joined: Wed Sep 21, 2005 9:27 am
Location: Somewhere

Re: ItemID missing in com_frontpage

Post by diri » Thu Aug 10, 2006 8:44 am

waldorf75 wrote: I just changed a 0 to a 1 the file components/com_content/content.html.php on line 556 (if I didn't add/deleted lines while changing code) in function _Itemid():

Original:

Code: Select all

$row->_Itemid = $mainframe->getItemid( $row->id, 0, 0 );
Changed to:

Code: Select all

$row->_Itemid = $mainframe->getItemid( $row->id, 0, 1 );
It seems as if this triggers the ContentItemLink support in getItemid() of joomla.php
Thanks, waldorf.

I want to add an additional symptom being caused by default settings:

You have a section with categories included (one or more). You introduce a menu item to show content list of this very section with visible titel.

Normally you see "SECTIONTITLE" (why is this uppercase-d?). In case of default settings you see "SECTIONTITLEARRAY".

This is true when menu points to section->blog as well.

cu, diri

User avatar
fugazer
Joomla! Enthusiast
Joomla! Enthusiast
Posts: 209
Joined: Sun Mar 12, 2006 5:34 am

Re: ItemID missing in com_frontpage

Post by fugazer » Thu Oct 05, 2006 2:17 am

walb wrote: OK, there we go for the final to get the right Itemid in both cases.
includes/joomla.php line 1496

Code: Select all

		global $Itemid,;
change to

Code: Select all

		global $Itemid, $option;
insert after line 1498 holding

Code: Select all

		$_Itemid = '';
This piece of coding

Code: Select all

		if ($option == 'com_frontpage') {
			$_Itemid = $Itemid;
		}
This works! ;)

The previously mentioned change will not hurt, so I left it in, since it makes more sense to me. :)
it appears this fix only half works... although i get the pathway showing after i click 'read on' its not the complete pathway.. only the parent is showing within the pathway,, no children.

Ex 'Homepage >'

where it should say 'Homepage > Example Page 1'

Also when applying waldorf's hack it stop's some of my other pages from showing a complete pathway..

Anyone have any better luck then I?

Furthermore, i have tried this code aswell:
waldorf75 wrote: Hi folks,

I had a similar problem with one my Joomla sites as initially posted by eyezberg. But on my J the Itemid in the read more links was just missing for all content items that are linked in the menu with an "Link - Content Item". The ItemID of the read more links of other articles were fine.

I just changed a 0 to a 1 the file components/com_content/content.html.php on line 556 (if I didn't add/deleted lines while changing code) in function _Itemid():

Original:

Code: Select all

$row->_Itemid = $mainframe->getItemid( $row->id, 0, 0 );
Changed to:

Code: Select all

$row->_Itemid = $mainframe->getItemid( $row->id, 0, 1 );
It seems as if this triggers the ContentItemLink support in getItemid() of joomla.php

Hope this helps

waldorf
this doesn't work for all my pages.. it seems that the first page in the frontpage manager doesn't show the path.. only for the following pages..

This is strage.. i tried creating a new page that would display first within the frontpage manager and it doesn't show the pathway either..  ???
Last edited by fugazer on Thu Oct 05, 2006 2:40 am, edited 1 time in total.
Yes! I always have coffee when I watch radar. You know that.

User avatar
SoftDux
Joomla! Enthusiast
Joomla! Enthusiast
Posts: 223
Joined: Sun Oct 02, 2005 4:39 pm
Location: Johannesburg, South Africa
Contact:

Re: ItemID missing in com_frontpage

Post by SoftDux » Mon Oct 16, 2006 9:01 pm

Can someone please tell me if this bug has been fixed? I'm not too keen on "hacking" the core. It only complicates things when it's time to upgrade. and I'm trying to avoid suppor issue arising from this as well. about 98% of our hosting customers use Joomla. Is there an official patch for this?

beausoleilb1
Joomla! Apprentice
Joomla! Apprentice
Posts: 9
Joined: Sat Jan 28, 2006 11:37 pm

Re: ItemID missing in com_frontpage

Post by beausoleilb1 » Tue Oct 17, 2006 1:45 am

Having played with this for so long now, I think I may have figured it out (now don't laugh if it isnt the right solution) but it may have just worked for me.  I found you need a published menu item linked to the category the item is located in, in order for the links to work properly.  This will make the pathway work properly and links in modules such as popular and lastestnews will work, along with the read more links. If someone can confirm this that would help, everyone, so I think.

 

haktanir
Joomla! Enthusiast
Joomla! Enthusiast
Posts: 106
Joined: Fri Mar 31, 2006 3:40 pm
Contact:

Re: ItemID missing in com_frontpage

Post by haktanir » Wed Jan 03, 2007 1:07 pm

I now have this problem using 1.0.12 due to the AkoComment Tweaked Special Edition component.

Everything on the frontpage shows as having ItemId of "1".

I have uninstalled the component but it has not solved the problem. Can anyone tell me what to do?

***EDIT***

Problem solved via post: http://forum.joomla.org/index.php/topic ... #msg617835
Last edited by haktanir on Wed Jan 03, 2007 1:26 pm, edited 1 time in total.
Collection of Tricks and Easy Ways to Lose Weight - http://loseweight.haktanir.org
Joomla Help Blog - http://joomlaishere.[URL banned].com/


Locked

Return to “General Questions - 1.0.x”