I build a plugin with a subscription form. If there are subscribers already they are shown on the same page. For my issue, see this page:
http://www.adelaar.org/baanmod/evenementen/form/bos6b2kmvupe0d8mc7t1e9s1b4 and a page which is ok is for example:
http://www.adelaar.org/baanmod/evenementen/form/sum6st8nj3li3t920c6t63pano.
The problem is imho in the number of subscribers. As you can see the first page has a lot more...
Consider the following code:
$matchRegSubscribers = $this->modx->getCollection( 'MatchRegistration', $matchRegSubscribers );
if( count( $matchRegSubscribers ) > 0 )
{
foreach( $matchRegSubscribers as $subscriber ) {
$aSubscribers = $subscriber->toArray();
foreach( $aCats as $key => $val )
{
if( $aSubscribers['category'] == $key ) { $aSubscribers['category'] = $val; }
}
$rowsOutput .= $this->getChunk( $this->getProperty( 'subscriber' ), $aSubscribers );
}
} else {
$rowsOutput = $this->modx->lexicon( 'matchplanner.nosubscribers' );
}
$aOuterTpl = array();
$aOuterTpl['subscriberslist'] = $rowsOutput;
$content['count'] = count( $matchRegSubscribers );
$content['content'] = $this->getChunk( $this->getProperty( 'subscribers' ), $aOuterTpl );
and chunk subscribers.chunk.tpl:
[[!If?
&subject=`[[+eventsubscriberscount]]`
&operator=`>`
&operand=`0`
&then=`<table>
<thead>
<tr>
<th><b>Categorie</b></th>
<th><b>Persoon</b></th>
</tr>
</thead>
<tbody>
[[+subscriberslist]]
</tbody>
</table>`
&else=`[[+subscriberslist]]`
]]
and subscriber.chunk.tpl:
<tr><td>[[+category]]</td><td>[[+lastName]], [[+firstName]] [[+middleName]] ([[+nationality]])</td></tr>
So what happens? A table with subscribers is build. The problem is in the end of the list. In my second link with a lot of subscribers, the html of the table is not finished. Also, there are more subscribers than you can see in the list. At strlen($rowsOutput) = 7065 the loop is exited.
When I change the subscriber.chunk.tpl to:
<tr><td>[[+lastName]]</td></tr>
I get all results, so it seems $rowsOutput has a maximum length. Is there a limit on a chunk length or am I doing something wrong?