View Issue Details

This bug affects 1 person(s).
 2
IDProjectCategoryView StatusLast Update
06555Bug reportsOtherpublic2012-09-20 14:12
Reportersiyang1982 Assigned Toc_schmitz  
PrioritynormalSeverityminor 
Status closedResolutionfixed 
Product Version2.00RC9 
Fixed in Version2.00+ 
Summary06555: "display tokens" page empty when there are too many tokens(about >15000)
Description

I import 16366 tokens from csv file.
Evenything works fine now, except when I click "display tokens" to see the list page, it is empty, the list is empty.
But I can export this list to csv file.

Additional Information

I find /index.php/admin/tokens/getTokens_json/surveyid/941689 returns 500 error.
But I can't find any error log about it.
In this function, it seems all data was loaded: $tokens = Tokens_dynamic::model($iSurveyId)->findAll(array("order"=>$sidx. " ". $sord));

I fix this problem through update three lines:

......
/ $tokens = Tokens_dynamic::model($iSurveyId)->findAll(array("order"=>$sidx. " ". $sord)); /
$tokens = Tokens_dynamic::model($iSurveyId)->findAll(array("order"=>$sidx. " ". $sord, "offset"=>($page - 1) $limit, "limit"=>$limit));
......
/
$aData->records = count($tokens); /
$aData->records = Tokens_dynamic::model($iSurveyId)->count();
......
/
for ($i = 0, $j = ($page - 1) $limit; $i < $limit && $j < $aData->records; $i++, $j++) /
for ($i = 0, $j = 0; $i < $limit && $j < $limit; $i++, $j++)
......

TagsNo tags attached.
Bug heat2
Complete LimeSurvey version number (& build)120817
I will donate to the project if issue is resolvedNo
Browser
Database type & versionmysql
Server OS (if known)CentOS
Webserver software & version (if known)Apache
PHP Version5.3

Users monitoring this issue

There are no users monitoring this issue.

Activities

c_schmitz

c_schmitz

2012-09-14 10:55

administrator   ~20692

Fix committed to Yii branch: http://bugs.limesurvey.org/plugin.php?page=Source/view&amp;id=9493

c_schmitz

c_schmitz

2012-09-14 10:56

administrator   ~20693

Great patch - thank you very much.
Next time please consider to do a GitHub pull request.

Related Changesets

LimeSurvey: Yii 01a31b85

2012-09-14 01:55:24

c_schmitz

Details Diff
Fixed issue 06555: "display tokens" page empty/slow when there are too many tokens - patch by siyang1982 Affected Issues
06555
mod - application/controllers/admin/tokens.php Diff File

Issue History

Date Modified Username Field Change
2012-09-12 03:59 siyang1982 New Issue
2012-09-14 10:53 c_schmitz Assigned To => c_schmitz
2012-09-14 10:53 c_schmitz Status new => assigned
2012-09-14 10:55 c_schmitz Changeset attached => LimeSurvey Yii 01a31b85
2012-09-14 10:55 c_schmitz Note Added: 20692
2012-09-14 10:55 c_schmitz Resolution open => fixed
2012-09-14 10:56 c_schmitz Note Added: 20693
2012-09-14 10:56 c_schmitz Status assigned => resolved
2012-09-14 10:56 c_schmitz Fixed in Version => 2.00+
2012-09-20 14:12 c_schmitz Status resolved => closed