Solution for newsflash Module misbehaviour in 1.0.12

Locked
User avatar
yerg
Joomla! Ace
Joomla! Ace
Posts: 1013
Joined: Thu Aug 18, 2005 12:22 pm
Location: Ballarat, Australia
Contact:

Solution for newsflash Module misbehaviour in 1.0.12

Post by yerg » Mon Mar 05, 2007 8:50 am

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.
We cannot become what we need to be ... by remaining what we are

Scooby
Joomla! Explorer
Joomla! Explorer
Posts: 250
Joined: Sat Aug 27, 2005 2:09 pm
Contact:

Re: Solution for newsflash Module misbehaviour in 1.0.12

Post by Scooby » Wed Mar 28, 2007 11:43 am

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

brmpdrummer
Joomla! Apprentice
Joomla! Apprentice
Posts: 46
Joined: Wed Mar 04, 2009 1:50 pm

Re: Solution for newsflash Module misbehaviour in 1.0.12

Post by brmpdrummer » Wed Mar 04, 2009 2:14 pm

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

brmpdrummer
Joomla! Apprentice
Joomla! Apprentice
Posts: 46
Joined: Wed Mar 04, 2009 1:50 pm

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

Post by brmpdrummer » Wed Mar 04, 2009 4:58 pm

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.

brmpdrummer
Joomla! Apprentice
Joomla! Apprentice
Posts: 46
Joined: Wed Mar 04, 2009 1:50 pm

Re: Solution for newsflash Module misbehaviour in 1.

Post by brmpdrummer » Fri Mar 06, 2009 12:20 am

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


Locked

Return to “Joomla! 1.0.x_Q&T”