YetiForceCompany / YetiForceCRM

Our team created for you one of the most innovative CRM systems that supports mainly business processes and allows for customization according to your needs. Be ahead of your competition and implement YetiForce!
https://yetiforce.com
Other
1.71k stars 742 forks source link

[bug] LBL_HANDLER_NOT_FOUND error when viewing employee record #17459

Closed diderich closed 4 months ago

diderich commented 4 months ago

🐞 bug report

⁉️ Describe the bug

I want to view the details of an employee record accessing the following link:

https://www.mysite.net/crm7/index.php?module=OSSEmployees&view=Detail&record=115&parent=198&mid=228

Rather than get the actual information, I get the following error message:

error

πŸ”₯ How to trigger the error

Steps to reproduce the behavior:

  1. Go to https://www.mysite.net/crm7/index.php?module=OSSEmployees&view=Detail&record=115&parent=198&mid=228
  2. See error

πŸ‘Ž Actual Behavior

πŸ‘ Expected Behavior

πŸ‘· Testing

πŸ“· Screenshot of configuration

ConfReport

πŸ“ PHP/Apache/Nginx/Browser/CRM Logs

There is no error in cache/logs/errors.log.

App\Exceptions\AppException: LBL_HANDLER_NOT_FOUND in include/Loader.php:188
Stack trace:
#0 modules/Vtiger/models/Relation.php(368): Vtiger_Loader::getComponentClassName()
#1 modules/Vtiger/models/Relation.php(253): Vtiger_Relation_Model->getTypeRelationModel()
#2 modules/Vtiger/models/Relation.php(880): Vtiger_Relation_Model->getRelationType()
#3 modules/Vtiger/models/DetailView.php(425): Vtiger_Relation_Model->isDirectRelation()
#4 modules/Vtiger/models/DetailView.php(319): Vtiger_DetailView_Model->getDetailViewRelatedLinks()
#5 modules/OSSEmployees/models/DetailView.php(15): Vtiger_DetailView_Model->getDetailViewLinks()
#6 modules/Vtiger/views/Detail.php(97): OSSEmployees_DetailView_Model->getDetailViewLinks()
#7 include/main/WebUI.php(259): Vtiger_Detail_View->preProcess()
#8 include/main/WebUI.php(160): Vtiger_WebUI->triggerPreProcess()
#9 index.php(26): Vtiger_WebUI->process()
#10 public_html/index.php(13): require('...')
#11 {main}#0 [info][yii\db\Connection::open] Opening DB connection: mysql:host=localhost;dbname=crm7;port=3306
#1 [info][yii\db\Command::query] SELECT EXISTS(SELECT * FROM `vtiger_users` WHERE (`id`=1) AND ((`status`='Active') AND (`deleted`=0)))
#2 [info][yii\db\Command::query] SELECT EXISTS(SELECT * FROM `vtiger_users` WHERE `id`=1)
#3 [info][yii\db\Command::query] SELECT * FROM `vtiger_tab`
#4 [info][yii\db\Command::query] SELECT * FROM `vtiger_entityname`
#5 [info][yii\db\Command::query] SELECT * FROM `vtiger_field` LEFT JOIN `s_yf_fields_anonymization` ON vtiger_field.fieldid = s_yf_fields_anonymization.field_id WHERE `tabid`=61
#6 [info][yii\db\Command::query] SELECT * FROM `vtiger_entityname` LEFT JOIN `a_yf_module_reference` ON a_yf_module_reference.module_id = vtiger_entityname.tabid WHERE `vtiger_entityname`.`modulename`='OSSEmployees' ORDER BY `a_yf_module_reference`.`sort`
#7 [info][yii\db\Command::query] SELECT `vtiger_ossemployees`.`ossemployees_no` AS `vtiger_ossemployeesossemployees_no`, `vtiger_ossemployees`.`employee_status` AS `vtiger_ossemployeesemployee_status`, `vtiger_crmentity`.`smownerid` AS `vtiger_crmentityassigned_user_id`, `vtiger_ossemployees`.`last_name` AS `vtiger_ossemployeeslast_name`, `vtiger_ossemployees`.`birth_date` AS `vtiger_ossemployeesbirth_date`, `vtiger_crmentity`.`createdtime` AS `vtiger_crmentitycreatedtime`, `vtiger_crmentity`.`modifiedtime` AS `vtiger_crmentitymodifiedtime`, `vtiger_ossemployees`.`business_phone` AS `vtiger_ossemployeesbusiness_phone`, `vtiger_ossemployees`.`business_mail` AS `vtiger_ossemployeesbusiness_mail`, `vtiger_ossemployees`.`private_mail` AS `vtiger_ossemployeesprivate_mail`, `vtiger_ossemployees`.`street` AS `vtiger_ossemployeesstreet`, `vtiger_ossemployees`.`code` AS `vtiger_ossemployeescode`, `vtiger_ossemployees`.`city` AS `vtiger_ossemployeescity`, `vtiger_ossemployees`.`country` AS `vtiger_ossemployeescountry`, `vtiger_ossemployees`.`secondary_phone` AS `vtiger_ossemployeessecondary_phone`, `vtiger_ossemployees`.`position` AS `vtiger_ossemployeesposition`, `vtiger_crmentity`.`smcreatorid` AS `vtiger_crmentitycreated_user_id`, `vtiger_ossemployees`.`cf_photo` AS `vtiger_ossemployeescf_photo`, `vtiger_ossemployees`.`cf_salary` AS `vtiger_ossemployeescf_salary`, `vtiger_ossemployees`.`cf_daily_rate` AS `vtiger_ossemployeescf_daily_rate`, `vtiger_ossemployees`.`cf_target_utilization` AS `vtiger_ossemployeescf_target_utilization`, `vtiger_ossemployees`.`cf_pobox` AS `vtiger_ossemployeescf_pobox`, `vtiger_crmentity`.`deleted` FROM `vtiger_crmentity` LEFT JOIN `vtiger_ossemployees` ON vtiger_crmentity.crmid = vtiger_ossemployees.ossemployeesid WHERE (`vtiger_crmentity`.`crmid`=115) AND (`vtiger_crmentity`.`setype`='OSSEmployees') LIMIT 1
#8 [info][yii\db\Command::query] SELECT `crmid`, `setype`, `deleted`, `smcreatorid`, `smownerid`, `createdtime`, `private` FROM `vtiger_crmentity` WHERE `crmid`=115
#9 [info][yii\db\Command::query] SELECT `crmid`, `label` FROM `u_yf_crmentity_label` WHERE `crmid`=115
#10 [info][yii\db\Command::query] SELECT * FROM `vtiger_currency_info` WHERE `deleted`=0
#11 [info][yii\db\Connection::open] Opening DB connection: mysql:host=localhost;dbname=crm7;port=3306
#12 [info][yii\db\Command::query] SELECT * FROM `s_yf_reg_data` LIMIT 1
#13 [info][yii\db\Command::query] SELECT * FROM `vtiger_links`
#14 [info][yii\db\Command::query] SHOW FULL COLUMNS FROM `u_yf_browsinghistory`
#15 [info][yii\db\Command::query] SELECT
    `kcu`.`CONSTRAINT_NAME` AS `constraint_name`,
    `kcu`.`COLUMN_NAME` AS `column_name`,
    `kcu`.`REFERENCED_TABLE_NAME` AS `referenced_table_name`,
    `kcu`.`REFERENCED_COLUMN_NAME` AS `referenced_column_name`
