Page 1 of 1

Solution for newsflash Module misbehaviour in 1.0.12

Posted: Mon Mar 05, 2007 8:50 am
by yerg
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: Select all

	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: Select all

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.

Re: Solution for newsflash Module misbehaviour in 1.0.12

Posted: Wed Mar 28, 2007 11:43 am
by Scooby
This is not working for me. i still get the newsflash when cliciking read more..
I'm using: Joomla! 1.0.12 Stable [ Sunfire ] 25 December 2006 01:00 UTC

Re: Solution for newsflash Module misbehaviour in 1.0.12

Posted: Wed Mar 04, 2009 2:14 pm
by brmpdrummer
Anything new on this issue?
I am using 1.5.9 and have this problem after initial 'Read more' execution. Other words, the first time clicking on 'Read more' after the first entry into the website, the newsflash modules are not apparent on the 'Read more' page. On subsequent re-entries to the 'Read more' pages, the newsflash modules are there.
Thanks

-Joe

[Solved]Re: Solution for newsflash Module misbehaviour in 1.

Posted: Wed Mar 04, 2009 4:58 pm
by brmpdrummer
brmpdrummer wrote:Anything new on this issue?
I am using 1.5.9 and have this problem after initial 'Read more' execution. Other words, the first time clicking on 'Read more' after the first entry into the website, the newsflash modules are not apparent on the 'Read more' page. On subsequent re-entries to the 'Read more' pages, the newsflash modules are there.
Thanks

-Joe
Found the problem - had two newsflash modules published rather than having articles added under a single one.

Re: Solution for newsflash Module misbehaviour in 1.

Posted: Fri Mar 06, 2009 12:20 am
by brmpdrummer
brmpdrummer wrote:
brmpdrummer wrote:Anything new on this issue?
I am using 1.5.9 and have this problem after initial 'Read more' execution. Other words, the first time clicking on 'Read more' after the first entry into the website, the newsflash modules are not apparent on the 'Read more' page. On subsequent re-entries to the 'Read more' pages, the newsflash modules are there.
Thanks

-Joe
Found the problem - had two newsflash modules published rather than having articles added under a single one.
The problems is back. Apparently an intermittent one. It appeared to be gone after much checking the other night.
Anyone??

joomla ver. 1.5.9
joomlashack Aqualine ver. 1.5
http://u-s-a-r-d.org