Cache enabled Error loaded _before_ unserialize()

Permalink 1 user found helpful
Fatal error: View::render() [<a href='view.render'>view.render</a>]: The script tried to execute a method or access a property of an incomplete object. Please ensure that the class definition &quot;FeatureVehicleBlockController&quot; of the object you are trying to operate on was loaded _before_ unserialize() gets called or provide a __autoload() function to load the class definition in

I have seen this error a couple times, but have not found a solution I can't enable the cache without throwing this error.

View Replies: View Best Answer
Mnkras replied on at Permalink Reply
Mnkras
re upload your /concrete directory
aaron replied on at Permalink Reply
What will that do? It is a fresh install of 4.5.1.1
Mnkras replied on at Permalink Reply
Mnkras
hope you mean 5.4.1.1 ;)

usually not all files were uploaded
aaron replied on at Permalink Reply
Fatal error: CoreView::render() [<a href='coreview.render'>coreview.render</a>]: The script tried to execute a method or access a property of an incomplete object. Please ensure that the class definition &quot;FeatureVehicleBlockController&quot; of the object you are trying to operate on was loaded _before_ unserialize() gets called or provide a __autoload() function to load the class definition in /var/www/vhosts/dealercontrol.net/subdomains/c5/matteautos-com/libraries/view.php(9) : eval()'d code on line 734

I think it might be something in the block code. The block is pretty basic I'll post the view & controller to see if someone can help, I can't enable cache until I resolve this and the site is super slow.

controller.php
<?php
   class FeatureVehicleBlockController extends BlockController {
      // caching for 5.4.1
      protected $btCacheBlockRecord = true;
      protected $btCacheBlockOutput = true;
      protected $btCacheBlockOutputOnPost = true;
      protected $btCacheBlockOutputForRegisteredUsers = true;
      protected $btCacheBlockOutputLifetime = 300;
      protected $btDescription = "A simple feature vehicle block.";
      protected $btName  = "Feature Vehicle";
      protected $btTable = 'btFeatureVehicle';
      protected $btInterfaceWidth = "400";
      protected $btInterfaceHeight = "300";
      function on_page_view() {
         Loader::model('vehicle', 'idealer');
aaron replied on at Permalink Reply
view.php
<?php    
   $model->getFeaturedVehicles(4, 0, unserialize($vtype), unserialize($makes), $p1range, $p2range, $filters) ?>
<div id="new-inventory">
  <h2 class="cufon"><?php echo $label ?></h2>
  <!--form action="#" method="post" id="search-inventory">
            <fieldset>
               <input type="text" id="select-make" name="select-make" value="Select Make..." />
               <input type="text" id="search" name="search" value="Search" />
            </fieldset>
         </form-->
  <div id="inventories">
    <?php if($unit = $model->iterate()): ?>
    <div class="inventory first"> <a href="<?php echo DIR_REL,'/inventory/',$unit->url ?>"><img src="http://images.idealer1.com/resize/getimage.php?vpid=<?php echo $unit->previewvpid ?>&w=188" alt="<?php echo $unit->description ?>" /></a>
      <h3><?php echo $unit->description ?></h3>
      <span class="price cufon"><?php echo $unit->iprice; if ($unit->rprice) echo ' <b>/</b> <strong>',$unit->rprice,' MSRP</strong>' ?></span> </div>
Mnkras replied on at Permalink Best Answer Reply
Mnkras
is your block in

/blocks/feature_vehicle/

? if the folder isn't named like that its not ging to work
aaron replied on at Permalink Reply
it doesn't have the underscore.
aaron replied on at Permalink Reply
FeaturevehicleBlockController fixed it Thanks!