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

Locked
jaclplus
Joomla! Apprentice
Joomla! Apprentice
Posts: 34
Joined: Thu Oct 27, 2005 2:43 am
Location: Malaysia
Contact:

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

Post by jaclplus » Fri Sep 01, 2006 3:37 am

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
Last edited by Anonymous on Mon Dec 11, 2006 7:56 am, edited 1 time in total.
Signature rules; http://forum.joomla.org/index.php/topic,65.0.html
Only 2 clickable url's allowed

user deleted

Re: 2 Joomla! 1.0.11 bugs and proposed fixes

Post by user deleted » Fri Sep 01, 2006 7:22 am

[TAGGED: Q&T] Status > Under Review

user deleted

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

Post by user deleted » Mon Nov 20, 2006 6:09 pm

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
Last edited by user deleted on Mon Nov 20, 2006 6:14 pm, edited 1 time in total.

User avatar
facedancer
Joomla! Enthusiast
Joomla! Enthusiast
Posts: 172
Joined: Thu Aug 18, 2005 6:13 am
Location: Antibes, France
Contact:

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

Post by facedancer » Thu Nov 30, 2006 12:20 am

Guys, any hints how to reproduce that one?

Thanks

friesengeist
Joomla! Guru
Joomla! Guru
Posts: 842
Joined: Sat Sep 10, 2005 10:31 pm

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

Post by friesengeist » Sat Dec 02, 2006 6:11 pm

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.
We may not be able to control the wind, but we can always adjust our sails

User avatar
facedancer
Joomla! Enthusiast
Joomla! Enthusiast
Posts: 172
Joined: Thu Aug 18, 2005 6:13 am
Location: Antibes, France
Contact:

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

Post by facedancer » Tue Dec 05, 2006 11:16 pm

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 :)

user deleted

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

Post by user deleted » Mon Dec 11, 2006 7:55 am

Fixed for next release.


Locked

Return to “Q&T 1.0.x Resolved - Archived”