1
Feng Office 3 / FengOffice 3.1.3 - again blank screen
« on: April 29, 2015, 04:34:59 am »
Previously upgraded and modified with jacobs code core_dimensions_hooks:
Fatal error: Cannot redeclare core_dimensions_after_edit_profile() (previously declared in /...../plugins/core_dimensions/hooks/core_dimensions_hooks-150408.php:4) in /...../plugins/core_dimensions/hooks/core_dimensions_hooks.php on line 13
and in cache/log.php is:
-------------------------------------------------------------------------------
Session "default" started at 2015-04-09T10:29:04+0000
#1 ERROR: Error: Undefined variable: end_cond in '/...../application/models/sharing_table/SharingTables.class.php' on line 69 (error code: 8 )
Time since start: 0.93439483642578 seconds
-------------------------------------------------------------------------------
WHAT I should do?
Thanks in advance
P.S.: Have deleted config.php, installed onto a new clean database and the result is a really blank page (source code of that page is blank), after switching the debug mode on in config.php - again the same Fatal error on page ...
I have created a workaround for this bug that works in version 3.1.2now upgraded to 3.1.3 still error:
I do not know of any possible side-effects it may have but at least I can edit users.
The problem appears on line 373 of /plugins/core_dimensions/hooks/core_dimensions_hooks.php
Feng is apparently trying to get the parent member of a company and is coming up empty handled, throwing an unhanded error.
In the core_dimensions_hooks.php file
Replace this if block:Quoteif ($object->getCompanyId() > 0) {
$pmember = Members::findOne(array('conditions' => '`object_id` = '.$object->getCompanyId(). ' AND `object_type_id` = '.$company_ot->getId(). ' AND `dimension_id` = '.$person_dim->getId()));
$member->setParentMemberId($pmember->getId());
$member->setDepth($pmember->getDepth() + 1);
}else{
//Is first level
$member->setDepth(1);
$member->setParentMemberId(0);
}
With this if block:Quoteif ($object->getCompanyId() > 0) {
$pmember = Members::findOne(array('conditions' => '`object_id` = '.$object->getCompanyId(). ' AND `object_type_id` = '.$company_ot->getId(). ' AND `dimension_id` = '.$person_dim->getId()));
if($pmember) //Do not use pmember if null for any reason / hack by jacob on the fengoffice forum
{
$member->setParentMemberId($pmember->getId());
$member->setDepth($pmember->getDepth() + 1);
} else {
$member->setDepth(1);
$member->setParentMemberId(0);
}
}else{
//Is first level
$member->setDepth(1);
$member->setParentMemberId(0);
}
Fatal error: Cannot redeclare core_dimensions_after_edit_profile() (previously declared in /...../plugins/core_dimensions/hooks/core_dimensions_hooks-150408.php:4) in /...../plugins/core_dimensions/hooks/core_dimensions_hooks.php on line 13
and in cache/log.php is:
-------------------------------------------------------------------------------
Session "default" started at 2015-04-09T10:29:04+0000
#1 ERROR: Error: Undefined variable: end_cond in '/...../application/models/sharing_table/SharingTables.class.php' on line 69 (error code: 8 )
Time since start: 0.93439483642578 seconds
-------------------------------------------------------------------------------
WHAT I should do?
Thanks in advance
P.S.: Have deleted config.php, installed onto a new clean database and the result is a really blank page (source code of that page is blank), after switching the debug mode on in config.php - again the same Fatal error on page ...