FROM `information_schema`.`REFERENTIAL_CONSTRAINTS` AS `rc`
JOIN `information_schema`.`KEY_COLUMN_USAGE` AS `kcu` ON
    (
        `kcu`.`CONSTRAINT_CATALOG` = `rc`.`CONSTRAINT_CATALOG` OR
        (`kcu`.`CONSTRAINT_CATALOG` IS NULL AND `rc`.`CONSTRAINT_CATALOG` IS NULL)
    ) AND
    `kcu`.`CONSTRAINT_SCHEMA` = `rc`.`CONSTRAINT_SCHEMA` AND
    `kcu`.`CONSTRAINT_NAME` = `rc`.`CONSTRAINT_NAME`
WHERE `rc`.`CONSTRAINT_SCHEMA` = database() AND `kcu`.`TABLE_SCHEMA` = database()
AND `rc`.`TABLE_NAME` = 'u_yf_browsinghistory' AND `kcu`.`TABLE_NAME` = 'u_yf_browsinghistory'
#16 [info][yii\db\Command::execute] INSERT INTO `u_yf_browsinghistory` (`userid`, `date`, `title`, `url`) VALUES (1, '2024-05-11 17:57:24', 'Company > Employees > Detail | Diderich, Claude', 'crm7/index.php?module=OSSEmployees&view=Detail&record=115&parent=198&mid=228')
#17 [info][yii\db\Command::query] SELECT * FROM `u_yf_browsinghistory` WHERE `userid`=1 ORDER BY `id` DESC LIMIT 20
#18 [info][yii\db\Command::query] SELECT * FROM `s_yf_meeting_services` ORDER BY `status` DESC
#19 [info][yii\db\Command::query] SELECT `vtiger_tab`.`name` FROM `vtiger_entityname` INNER JOIN `vtiger_tab` ON vtiger_tab.tabid=vtiger_entityname.tabid WHERE ((`vtiger_tab`.`presence`=0) AND (`turn_off`=1)) AND (NOT (`vtiger_tab`.`name`='Users'))
#20 [info][yii\db\Command::query] SELECT * FROM `vtiger_actionmapping`
#21 [info][yii\db\Command::query] SELECT * FROM `s_yf_kanban_boards` WHERE `tabid`=61 ORDER BY `sequence`
#22 [info][yii\db\Command::query] SELECT `vtiger_field`.*, `s_yf_fields_anonymization`.* FROM `vtiger_field` LEFT JOIN `vtiger_blocks` ON vtiger_field.block = vtiger_blocks.blockid LEFT JOIN `s_yf_fields_anonymization` ON vtiger_field.fieldid = s_yf_fields_anonymization.field_id WHERE `vtiger_field`.`tabid`=61 ORDER BY `vtiger_blocks`.`sequence`, `vtiger_field`.`sequence`
#23 [info][yii\db\Command::query] SELECT * FROM `vtiger_blocks` WHERE `blockid`=151 LIMIT 1
#24 [info][yii\db\Command::query] SELECT * FROM `vtiger_blocks` WHERE `blockid`=152 LIMIT 1
#25 [info][yii\db\Command::query] SELECT * FROM `vtiger_blocks` WHERE `blockid`=466 LIMIT 1
#26 [info][yii\db\Command::query] SELECT * FROM `vtiger_blocks` WHERE `blockid`=465 LIMIT 1
#27 [info][yii\db\Command::query] SELECT * FROM `vtiger_blocks` WHERE `blockid`=154 LIMIT 1
#28 [info][yii\db\Command::query] SELECT `workflow_id`, `module_name`, `summary`, `test`, `execution_condition`, `defaultworkflow`, `type`, `filtersavedinnew`, `params` FROM `com_vtiger_workflows` WHERE `module_name`='OSSEmployees' ORDER BY `sequence`
#29 [info][yii\db\Command::query] SELECT `vtiger_field`.`fieldname`, `value` FROM `u_yf_picklist_close_state` INNER JOIN `vtiger_field` ON u_yf_picklist_close_state.fieldid = vtiger_field.fieldid WHERE (`tabid`=61) AND (`presence` IN (0, 2))
#30 [info][yii\db\Command::query] SELECT * FROM `a_yf_mapped_config` WHERE (`tabid`=61) AND (`status`=1)
#31 [info][yii\db\Command::query] SELECT `state` FROM `u_yf_watchdog_record` WHERE (`userid`=1) AND (`record`=115) LIMIT 1
#32 [info][yii\db\Command::query] SELECT * FROM `a_yf_record_converter` WHERE ((`source_module`=61) AND (`status`=1)) AND (`show_in_detail`=1)
#33 [info][yii\db\Command::query] SELECT * FROM `s_yf_record_quick_changer` WHERE `tabid`=61
#34 [info][yii\db\Command::query] SELECT * FROM `a_yf_pdf` WHERE (`module_name`='OSSEmployees') AND (`status`=1)
#35 [info][yii\db\Command::query] SELECT * FROM `vtiger_widgets` WHERE `tabid`=61 ORDER BY `tabid`, `sequence`
#36 [info][yii\db\Command::query] SELECT `vtiger_field`.*, `s_yf_fields_anonymization`.* FROM `vtiger_field` LEFT JOIN `vtiger_blocks` ON vtiger_field.block = vtiger_blocks.blockid LEFT JOIN `s_yf_fields_anonymization` ON vtiger_field.fieldid = s_yf_fields_anonymization.field_id WHERE `vtiger_field`.`tabid`=40 ORDER BY `vtiger_blocks`.`sequence`, `vtiger_field`.`sequence`
#37 [info][yii\db\Command::query] SELECT * FROM `vtiger_blocks` WHERE `blockid`=98 LIMIT 1
#38 [info][yii\db\Command::query] SELECT * FROM `vtiger_blocks` WHERE `blockid`=99 LIMIT 1
#39 [info][yii\db\Command::query] SELECT * FROM `vtiger_ws_fieldtype`
#40 [info][yii\db\Command::query] SELECT `relmodule` AS `module` FROM `vtiger_fieldmodulerel` INNER JOIN `vtiger_tab` ON vtiger_tab.name = vtiger_fieldmodulerel.relmodule WHERE (`fieldid`=601) AND (`vtiger_tab`.`presence` <> 1) ORDER BY `sequence`
#41 [info][yii\db\Command::query] SELECT EXISTS(SELECT * FROM `vtiger_modtracker_tabs` WHERE (`vtiger_modtracker_tabs`.`visible`=1) AND (`vtiger_modtracker_tabs`.`tabid`=61))
#42 [info][yii\db\Command::query] SELECT `vtiger_relatedlists`.*, `vtiger_tab`.`name` AS `related_modulename`, `vtiger_tab`.`presence` AS `related_module_presence` FROM `vtiger_relatedlists` INNER JOIN `vtiger_tab` ON vtiger_relatedlists.related_tabid = vtiger_tab.tabid WHERE `vtiger_relatedlists`.`tabid`=61 ORDER BY `sequence`

