plainblack.com
Username Password
search
Bookmark and Share
View All Tickets
blank page after setting posts per page in Collaboration System to 0 (zero)  (#11464)
Issue

In both stable and beta setting the option "Posts per Page" to zero results in a blank page.

http://demo.webgui.org/demo1268220006_139/home/
http://beta.webgui.org/demo1268222431_818/home

There is no error in the modperl.error.log or in the webgui.log. However, setting logging to WARN made me find the problem.

It seems to be introduced here in the fix for bug #11318: http://github.com/plainblack/webgui/commit/0b45404971cd0a231c6bbfd060bcc749f52db342

in line 511 you get a division by zero if you set posts per page to zero.

Solution Summary
Comments
perlDreamer
4
3/10/2010 11:12 am
You guys and your funky non-paginated CS'es
perlDreamer
0
3/10/2010 11:38 am
Fixed in 7.8.15 (1427692)
Fixed in 7.9.1 (21e3210)
arjan
0
3/16/2010 7:54 am
For those who want a quick fix or to set every last revision of a cs to a non-zoro value (ie. 3) anyway:

create temporary table tempZeroPosts (assetId char(22), revisionDate bigint(20));

insert into tempZeroPosts (assetId, revisionDate) select asset.assetId, Collaboration.revisionDate from asset left join Collaboration on asset.assetId = Collaboration.assetId where asset.className = "WebGUI::Asset::Wobject::Collaboration" and Collaboration.revisionDate = ( select max(revisionDate) from Collaboration co where co.assetId = Collaboration.assetId ) and postsPerPage = 0 order by asset.assetId;

update Collaboration,tempZeroPosts set postsPerPage = 3 where postsPerPage = 0 and Collaboration.assetId = tempZeroPosts.assetId and Collaboration.revisionDate = tempZeroPosts.revisionDate;

( drop table tempZeroPosts; )
Details
Ticket Status Closed  
Rating4.0 
Submitted Byarjan 
Date Submitted2010-03-10 
Assigned To unassigned  
Date Assigned2010-07-31 
Assigned By 
Severity Fatal (can't continue until this is resolved)  
What's the bug in? WebGUI Stable  
WebGUI / WRE Version 7.7.32, 7.8.13-stable (demosites)  
URLuse/bugs/tracker/11464
Keywords
Ticket History
3/16/2010
7:54 AM
Closed arjan
3/10/2010
11:38 AM
Resolved perlDreamer
3/10/2010
5:31 AM
Ticket created arjan
© 2010 Plain Black Corporation | All Rights Reserved