upgraded to v2021.0.8receving errors at DBTableBsae.php line 384 - undefined property: UseModalLinks that’s with DEBUG enabledwith DEBUG = FALSEObsolete property: clients_employees_cases_notes_Count. Please use Container(“clients_employees_cases_notes”)->Count at DbTableBase.php line 393
v2021.0.8had variable set as $this->AccountId
public function pageLoad()
{
$this->AccountId = 0;
$this->AccountId = _getPortalSiteInfoByUser("AccountId", CurrentUserID(), $this->PageObjName);
if($this->AccountId == null && !$Security->IsAdmin()) { // no portal setup for this user
$this->AccountId = -1;
$this->terminate("dashboard2");
}
else {
$this->AccountId = 0;
}
}
this code worked perfectly fine and now errors out: Fatal error: Undefined property: AccountId. in src\DbTableBase.php on line 384
sticcino wrote:
Obsolete property: clients_employees_cases_notes_Count. Please use Container(“clients_employees_cases_notes”)->Count at DbTableBase.php line 393
Since v2021.0.8, the variable that stores Detail Count which has format detailtablename_Count had been changed to Container(“detailtablename”)->CountSo, double check your code in any Server Event, change it to Container(“clients_employees_cases_notes”)->CountIf you use any extension that related to Detail Preview, make sure you have already used/updated the Extension to the latest version, re-generate ALL the script files, and try again.
How did you declare that AccountId variable? In which section/server event?
sticcino wrote:
$this->AccountId = 0;
The property AccountId does not exist in the page class. If you just need a local variable, just use $AccountId. If you need a global variable, use $GLOBALS[“AccountId”].
I didn’t write this code or use that variable, it is PHPM generated code:"Obsolete property: clients_employees_cases_notes_Count. Please use Container(“clients_employees_cases_notes”)->Count at DbTableBase.php line 393"the code is in protected function renderListOptionsExt() in the Grid and List pages…
if ($Security->allowList(CurrentProjectID() . 'clients_employees_cases')) {
$label = $Language->TablePhrase("clients_employees_cases_notes", "TblCaption");
===>>> $label .= " " . JsEncode(str_replace("%c", $this->clients_employees_cases_notes_Count, $Language->phrase("DetailCount")));
$link = "<li class=\"nav-item\"><a href=\"#\" class=\"nav-link\" data-toggle=\"tab\" data-table=\"clients_employees_cases_notes\" data-url=\"" . $url . "\">" . $label . "</a></li>";
$links .= $link;
$detaillnk = JsEncodeAttribute("clientsemployeescasesnoteslist?" . Config("TABLE_SHOW_MASTER") . "=clients_employees_cases&" . GetForeignKeyUrl("fk_EmployeeCaseFileNumber", $this->EmployeeCaseFileNumber->CurrentValue) . "");
$btngrp .= "<a href=\"#\" class=\"mr-2\" title=\"" . $Language->TablePhrase("clients_employees_cases_notes", "TblCaption") . "\" onclick=\"window.location='" . $detaillnk . "';return false;\">" . $Language->phrase("MasterDetailListLink") . "</a>";
}
Each time the latest version is released, then make sure you always download the latest version of Extensions, too. Do not use the older Extension as this will cause the issue.
You probably have forgotten to use the updated Preview extension.