The Joomla! Forum ™



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.



Post new topic Reply to topic  [ 14 posts ] 
Author Message
PostPosted: Thu Jul 13, 2006 9:32 pm 
User avatar
Joomla! Hero
Joomla! Hero
Offline

Joined: Thu Aug 25, 2005 5:48 pm
Posts: 2860
Location: Geneva mostly
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.blog spot.com for J! 1.5 screenshots
http://www.eyezberg.com


Top
 Profile  
 
PostPosted: Thu Jul 20, 2006 4:32 pm 
Joomla! Guru
Joomla! Guru
Offline

Joined: Thu Aug 18, 2005 9:46 am
Posts: 824
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.


Top
 Profile  
 
PostPosted: Fri Jul 21, 2006 8:18 am 
Joomla! Guru
Joomla! Guru
Offline

Joined: Thu Aug 18, 2005 9:46 am
Posts: 824
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.


Top
 Profile  
 
PostPosted: Fri Jul 21, 2006 9:45 am 
Joomla! Guru
Joomla! Guru
Offline

Joined: Thu Aug 18, 2005 9:46 am
Posts: 824
OK, there we go for the final to get the right Itemid in both cases.
includes/joomla.php line 1496
Code:
      global $Itemid,;
change to
Code:
      global $Itemid, $option;
insert after line 1498 holding
Code:
      $_Itemid = '';
This piece of coding
Code:
      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. :)


Top
 Profile  
 
PostPosted: 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 < http://forum.joomla.org/index.php/topic,79126.0.html >
Re: [KNOWN ISSUE] Wrong itemid on frontpage < http://forum.joomla.org/index.php/topic ... 89256.html >


Last edited by AmyStephen on Tue Aug 01, 2006 9:05 pm, edited 1 time in total.

Top
  
 
PostPosted: Thu Aug 03, 2006 2:36 pm 
Joomla! Apprentice
Joomla! Apprentice
Offline

Joined: Sat Jan 28, 2006 11:37 pm
Posts: 9
Just made the change and it works for me.


Top
 Profile  
 
PostPosted: Mon Aug 07, 2006 11:37 pm 
Joomla! Apprentice
Joomla! Apprentice
Offline

Joined: Fri Aug 04, 2006 10:29 pm
Posts: 5
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:
$row->_Itemid = $mainframe->getItemid( $row->id, 0, 0 );


Changed to:
Code:
$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


Top
 Profile  
 
PostPosted: 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


Top
  
 
PostPosted: Wed Aug 09, 2006 9:02 pm 
Joomla! Apprentice
Joomla! Apprentice
Offline

Joined: Tue Jul 25, 2006 12:08 am
Posts: 14
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.
.


Top
 Profile  
 
PostPosted: Thu Aug 10, 2006 8:44 am 
Joomla! Guru
Joomla! Guru
Offline

Joined: Wed Sep 21, 2005 9:27 am
Posts: 702
Location: Somewhere
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:
$row->_Itemid = $mainframe->getItemid( $row->id, 0, 0 );


Changed to:
Code:
$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

_________________
Don't confuse me with facts. Read
http://www.heise.de/security/Massenhack ... from/rss09


Top
 Profile  
 
PostPosted: Thu Oct 05, 2006 2:17 am 
User avatar
Joomla! Enthusiast
Joomla! Enthusiast
Offline

Joined: Sun Mar 12, 2006 5:34 am
Posts: 211
walb wrote:
OK, there we go for the final to get the right Itemid in both cases.
includes/joomla.php line 1496
Code:
      global $Itemid,;
change to
Code:
      global $Itemid, $option;
insert after line 1498 holding
Code:
      $_Itemid = '';
This piece of coding
Code:
      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:
$row->_Itemid = $mainframe->getItemid( $row->id, 0, 0 );


Changed to:
Code:
$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..  ???

_________________
Yes! I always have coffee when I watch radar. You know that.


Last edited by fugazer on Thu Oct 05, 2006 2:40 am, edited 1 time in total.

Top
 Profile  
 
PostPosted: Mon Oct 16, 2006 9:01 pm 
User avatar
Joomla! Enthusiast
Joomla! Enthusiast
Offline

Joined: Sun Oct 02, 2005 4:39 pm
Posts: 222
Location: Johannesburg, South Africa
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?

_________________
http://www.softdux.com
http://forum.softdux.com


Top
 Profile  
 
PostPosted: Tue Oct 17, 2006 1:45 am 
Joomla! Apprentice
Joomla! Apprentice
Offline

Joined: Sat Jan 28, 2006 11:37 pm
Posts: 9
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.

 


Top
 Profile  
 
PostPosted: Wed Jan 03, 2007 1:07 pm 
Joomla! Enthusiast
Joomla! Enthusiast
Offline

Joined: Fri Mar 31, 2006 3:40 pm
Posts: 106
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

_________________
Collection of Tricks and Easy Ways to Lose Weight - http://loseweight.haktanir.org
Joomla Help Blog - http://joomlaishere.blog spot.com/


Last edited by haktanir on Wed Jan 03, 2007 1:26 pm, edited 1 time in total.

Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 14 posts ] 



Who is online

Users browsing this forum: No registered users and 12 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Jump to:  
Powered by phpBB® Forum Software © phpBB Group