The LimeSurvey Fund-Raiser 2012 is complete. Thank you for donating a total of 25,000 USD!     List of donors »

Welcome, Guest
Username: Password: Remember me
  • Page:
  • 1

TOPIC: "display tokens" page empty when there are too many tokens(>15000)

"display tokens" page empty when there are too many tokens(>15000) 8 months 1 week ago #85373

  • siyang1982
  • siyang1982's Avatar
  • OFFLINE
  • Fresh Lemon
  • Posts: 4
  • Karma: 0
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.

Why?

PS:
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));
Last Edit: 8 months 1 week ago by siyang1982.
The administrator has disabled public write access.

Re: "display tokens" page empty when there are too many tokens(>15000) 8 months 1 week ago #85374

  • siyang1982
  • siyang1982's Avatar
  • OFFLINE
  • Fresh Lemon
  • Posts: 4
  • Karma: 0
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++)
......
The administrator has disabled public write access.
  • Page:
  • 1
Moderators: DenisChenu, ITEd
Time to create page: 0.231 seconds
Donation Image