Page 1 of 1

[LOW:FIXED 6832: 1.0.11] 2 Joomla! 1.0.11 bugs and proposed fixes

Posted: Fri Sep 01, 2006 3:37 am
by jaclplus
Please correct me if the topic subject is not suitable or wrong.  :P

Bug 1
====
Description:
[USER] $total value provided by BlogOutput() function to HTML_content::showLinks() function is wrong.
The $total value in BlogOutput() function is number of items in a section/category for pagination usage but the $total value in HTML_content::showLinks() should be number of items to be displayed in a page.

Reported on:
[USER] Joomla version 1.0.11 at least  :)

Classification:
[Q&T] Critical/High/Medium/Low/Enhancement

Affected functions:
[USER] All functions that call BlogOutput() function such as frontpage(), showBlogSection(),showBlogCategory(), showArchiveSection() and showArchiveCategory().

Related files:
[USER] components/com_content/content.php

Steps to replicate:
[USER] Please check the HTML_content::showLinks() function and BlogOutput() function code.

Analysis:
[Q&T] Confirmed/Unable to confirm/Rejected
Any other comments

Proposed fix(es):
[USER] Change the content.php code in line 1301

Code: Select all

HTML_content::showLinks( $rows, $links, $total, $i, $showmore );
to

Code: Select all

HTML_content::showLinks( $rows, $links, count($rows), $i, $showmore );
Topic / Artifact ID:
[USER] None

System info:
[USER] Non-related

-------------------------------------------------------------------------

Bug 2
====
Description:
[USER] getItemid() function in joomla.php will not return correct $Itemid when it can't find one because it will only return 0 value based on the existing code.

Reported on:
[USER] Joomla version 1.0.11 at least  :)

Classification:
[Q&T] Critical/High/Medium/Low/Enhancement

Affected functions:
[USER] All functions that call getItemid() function.

Related files:
[USER] includes/joomla.php

Steps to replicate:
[USER] Please check the getItemid() function code in joomla.php.

Analysis:
[Q&T] Confirmed/Unable to confirm/Rejected
Any other comments

Proposed fix(es):
[USER] Change the joomla.php code in line 1763 (I include the if...else code from line 1760 to 1766  for clarity)

Code: Select all

		if ( $_Itemid != '' ) {
		// if Itemid value discovered by queries, return this value
			return $_Itemid;
		} else if ( $Itemid != 99999999 && $Itemid === 0 ) { 
		// if queries do not return Itemid value, return Itemid of page - if it is not 99999999
			return $Itemid;
		}
to

Code: Select all

		if ( $_Itemid != '' ) {
		// if Itemid value discovered by queries, return this value
			return $_Itemid;
		} else if ( $Itemid != 99999999 && $Itemid > 0 ) { 
		// if queries do not return Itemid value, return Itemid of page - if it is not 99999999
			return $Itemid;
		}
Topic / Artifact ID:
[USER] None

System info:
[USER] Non-related

Re: 2 Joomla! 1.0.11 bugs and proposed fixes

Posted: Fri Sep 01, 2006 7:22 am
by Robin
[TAGGED: Q&T] Status > Under Review

Re: [UNDER REVIEW: 1.0.11] 2 Joomla! 1.0.11 bugs and proposed fixes

Posted: Mon Nov 20, 2006 6:09 pm
by Robin
Hi,

Report 1 has already been fixed in http://forge.joomla.org/sf/go/artf6253

The second one is confirmed, I'll be adding a tracker report for that, thanks!

Tracker url: http://forge.joomla.org/sf/go/artf6832?nav=1

Re: [LOW:TRACKER 6832: 1.0.11] 2 Joomla! 1.0.11 bugs and proposed fixes

Posted: Thu Nov 30, 2006 12:20 am
by facedancer
Guys, any hints how to reproduce that one?

Thanks

Re: [LOW:TRACKER 6832: 1.0.11] 2 Joomla! 1.0.11 bugs and proposed fixes

Posted: Sat Dec 02, 2006 6:11 pm
by friesengeist
facedancer wrote: Guys, any hints how to reproduce that one?
Hi Mat, here you go: on a clean install with sample data, unpublish the menu item "Blog" (Itemid 9). In the latest news module, e.g. "Newsflash 1" will not have an Itemid in this case. After applying the proposed patch, the Itemid of the current page will be used as a fallback Itemid.

Re: [LOW:TRACKER 6832: 1.0.11] 2 Joomla! 1.0.11 bugs and proposed fixes

Posted: Tue Dec 05, 2006 11:16 pm
by facedancer
friesengeist wrote:
facedancer wrote: Guys, any hints how to reproduce that one?
Hi Mat, here you go: on a clean install with sample data, unpublish the menu item "Blog" (Itemid 9). In the latest news module, e.g. "Newsflash 1" will not have an Itemid in this case. After applying the proposed patch, the Itemid of the current page will be used as a fallback Itemid.
Thx, fix in SVN.
I wonder though if it wouldn't be better to put there just

Code: Select all

else if ( $Itemid != 99999999 )
instead of

Code: Select all

else if ( $Itemid != 99999999 && $Itemid > 0 )
Any thoughts? After all, not a big difference :)

Re: [LOW:TRACKER 6832: 1.0.11] 2 Joomla! 1.0.11 bugs and proposed fixes

Posted: Mon Dec 11, 2006 7:55 am
by Robin
Fixed for next release.