Vtigercrm errors

From Studiosg
Jump to: navigation, search

Welcome to Simone Giustetti's wiki pages.

Languages: English - Italiano

As a custom module developer for the VtigerCRM software I incurred in some errors while writing code; my goal here is to describe them as best as possible. I'll provide a brief description for each error: the error message, if available, and the solution to the problem. I'll try to provide even links to the project documentation when needs be. As a general rule to problem solving I'll suggest to set Php parameter error_reporting equal to E_ALL in order to test code. The VtigerCRM install program requires production suited parameter values that hide useful error messages. Parameter settings should be set accordingly to coder needs while development is in progress.

Error "ListView results in a blank screen"

The issue arises after a module is created recurring to the Vtlib API, while inserting a new record into the data aware form. Data are saved, but at save completion VtigerCRM returns a blank screen instead of the usual detail view. The issue is related to the new custom module and does not affect the standard software behavior.

Tentative bug diagnosis: One out of the *.php files the module is made of, language and localization files included, ends with a blank line instead of the standard "?>" closing tag.
Solution: Remove all blank lines after tag "?>".
Tentative bug diagnosis: An entry for the custom module is missing from table vtiger_ws_entity.
Solution: Add a record for the missing module into table vtiger_ws_entity recurring to a proper SQL clause.
The INSERT clause should consist of the following data: (1st available identifier, '<module_name>', 'include/Webservices/VtigerModuleOperation.php', 'VtigerModuleOperation', 1) .
Solution 2: Rewrite the module creation code inserting a call to function $<module>->initWebservice(); in the line following the $<module>->save(); instruction. The function will populate table vtiger_ws_entity with the proper data.

Error "No user other than admin can log-in"

No user other than admin can log-in to the CRM following a release upgrade or a back-up data restore. The following error message appears on screen: "You have updated your php version. due changes in crypt API your password is no longer applicable, please reset your password. you can reset password for all users using a script and set it to thier respective user names. Please Click here". The software redirects to password reset script in a Vtiger Wiki page. Sadly running the script results in no effect.

Tentative bug diagnosis: Software release 5.2.1 was developed for Php 5.3.X release 5.1.0 for Php 5.2.X instead. Php release 5.3.X introduced a new Crypto API resulting in an updated and not backward compatible authentication subsystem.
Solution: Follow the procedure found in the redirect page.
  • A debugged password reset script can be found here: Updated ResetPassword.phpfile.gz
  • Decompress the archived script: gunzip ResetPassword.phpfile.gz
  • Copy the resulting file in VtigerCRM root directory.
  • Rename file in ResetPassword.php
  • Open file ResetPassword.php with a text editor of choice and update parameter $configuredAppKey. Set its value equal to the one of parameter $application_unique_key which can be found in the main configuration file: config.inc.php.
  • Execute the script through a browser or running Php from the command line:
php -f ./ResetPassword.php
  • Once done remove the script.

Error "Not unique table/alias"

This error appears while creating a report mixing standard modules and custom ones. Suppose you want to relate standard module "Contacts" to custom one "Policy", the returned error is:

  Report generation failed!
  Not unique table/alias: 'vtiger_accountRelPolicy' 

Where Policy is my custom module.

Tentative bug diagnosis: This is a documented bug in VtigerCRM code resulting in non unique alias generation for table names. The resulting SQL string cannot retrieve any data from the related tables.
Solution: A bug related discussion can be found in the VtigerCRM forum where a patch is provided.
  • Download the patch.
  • Copy the patch in the data sub-directory of your VtigerCRM installation tree where the CRMEntity.php file is located.
  • Optionally rename the patch file in CRMEntity.patch. I did it only for the sake of clarity.
  • Apply the patch running the patch command:
           root@vms140v32:/var/www/htdocs/vtigercrm521_pro/data# patch -p0 -i CRMEntity.patch
           patching file CRMEntity.php
           Hunk #1 succeeded at 1890 (offset 18 lines).
           patching file CRMEntity.php
           Hunk #1 succeeded at 1953 (offset 18 lines).
  • The patch command will automatically create a back-up copy of file CRMEntity.php: CRMEntity.php.orig.
The issue should be solved.

Error "You are not permitted to execute this Operation"

Any action taken against the custom module fails returning error "You are not permitted to execute this Operation" to screen. The issue is related to the new custom module and does not affect the standard software behavior.

Tentative bug diagnosis: Php scripts are affected by a lack of permissions.
Solution: Check for the script user and group to be the same which run the Web Server otherwise reassign user and group. If the user / group change were not decisive, temporarily assign permission 755 the the scripts in order to perform further checks. Please recover previous permissions at check completion. Granting higher than required permissions is a bad option when dealing with production environments connected to the Internet and could result in a security risk. The practice should be avoided for hosts other than development and test ones.
Tentative bug diagnosis: The unique identifier for the related entity consists of multiple fields, but only some are flagged as "Required".
Solution: Update file <entity>.php setting $required_fields value equal to the parameter list passed to Vtlib function setEntityIdentifier in the module creation code.

For any feedback, questions, errors and such, please e-mail me at studiosg [at] giustetti [dot] net.

Languages: English - Italiano