| Joomla! http://forum.joomla.org/ |
|
| Mambo/Joomla! creates wrong urls to items http://forum.joomla.org/viewtopic.php?f=32&t=3509 |
Page 1 of 1 |
| Author: | sc00zy [ Sat Sep 03, 2005 1:40 pm ] |
| Post subject: | Mambo/Joomla! creates wrong urls to items |
When I insert a link, Mambo/Joomla! doesn't do this correctly. An example: http://www.domain.com/index.php?option= ... =view&id=2&Itemid=0 That last part causes users have to login to watch the item. What can be the cause of this? The url should look like this: http://www.domain.com/index.php?option= ... =view&id=2&Itemid=49 Links to static items, sections and categories don't seem to be a problem. |
|
| Author: | stingrey [ Sat Sep 03, 2005 4:06 pm ] |
| Post subject: | Re: Mambo/Joomla! creates wrong urls to items |
Read my post below to understand what the problem could be: Quote: The problem is caused by the rather arcane complex and totally excruiating problems caused by the itemid system in mambo. Its one of the oldest parts of the code, going back into the mists of time and is being used far beyond its principle objective when it was created. Unfrotunately because it affects so many things, its somethign we can only fix with a major overhaul (e.g. 5.0) Anyway that doesnt help you. What you need to do is create a hidden menu (e.g. a menu whose mod_mainmenu module you do not publish). Now wht you need to do is to create a `Table - Content Section` for all your sections. The problem is that because you have no menu item that is linked with the sections that hold your news items, the system cannot assign the contents that reside within the section an itemid, so the default setting is to use the Itemid of your 'homepage' which in this case is 1. So when you click on any new item, the system still thinks your on the frontpage as it sees an Itemid of 1. Put another way. If you have two sections News Events And let say in all you Menus you have a Section for Events as a menu item, which gives it an Itemid of 16. Now all news items in the Events section will inherit an itemid of 16 But let say you News section has no link in any of your menus. So the default behavious takes over and its is assigned an itemid of 1 taken from http://forum.mamboserver.com/showthread ... ght=itemid |
|
| Author: | sc00zy [ Sat Sep 03, 2005 9:14 pm ] |
| Post subject: | Re: Mambo/Joomla! creates wrong urls to items |
Thanks ![]() I'll keep you posted if it works or not. |
|
| Author: | sc00zy [ Sun Sep 04, 2005 11:14 am ] |
| Post subject: | Re: Mambo/Joomla! creates wrong urls to items |
It works like a charm! Thank you very much for this tip! |
|
| Author: | stingrey [ Sun Sep 04, 2005 2:40 pm ] |
| Post subject: | Re: Mambo/Joomla! creates wrong urls to items |
Well I wouldnt say its a tip, its actually more a hole within the system due to the arachaic nature of Itemid. It really needs to be fixed but as it is endemic throughout Mambo/Joomla! its something unfortunately only a complete overhaul can correct. |
|
| Author: | sc00zy [ Mon Sep 05, 2005 12:34 am ] |
| Post subject: | Re: Mambo/Joomla! creates wrong urls to items |
Ok thanks for pointing out that hole in the system ![]() I never experienced it before but now I know how to handle it. |
|
| Author: | Serial [ Wed Sep 07, 2005 4:44 am ] |
| Post subject: | Re: Mambo/Joomla! creates wrong urls to items |
Thank God for this post! I was breaking my head over this for a whole 4 hours and finally I get my headache relief thx stingrey |
|
| Author: | rsphaeroides [ Wed Sep 07, 2005 4:37 pm ] |
| Post subject: | Re: Mambo/Joomla! creates wrong urls to items |
Serial wrote: Thank God for this post! I was breaking my head over this for a whole 4 hours and finally I get my headache relief I've been at it for days (http://forum.opensourcematters.org/index.php/topic,3862.15.html and over at mambo previously), and finally recognized that this issue is probably the same one that is causing all of the links/URLs on Table-Content Category and Blog-Content Category pages to be incorrect. stingrey, Is there a fix for the incorrect Itemid appended to every linked title on a Table-Content Category page and to every content item whether "leading", "intro", "link" or "readmore" on a Blog-Content Category page. The items are all already associated with a menu, but that doesn't seem to help. Without the correct Itemid when you click a link to view a content item the related link module can't update, the pathway is altered, the active item on the menu is wrong... there's a detailed description of the problem I'm having and screen shots at http://forum.opensourcematters.org/index.php/topic,3862.15.html |
|
| Author: | xgipper [ Thu Sep 08, 2005 10:05 am ] |
| Post subject: | Re: Mambo/Joomla! creates wrong urls to items |
I'm not sure if this 'wrong urls' is the same as the problem I'm having: I have items published on my front page, which are supposed to be 'public'. But when the 'read more' link is followed, now readers are told they need to log in. It didn't used to be this way. What have I recently done? Added a new user menu item -' Member offers', for people who log in, which links to one page of static content only for users. If I unpublish this item it makes no difference. However you can read full front page content by following the 'latest news' module link, or by using the 'latest' menu link to the table of content. They have slightly different linking urls. I have tried creating a new menu, not publishing it, and having menu items (which are published) linking to a table for each of my sections (have I understood this correctly), but this hasn't resolved it. Any ideas please, to make my public content public again? Thanks |
|
| Author: | xgipper [ Thu Sep 08, 2005 4:05 pm ] |
| Post subject: | Re: Mambo/Joomla! creates wrong urls to items |
Does this help? The 'read more' link from the front page of one particular item is: http://www.sitename/index.php?option=co ... view&id=47 - which tells me I need to log in (even though the item's public) The 'latest' module link to that item is http://www.sitename/index.php?option=co ... &Itemid=72 - which lets me read it The menu item I have set up called 'latest', points to a table of the relevant content category; when the item is selected from this table the url is: http://www.sitename/index.php?option=co ... &Itemid=59 - which also lets me read it. Any help with this greatly appreciated, as it's doing my head in ![]() Cheers |
|
| Author: | rsphaeroides [ Thu Sep 08, 2005 4:17 pm ] |
| Post subject: | Re: Mambo/Joomla! creates wrong urls to items |
I've been struggling with this for a couple of weeks, and haven't gotten as far as you have. I've got this working as well xgipper wrote: The 'latest' module link to that item is http://www.sitename/index.php?option=co ... &Itemid=72 - which lets me read it but can't seem to do this xgipper wrote: The menu item I have set up called 'latest', points to a table of the relevant content category; when the item is selected from this table the url is: http://www.sitename/index.php?option=co ... &Itemid=59 - which also lets me read it. none of the links from my content category tables work correctly, any idea how you achieved this? |
|
| Author: | xgipper [ Thu Sep 08, 2005 4:28 pm ] |
| Post subject: | Re: Mambo/Joomla! creates wrong urls to items |
rsphaeroides wrote: none of the links from my content category tables work correctly, any idea how you achieved this? Ray, They have always worked fine for me. I haven't done anything to them since the menu item was set up. Have you tried creating a new menu item pointing to the same tables to see if that works (no idea why it should, but it's the kind of technical approach I'd go for )What suddenly isn't working on my site are the links from the front page to the rest of the content items when the user clicks 'read more'. I have tried creating a 'hidden menu' as suggested earlier in the thread, but that hasn't solved it. Not sure what to try next. Good luck with your site - it can get frustrating, eh? |
|
| Author: | rsphaeroides [ Thu Sep 08, 2005 5:29 pm ] |
| Post subject: | Re: Mambo/Joomla! creates wrong urls to items |
xgipper wrote: rsphaeroides wrote: none of the links from my content category tables work correctly, any idea how you achieved this? Ray, They have always worked fine for me. I haven't done anything to them since the menu item was set up. Have you tried creating a new menu item pointing to the same tables to see if that works (no idea why it should, but it's the kind of technical approach I'd go for )What suddenly isn't working on my site are the links from the front page to the rest of the content items when the user clicks 'read more'. I have tried creating a 'hidden menu' as suggested earlier in the thread, but that hasn't solved it. Not sure what to try next. Good luck with your site - it can get frustrating, eh? That's exactly the sort of technical approach I've been using. ![]() As far as what to try next there is an FAQ on the general subject of Itemid and the way it controls display behaviour. It's definitely a Frequently ASKED Question though and not a Frequently ANSWERED Question. After thinking about it for a while I'm pretty sure your links from your Table-Content Category aren't actually working correctly either, you probably just have the same peripheral content on the Table-Content Category page as you have on the item display page so you haven't noticed. The link http://www.sitename/index.php?option=co ... &Itemid=59 may be letting you view topic 47, but the "&Itemid59" part is calling the modules and paths for the Table-Content Category. In your case &Itemid=59 and &Itemid=72 (which I'll bet a nickle is the correct Itemid) happen to look very similar or the same. You can see an example with screen shots of what happens when you try to display the content item with different modules than the Table-Content Category in this thread http://forum.opensourcematters.org/index.php/topic,3862.0.html Good luck to you too. |
|
| Author: | Erik [ Sun Sep 25, 2005 3:44 pm ] |
| Post subject: | Re: Mambo/Joomla! creates wrong urls to items |
xgipper wrote: rsphaeroides wrote: none of the links from my content category tables work correctly, any idea how you achieved this? Ray, They have always worked fine for me. I haven't done anything to them since the menu item was set up. Have you tried creating a new menu item pointing to the same tables to see if that works (no idea why it should, but it's the kind of technical approach I'd go forĀ )What suddenly isn't working on my site are the links from the front page to the rest of the content items when the user clicks 'read more'. I have tried creating a 'hidden menu' as suggested earlier in the thread, but that hasn't solved it. Not sure what to try next. Good luck with your site - it can get frustrating, eh? It is very frustrating! It's such a negative thing! It makes me thinging to move back to Mambo and I'm afraid that I'm not the only one! The FAQ sugestion thing is a good idea! Let's see... |
|
| Author: | stingrey [ Sun Sep 25, 2005 4:00 pm ] |
| Post subject: | Re: Mambo/Joomla! creates wrong urls to items |
Erik wrote: It is very frustrating! It's such a negative thing! It makes me thinging to move back to Mambo and I'm afraid that I'm not the only one! This Itemid problem/weakness affects both Mambo and Joomla!, I've posted similar posts about this on the Mambo forums, just seacch for itemid and user [stingrey] on those forums and you will see exactly the same problems and answers I have posted in regard to them
The FAQ sugestion thing is a good idea! Let's see... |
|
| Author: | stingrey [ Sun Sep 25, 2005 4:04 pm ] |
| Post subject: | Re: Mambo/Joomla! creates wrong urls to items |
rsphaeroides wrote: As far as what to try next there is an FAQ on the general subject of Itemid and the way it controls display behaviour. It's definitely a Frequently ASKED Question though and not a Frequently ANSWERED Question. Itemid literally controls everything in regard to a page
There may be one or two things I might have missed, but this is a fairly accurate list |
|
| Author: | emeyer [ Fri Nov 04, 2005 11:07 pm ] |
| Post subject: | Re: Mambo/Joomla! creates wrong urls to items |
Now the pages display ok, the path is corect, and the right menu item is hightlighted---but the "print" and "pdf" buttons still give a "not authorized to view" message in the window they open. Is this another itemid problem? Can I fix it? |
|
| Author: | rediray [ Wed Jun 13, 2007 11:25 pm ] |
| Post subject: | Re: Mambo/Joomla! creates wrong urls to items |
hi folks! if you have access to phpMyAdmin, you can try editing the database tables directly to fix this problem! Here's my post: http://forum.joomla.org/index.php/topic,180269.0.html |
|
| Author: | aldwin.galapon [ Fri Jul 27, 2007 3:16 am ] |
| Post subject: | Re: Mambo/Joomla! creates wrong urls to items |
sirs, pardon for the lack of knowledge, im still a newbie when it comes to customizing web pages using either joomla or mambo. going straight to the point, my problem is that when im in administrator panel, links pretty show up correctly (e.i Home => http://mapa.profusehost.net/index.php?o ... e&Itemid=1) but when i try to view my homepage the links are a total mess (e.i. Home => http://mapa.profusehost.net/component/o ... /Itemid,1/). please send advise. thank you very much! |
|
| Author: | weatherangel [ Fri Aug 10, 2007 3:43 am ] |
| Post subject: | Re: Mambo/Joomla! creates wrong urls to items |
aldwin.galapon wrote: Admin Home => http://mapa.profusehost.net/index.php?o ... e&Itemid=1 Web Home => http://mapa.profusehost.net/component/o ... /Itemid,1/ You probably already know this, by this point, but you have SEF turned on which is re-mapping your URLs for you. If you look up at the URLs again, you'll find that they're exactly the same, with the exception of the component replacing index.php and the & and ? being replaced by / No worries though, it takes a bit of getting used to in the early stages
|
|
| Author: | turael [ Thu Nov 22, 2007 3:56 am ] |
| Post subject: | Re: Mambo/Joomla! creates wrong urls to items |
I found this thread while trying to fix our ItemID issue here at HomeTrader. I had an issue that my blog category view was displaying the links to the items incorrectly. seemingly inheriting the ItemID from the category and not using the content items ItemID. The content items were already linked in a menu. creating an invisible menu and linking the content items / categories / sections didn't seem to do anything at all. After looking in the code I found where ItemID is calculated for this: function _Itemid in content.html.php in com_content. Adding in one line to set ItemID as the dynamic $mainframe->getItemid($row->id), seems to fix this issue. I've done some quick testing and it hasn't seemed to break anything else on the website. so inside the _Itemid function, you can comment out: Code: if ( ($compat > 0 && $compat <= 11) && $task != 'view' && $task != 'category' ) { $row->_Itemid = $mainframe->getItemid( $row->id, 0, 0 ); } else { // when viewing a content item, it is not necessary to calculate the Itemid $row->_Itemid = $Itemid; } and replace it with Code: $row->_Itemid = $mainframe->getItemid( $row->id); and it fixes links inside blogcategories - probably breaks something to do with some other view though. (all views in my website were fine though) anyway hope this helps someone somewhere, cause I certainly was pulling my hair out about this. ![]() Cheers Chris Hitchins |
|
| Author: | turael [ Fri Nov 23, 2007 2:43 am ] |
| Post subject: | Re: Mambo/Joomla! creates wrong urls to items |
Adding further onto this, I noticed by making the Itemids in the links go correctly, my menus weren't highlighting properly. I'm using a flat menu. Having another poke around in the code, i found the function which draws the horizonal flat menu - mosShowHFMenu in mod_mainmenu.php. This uses mosGetMenuLink to create the highlighting. The code in mosGetMenuLink which affected my highlighting is: Code: // Active Menu highlighting $current_itemid = $Itemid; if ( !$current_itemid ) { $id = ''; } else if ( $current_itemid == $mitem->id ) { $id = 'id="active_menu'. $params->get( 'class_sfx' ) .'"'; } else if( $params->get( 'activate_parent' ) && isset( $open ) && in_array( $mitem->id, $open ) ) { $id = 'id="active_menu'. $params->get( 'class_sfx' ) .'"'; } else { $id = ''; } Here we can see that it will highlight if the itemid is equal to the itemid in the menu. the 2nd else which checks the "open" array was never going true, since this function was never being sent the "open" array by mosShowHFMenu (?). To fix this, I ran a quick query in mosShowHFMenu to grab the parent ItemID, and sent that along to mosGetMenuLink. right underneath the existing query stuff in mosShowHFMenu I added: Code: $sql = "SELECT m.*" . "\n FROM #__menu AS m" . "\n WHERE id = $Itemid" . "\n AND published = 1" ; $database->setQuery( $sql ); $parent = $database->loadObjectList( 'id' ); $open = array($parent[$Itemid]->parent); and then modified the call to mosGetMenuLink Code: $links = array(); foreach ($rows as $row) { $links[] = mosGetMenuLink( $row, 0, $params, $open ); } this works (gives me correct highlighting in my menu structure), I hope this can help someone else too. Hasn't broken any of my other HF menus (though i only have one other... )This isn't recursive though - there is recursive code in the other menu functions (not sure why HF doesn't handle this?? i must be missing something here.), so look at that if you need recursive abilities. Chris H |
|
| Page 1 of 1 | All times are UTC |
| Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group http://www.phpbb.com/ |
|