Since upgrading to 1.0.12 the newsflash module on the front page misbehaves
Clicking on the read more link on any front page article takes you to that article but the newsflash remains. The module setting are set to allow the newsflash to appear ONLY on the index page.
To fix this problem, you need modify Joomla code in the file components/com_content/content.html.php with the the function from Joomla v1.0.11.
Open file components/com_content/content.html.php, and search for this code:
Code:
function _Itemid( &$row ) {
global $task, $Itemid, $mainframe;
$row->_Itemid = $Itemid;
if ( $row->_Itemid && $row->_Itemid != 99999999 ) {
// where Itemid value is returned, do not add Itemid to url
$row->Itemid_link = '&Itemid='. $row->_Itemid;
} else {
// where Itemid value is NOT returned, do not add Itemid to url
$row->Itemid_link = '';
}
}
And replace with:
Code:
function _Itemid( &$row ) {
global $task, $Itemid, $mainframe;
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;
}
if ( $row->_Itemid && $row->_Itemid != 99999999 ) {
// where Itemid value is returned, do not add Itemid to url
$row->Itemid_link = '&Itemid='. $row->_Itemid;
} else {
// where Itemid value is NOT returned, do not add Itemid to url
$row->Itemid_link = '';
}
}
Heads up: dunno if this reversal is of security concern or not but something needs fixing. I found this as a couple of my sites have large "newsflash" items on the top of the front page. They remain when clicking on the readmore and on some screens it appears as if the new page wasn't loaded.