Block error message

Permalink
I created and installed a block with a few fields for text and this error was returned:

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;cdtitleBlockController&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 /home/site/site.com/concrete/libraries/view.php on line 734

Any idea what this could mean? Would it be helpful if I post the block's code?

 
Remo replied on at Permalink Reply
Remo
yes, it would be helpful to see some more details!
ombre replied on at Permalink Reply
ombre
Hi there,

I've got the same problem, I'm integrating an existing page into concrete5, so I would like to use the same guestbook as on the old page.

My code of the view.php:

<?php require_once('../Connections/db.php'); ?>
<?php
if (!function_exists("GetSQLValueString")) {
function GetSQLValueString($theValue, $theType, $theDefinedValue = "", $theNotDefinedValue = "") 
{
  $theValue = get_magic_quotes_gpc() ? stripslashes($theValue) : $theValue;
  $theValue = function_exists("mysql_real_escape_string") ? mysql_real_escape_string($theValue) : mysql_escape_string($theValue);
  switch ($theType) {
    case "text":
      $theValue = ($theValue != "") ? "'" . $theValue . "'" : "NULL";
      break;    
    case "long":
    case "int":
      $theValue = ($theValue != "") ? intval($theValue) : "NULL";
      break;


Error:
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;gbBlockController&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/[...]/pfadi/schirmerturm/cms/updates/concrete5.4.2/concrete/libraries/view.php on line 743


Is there a way to use the old code as block? or what to I have to change to make it work? Thanks for your help!

Greetz Ombre