Block breaking stack page

Permalink
I have tried editing the page_list block where it gets an multiple select attribute from the database to the page.

This works fine in the front end and the page list displays correctly.

But when I go to the Dashboard and edit the stack, it breaks the Stack page. The source code for the page is not complete and it shows only white page with a few links.

I'm currently using the following template code.

<?php 
defined('C5_EXECUTE') or die("Access Denied.");
$th = Loader::helper('text');
$db = Loader::db();
?>
<div id="article-list">
   <?php  
   foreach ($cArray as $cobj):
      $title = $cobj->getCollectionName();
      $description = $cobj->getCollectionDescription();
      $description = $controller->truncateSummaries ? $th->shorten($description, $controller->truncateChars) : $description;
      $description = $th->entities($description);   
      $date = $cobj->getAttribute('julkaistu');
      $author = $cobj->getVersionObject()->getVersionAuthorUserName();
      $link = $nh->getLinkToCollection($cobj);


And this results in the following code in the Dashboard:
<script type="text/javascript">
   ccm_stacksAddBlock = function() {
      ccm_openAreaAddBlock("Main", true, 192);
   }
   ccm_parseBlockResponsePost = function(r) {
      if (r.task != 'update_groups') {
         $(".ccm-main-nav-edit-option").fadeIn(300);
      }
   }
   $(function() {
      CCM_EDIT_MODE = true; // override header_required
      ccm_editInit();
      $("#stackPermissions").dialog();
      $("#stackVersions").dialog();
   });


What could cause this?

Hypocrite
 
Hypocrite replied on at Permalink Best Answer Reply
Hypocrite
Found the problem.

I was missing the toAscii function from the template.

The function was in the page but not in the dashboard.