解决vtigerCRM添加关联产品分页时:Handler not found

报错定位到includes/loader.php的getComponentClassName方法,猜测大概是因为缺少某个class导致报错。

跟踪代码后发现缺少AjaxView相关的class。
以商机模块关联产品来说,就是缺少Potentials_ProductsPopupAjax_View
于是需要新建modules/Potentials/View/ProductsPopupAjax.php

代码如下:

exposeMethod('getListViewCount');
        $this->exposeMethod('getRecordsCount');
        $this->exposeMethod('getPageCount');
    }
    
    /**
     * Function returns module name for which Popup will be initialized
     * @param type $request
     */
    public function getModule($request) {
        return 'Products';
    }
    
    function preProcess(Vtiger_Request $request) {
        return true;
    }

    function postProcess(Vtiger_Request $request) {
        return true;
    }

    function process (Vtiger_Request $request) {
        $mode = $request->get('mode');
        if(!empty($mode)) {
            $this->invokeExposedMethod($mode, $request);
            return;
        }
        $viewer = $this->getViewer ($request);

        $this->initializeListViewContents($request, $viewer);
        $moduleName = 'Potentials';
        $viewer->assign('MODULE_NAME',$moduleName);
        echo $viewer->view('PopupContents.tpl', $moduleName, true);
    }
}

你可能感兴趣的:(解决vtigerCRM添加关联产品分页时:Handler not found)