Home arrow Software Articles arrow Joomla arrow Bug in the changes to item id's - Joomla 1.12
Bug in the changes to item id's - Joomla 1.12 PDF Print E-mail
Monday, 19 March 2007
In Joomla 1.12, if an article is for example accessed via the front page it is given one item id/url and loads with the same modules that are assigned to the front page, the same article when accessed via a content category is then given another item id/url and so loads the modules assigned to that particular category.

But it gets worse as the previous item id/url that the same article was assigned in Joomla 1.11 (and indexed by search engines) is also still generated - if you have a large content based site this is a complete disaster as most search engines will view this as 3 separate urls all containing the same article/content, this will cause a duplicate content penalty with Google.

 

This how to correct the problem: 

 

components/com_content/content.html.php line ~800

Code:
$_Itemid = $Itemid;

Change that line to:
Code:
$_Itemid = $mainframe->getItemid( $rows[$i]->id, 0, 0  );

same file, line ~1115
Code:
$row->_Itemid = $Itemid;

Remove that line and paste in:
Code:
if ( $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;
}
 
< Prev