🌍 Your Environment

Environment Version / Name
YetiForce 7.0.1
Web server (name and version) apache 2.4.51
PHP 8.3.7
Browser (name and version) firefox
Operating System (name and version) openSUSE 15.5
Database (name and version) mariadb 11.2.3
Service Pack version

❓ Additional context

Add any other context about the problem here.

❗️ Inform the community if you solve the problem

mariuszkrzaczkowski commented 4 months ago

do you have any custom related modules?

diderich commented 4 months ago

This was my mistake. I had added a custom getDependentsListRel handle in custom/modules/OSSEmployees/relations and did not migrate it to V7.0.

By the way, here is my implementation, which allows to find Leads, Opportunities, Projects, ServiceContracts related to the employee:

/**
 * OSSEmployees_GGetDependentsListRel_Relation class.
 */
class OSSEmployees_GetDependentsListRel_Relation extends \App\Relation\RelationAbstraction
{
    /** {@inheritdoc} */
    public function getRelationType(): int
    {
        return Vtiger_Relation_Model::RELATION_M2M;
    }

  /**
     * {@inheritdoc}
     */
    public function getQuery()
    {
        $this->relationModel->getQueryGenerator()
            ->addNativeCondition(['vtiger_crmentity.smownerid' => $this->relationModel->get('parentRecord')->get('assigned_user_id')]);
    }

    /**
     * {@inheritdoc}
     */
    public function delete(int $sourceRecordId, int $destinationRecordId): bool
    {
        return false;
    }

    /**
     * {@inheritdoc}
     */
    public function create(int $sourceRecordId, int $destinationRecordId): bool
    {
        return true;
    }

    /**
     * {@inheritdoc}
     */
    public function transfer(int $relatedRecordId, int $fromRecordId, int $toRecordId): bool
    {
        return false;
    }
}