Thursday, June 14, 2012

[Solved] Problems Installing Payslip module using vtlib in vtiger


When installing Payslip module using vtib from "VtigerCRM_5.2.0_Vtlib.pdf", I faced some problems. I want to share how I solved those problem.

Problem 1:
------------------------------------------------------------------------------------------------------------
I installed the Payslip module but when I clicked on Payslip link in vtiger, it showed blank page.

For this, open your php.ini file
Remove comment from line:
             error_reporting = E_ALL & ~E_NOTICE
Add comment on line:
             error_reporting  =  E_WARNING & ~E_NOTICE

This will show all errors on your vtiger page instead of displaying blank page.
------------------------------------------------------------------------------------------------------------

Problem 2:
------------------------------------------------------------------------------------------------------------
Class 'Payslip' not found in C:\Program Files\vtigercrm\apache\htdocs\vtigerCRM\modules\Vtiger\ListView.php

In this case, I had done something wrong in Step 8 of the vtib guide.
Inside Payslip.php, instead of renaming Class ModuleClass to Payslip, I renamed it as Payslipclass. Because of this, ListView.php could not find the Payslip class.
------------------------------------------------------------------------------------------------------------

Problem 3:
------------------------------------------------------------------------------------------------------------
Fatal error: Uncaught exception 'WebServiceException' with message 'Permission to perform the operation is denied for name' in C:\Program Files (x86)\vtigercrm-5.2.0\apache\htdocs\vtigerCRM\include\Webservices\VtigerWebserviceObject.php:50 Stack trace: #0 C:\Program Files (x86)\vtigercrm-5.2.0\apache\htdocs\vtigerCRM\include\Webservices\Utils.php(418): VtigerWebserviceObject::fromName(Object(PearDatabase), 'Payslip') #1 C:\Program Files (x86)\vtigercrm-5.2.0\apache\htdocs\vtigerCRM\modules\CustomView\CustomView.php(87): vtws_getModuleHandlerFromName('Payslip', Object(Users)) #2 C:\Program Files (x86)\vtigercrm-5.2.0\apache\htdocs\vtigerCRM\modules\CustomView\CustomView.php(75): CustomView->getMeta('Payslip', Object(Users)) #3 C:\Program Files (x86)\vtigercrm-5.2.0\apache\htdocs\vtigerCRM\modules\Payslip\ListView.php(61): CustomView->CustomView('Payslip') #4 C:\Program Files (x86)\vtigercrm-5.2.0\apache\htdocs\vtigerCRM\modules\Payslip\index.php(13): include_once('C:\Program File...') #5 C:\Program Files (x86)\vtigercrm-5. in C:\Program Files (x86)\vtigercrm-5.2.0\apache\htdocs\vtigerCRM\include\Webservices\VtigerWebserviceObject.php on line 50 

This was solved by adding "$module->initWebservice();" in vtlib.Test.Create.Module1.php (Thanks to  wildrider for this solution.)

<?php
// Turn on debugging level
$Vtiger_Utils_Log = true;
include_once('vtlib/Vtiger/Menu.php');
include_once('vtlib/Vtiger/Module.php');
// Create module instance and save it first
$module = new Vtiger_Module();
$module->name = 'Payslip';
$module->save();
// Initialize all the tables required
$module->initTables();
//Initialize Webservice
$module->initWebservice();
----------------------------------------------------------------------------------------------------------------------------------
Hope you found this useful. Let me know if you have any questions.
Cheers!!

P.S: I have tested using vtiger 5.2.1 and vtiger 5.4.0. I could successfully install Payslip in both of them.

5 comments:

  1. very helpful, thank you

    ReplyDelete
  2. Thanks!! Good to know that you found this information useful.

    ReplyDelete
  3. Yeeeaahhh after much searching this was the last post I consulted. Done: D many many thanks

    ReplyDelete
    Replies
    1. you'r most welcome..It's great to know that it was helpful.

      Delete