Changes

1,568 bytes added ,  13:55, 21 March 2022
no edit summary
Line 1: Line 1: −
Welcome to Simone Giustetti's wiki pages.
+
{{header_en|title=Some VtigerCRM common errors and their solutions| keyword={{Template:keyword_en_vtigercrm}}| description=A selection of common VtigerCRM errors and the respective solutions | link_page=vtigercrm_errori}}
      −
Languages: '''English''' - [http://www.giustetti.net/wiki/index.php?title=vtigercrm_errori 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.
----
  −
 
  −
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" ==
 
== 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.
+
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'''.
 
: ''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'''.
Line 23: Line 19:       −
== Error "You are not permitted to execute this Operation" ==
+
== Error "No user other than admin can log-in" ==
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.
  −
----
  −
 
  −
 
  −
== Errore "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 [https://wiki.vtiger.com/index.php/520:Upgrading_to_PHP_5.3 Vtiger Wiki page]. Sadly running the script results in no effect.
 
'''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 [https://wiki.vtiger.com/index.php/520:Upgrading_to_PHP_5.3 Vtiger Wiki page]. Sadly running the script results in no effect.
   Line 41: Line 26:  
:::* A '''debugged''' password reset script can be found here: [http://www.giustetti.net/resource/script/vtiger521/ResetPassword.phpfile.gz Updated ResetPassword.phpfile.gz]
 
:::* A '''debugged''' password reset script can be found here: [http://www.giustetti.net/resource/script/vtiger521/ResetPassword.phpfile.gz Updated ResetPassword.phpfile.gz]
 
:::* Decompress the archived script: '''gunzip''' ResetPassword.phpfile.gz
 
:::* Decompress the archived script: '''gunzip''' ResetPassword.phpfile.gz
:::* Copy the resulting file in '''VtigerCrm''' root directory.
+
:::* Copy the resulting file in '''VtigerCRM''' root directory.
 
:::* Rename file in '''ResetPassword.php'''
 
:::* 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'''.
 
:::* 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'''.
Line 50: Line 35:       −
For any feedback, questions, errors and such, please e-mail me at ''studiosg [at] giustetti [dot] net''.
+
== 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 [https://forums.vtiger.com/viewtopic.php?t=26517 VtigerCRM forum] where a [https://forums.vtiger.com/download/file.php?id=3397&sid=c23b4e86e5afee8fd29e995ca9402084 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.
 
----
 
----
   −
Languages: '''English''' - [http://www.giustetti.net/wiki/index.php?title=vtigercrm_errori Italiano]
+
 
 +
For any feedback, questions, errors and such, please e-mail me at ''studiosg [at] giustetti [dot] net''.
 +
 
 +
 
 +
{{footer_en | link_page=vtigercrm_errori}}