Fatal error after upgrade to 5.6.0.2: Class 'LibraryFileBlockController' not found

Permalink
Hello all,

I get an error, from the following file:

[root]/blocks/page_list/templates/custom.php

this is the code which cause the error:
$lfb = LibraryFileBlockController::getFile($cobj->getAttribute('thumbnail_image')->fID);


Fatal error: Class 'LibraryFileBlockController' not found in ../httpd.www/blocks/page_list/templates/custom.php on line 6


Complete code in the custom.php file:

<?php
for ($i = 0; $i < count($cArray); $i++ ) {
     $cobj = $cArray[$i]; 
     $title = $cobj->getCollectionName();
     // get the attached image based on attribute
     $lfb = LibraryFileBlockController::getFile($cobj->getAttribute('thumbnail_image')->fID); 
      $thumbnail = $lfb->getThumbnail(640,360)->src;
?>
<div class="four columns thumbindex<?php $j++; if ($j % 4 == 0) { echo " omega"; }; if ($j == 1 || $j % 5 == 0) { echo " alpha"; } ?>">
<a class="thumbanchor" href="<?php echo $nh->getLinkToCollection($cobj)?>">
    <div class="thumbdesc">
   <h3 class="ccm-page-list-title"><?php echo $title?></h3>
   <p><?php // echo $cobj->getCollectionDescription() ; ?></p><br />
   <div class="icon arrow"></div>
   </div>


Thanks a million for any leads/help!

waldbach
 
avannoord replied on at Permalink Reply
Same problem here.
mhawke replied on at Permalink Reply
mhawke
Try adding this right after your opening <?php

Loader::block('library_file');
waldbach replied on at Permalink Reply
waldbach
<?php
for ($i = 0; $i < count($cArray); $i++ ) {
$cobj = $cArray[$i];
$title = $cobj->getCollectionName();
// get the attached image based on attribute
$ih = Loader::helper('image');
$img = $cobj->getAttribute('thumbnail_image');
$thumbnail = $ih->getThumbnail($img, 640, 360, false);
?>
<div class="four columns thumbindex<?php $j++; if ($j % 4 == 0) { echo " omega"; }; if ($j == 1 || $j % 5 == 0) { echo " alpha"; } ?>">
<a class="thumbanchor" href="<?php echo $nh->getLinkToCollection($cobj)?>">
<div class="thumbdesc">
<h3 class="ccm-page-list-title"><?php echo $title?></h3>
<p><?php // echo $cobj->getCollectionDescription() ; ?></p><br />
<div class="icon arrow"></div>


Thanks!
Changing the code to this fixed it!