+++ This bug was initially created as a clone of Bug #467151 +++ Description of problem: The number of items that can be displayed in the various "lists", i.e.; Systems page, Activation Keys page, etc. can be controlled globally by setting The RHN List Page Size located on "Your Preferences" page to the number you want, i.e. 500. Setting the display to 500 does not set your default for the whole web site. How reproducible: (1) On the Top Menu Bar click Your RHN (2) Next Click "Your Preferences" (3) Under RHN List Page Size table, in the display drop down list select "500". This controls how many entries, like systems, would be displayed on the various list pages. (5) Click Save Preferences (6) Navigate to check the various lists. Systems, Activation Keys, Systems Groups, Errata display the first 500. The Channels -> Packages lists does not. Steps to Reproduce: See above. Actual results: The default of 500 set in "Your Preferences" does not set your default for the whole web site. The Channel -> Packages lists page does not show the first 500 packages, it shows only the first 50. See attachment. Expected results: The default of 500 set in "Your Preferences" should set "all ""lists" for the whole web site. --- Additional comment from xdmoon on 2008-10-15 20:43:04 EDT --- The bug resides in perl code in /usr/lib/perl5/site_perl/5.8.5/RHN/DB/User.pm: ... my $size = $self->get_pref('page_size'); $size = 20 unless $size; $size = 20 if not $size or $size < 5; $size = 50 if $size > 50; ... Note that it shrinks the maximum page size to 50, presumably as a precaution. This is fine pre-Sat 5.1. as 50 used to be the maximum page size available to users, but in 5.1.0+ the maximum page size is determined by the constant com.redhat.rhn.frontend.taglibs.list.decorators.PageSizeDecorator.MAX_PER_PAGE which is 500. This bug is only manifested in pages like Channel -> packages because those pages are still in perl, and not yet ported to java. Due to the above code, all perl pages with pagination will display no more than 50 items per page even if you specify more than that in user preferences. Attached is a patch that fixes/work arounds it (a "service satellite-httpd restart" is needed after applying the patch). Of course, it should really be a flexible number as opposed to a constant. --- /usr/lib/perl5/site_perl/5.8.5/RHN/DB/User.pm.orig 2008-09-01 10:12:21.000000000 -0400 +++ /usr/lib/perl5/site_perl/5.8.5/RHN/DB/User.pm 2008-10-15 14:40:50.000000000 -0400 @@ -1988,7 +1988,7 @@ my $size = $self->get_pref('page_size'); $size = 20 unless $size; $size = 20 if not $size or $size < 5; - $size = 50 if $size > 50; + $size = 500 if $size > 500; return $size; } Xixi
Fix committed: 3a8a6d682f90a6b7599a965c9c208207e35c2103.
Note: Verified using SSM -> Packages -> Install since the Channels -> Packages is now a Java page.
Spacewalk has been released for some time.