Panels : Fatal error: QFormBase::Unserialize() [qformbase.unserialize]

Login or register to post comments
No replies
Offline
Joined: 06/04/2010

Hello everyone.
my problem is as follows:
In the structure:
objForm
|__qPanel1
|__qPanel2
statements of qPanels are as follows:

<?php
require_once('includes/configuration/prepend.inc.php');

// Define the Qform with all our Qcontrols
class mainPage extends QForm {

   
// Local declarations of our Qcontrols
   
protected $pxyNavBarLink;
    public
$subpage1;
    public
$subpage2;
    public
$objUser;

   
// Initialize our Controls during the Form Creation process
   
protected function Form_Create() {
       
$this->subpage1 = new QPanel($this);
       
$this->subpage1->AutoRenderChildren = TRUE;
       
$this->subpage1->Display = FALSE;

       
$this->subpage2 = new QPanel($this);
       
$this->subpage2->AutoRenderChildren = TRUE;
       
$this->subpage2->Display = FALSE;

       
$this->pxyNavBarLink = new QControlProxy($this, "NavBarLink");
       
$this->pxyNavBarLink->AddAction(new QClickEvent(), new QAjaxAction('pxyNavBarLink_Click'));
       
$this->pxyNavBarLink->AddAction(new QClickEvent(), new QTerminateAction());

       
$this->initUserObject();
    }

    protected function
initUserObject() {
        if (
unserialize($_SESSION[_SESSION_USER_NAME])) {
           
$this->objUser = unserialize($_SESSION[_SESSION_USER_NAME]);
        } else {
           
QApplication::Redirect(__VIRTUAL_DIRECTORY__ . "login.php");
        }
    }

   
// Notice how the optional "action parameter" we used in the RenderAsHref() or RenderEvents() call gets passed in as $strParameter here.
   
protected function pxyNavBarLink_Click($strFormId, $strControlId, $strParameter) {
       
$this->subpage1->RemoveChildControls(true);
       
$this->subpage2->RemoveChildControls(true);

        switch (
$strParameter) {
            case
'mainpage':
               
$panel = new subpage($this->subpage1, "subpagePanel");
               
$this->subpage1->Display = TRUE;
                break;
            case
'profile':
                new
myProfile($this->subpage2, $this->objUser->Idusers, "myProfilePanel");
               
$this->subpage2->Display = TRUE;
                break;
        }
    }

    public function
MethodCallBack($blnUpdatesMade=NULL) {
       
//$this->subpagePanel->RemoveChildControls(true);
       
$this->subpagePanel->Display = FALSE;
       
QApplication::DisplayAlert("MethodCallBack actioned");
    }

}

// Run the Form we have defined
// The QForm engine will look to intro.tpl.php to use as its HTML template include file
mainPage::Run('mainPage', 'mainPage.tpl.php');
?>

the qPanel closes with a:
<?php
$this
->imgCloseButton->AddAction(new QClickEvent(), new QJavaScriptAction('$j("div#subpage").hide();'));
?>

the test is as follows:
action1. I opened qPanel1
action2. I close qPanel1
action3. I opened qPanel2
action4. ---- Here I can not close my qPanel2 - error message:

Fatal error: QFormBase::Unserialize() [qformbase.unserialize]: The script tried to execute a method or access a property of an incomplete object. Please ensure that the class definition "QDataGridRow" 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 Z:\home\mysite.prj\www\includes\qcubed\_core\base_controls\QFormBase.class.php on line 536

I could change the order of openings qPanels: first 2 and then 1, it does not change anything - same error.

If I open and close my pluseurs qPanel same time - hopefully - no error.

Do you have an idea about the nature of problem?