{"id":8712,"date":"2024-07-19T06:18:49","date_gmt":"2024-07-19T06:18:49","guid":{"rendered":"https:\/\/www.infinitivehost.com\/knowledge-base\/?p=8712"},"modified":"2024-08-23T09:33:50","modified_gmt":"2024-08-23T09:33:50","slug":"fix-vtiger-7-custom-entity-module-display-issues","status":"publish","type":"post","link":"https:\/\/www.infinitivehost.com\/knowledge-base\/fix-vtiger-7-custom-entity-module-display-issues\/","title":{"rendered":"Fix vTiger 7 Custom Entity Module Display Issues"},"content":{"rendered":"<div class='epvc-post-count'><span class='epvc-eye'><\/span>  <span class=\"epvc-count\"> 1,271<\/span><span class='epvc-label'> Views<\/span><\/div>\n<p class=\"wp-block-paragraph\">To troubleshoot and resolve the issue of a custom entity module not displaying data in vTiger 7 programmatically, you can follow these steps:<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">1. Check Module Configuration<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">Ensure that your custom module is configured correctly within vTiger. This includes defining fields, layouts, and ensuring proper relationships are established.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">2. Verify Database Integrity<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">Make sure the database tables related to your custom module are intact and contain the necessary data. You can use SQL queries to check:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code><code><mark style=\"background-color:rgba(0, 0, 0, 0)\" class=\"has-inline-color has-vivid-red-color\">-- Example SQL query to check if records exist in your custom module's table\nSELECT * FROM vtiger_my_custom_module;<\/mark><\/code><\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">Replace <code>vtiger_my_custom_module<\/code> with the actual table name of your custom module.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">3. Check Module Assignment and Permissions<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">Verify that the module is assigned to the correct user role and that permissions are properly set up for viewing records:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code><code><mark style=\"background-color:rgba(0, 0, 0, 0)\" class=\"has-inline-color has-vivid-red-color\">\/\/ Example PHP code to check module assignment and permissions\n$currentUser = vglobal('current_user');\n$moduleName = 'MyCustomModule';\n\nif ($currentUser-&gt;hasModulePermission($moduleName)) {\n    \/\/ Proceed to fetch and display data\n} else {\n    \/\/ Handle permissions issue\n}<\/mark><\/code><\/code><\/pre>\n\n\n\n<h3 class=\"wp-block-heading\">4. Clear Cache<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">Clear vTiger&#8217;s cache to ensure that any outdated cache isn&#8217;t causing the module to display incorrect data:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code><code><mark style=\"background-color:rgba(0, 0, 0, 0)\" class=\"has-inline-color has-vivid-red-color\">\/\/ Example PHP code to clear cache\n$cache = Vtiger_Cache::getInstance();\n$cache-&gt;delete('modulename_data'); \/\/ Replace 'modulename_data' with your module's cache identifier<\/mark><\/code><\/code><\/pre>\n\n\n\n<h3 class=\"wp-block-heading\">5. Enable Debugging and Logging<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">Enable debugging to capture any errors or warnings that may provide clues about why data isn&#8217;t displaying:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code><code><mark style=\"background-color:rgba(0, 0, 0, 0)\" class=\"has-inline-color has-vivid-red-color\">\/\/ Example PHP code to enable debugging\ndefine('IS_DEBUGGING_ENABLED', true);<\/mark><\/code><\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">Check the vTiger logs (<code>storage\/logs\/vtigercrm.log<\/code>) for any relevant messages.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">6. Ensure Compatibility with vTiger 7<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">Verify that any custom code or extensions you&#8217;ve implemented are compatible with vTiger 7. Ensure they adhere to the vTiger 7 architecture and APIs.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">7. Query and Display Data<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">Once you&#8217;ve ensured all configurations and checks are in place, use vTiger&#8217;s APIs or direct database queries to fetch and display data from your custom module:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code><code><mark style=\"background-color:rgba(0, 0, 0, 0)\" class=\"has-inline-color has-vivid-red-color\">\/\/ Example PHP code to fetch and display data\n$moduleModel = Vtiger_Module_Model::getInstance('MyCustomModule');\n$dataList = $moduleModel-&gt;getRecordsList();\n\nforeach ($dataList as $record) {\n    \/\/ Display relevant fields\n    echo $record-&gt;get('fieldname') . \"&lt;br&gt;\";\n}<\/mark><\/code><\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">Replace <code>'MyCustomModule'<\/code> with your actual module name and <code>'fieldname'<\/code> with the fields you want to display.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Conclusion<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">To handle and fix the problem of any specific custom entity module not displaying crucial information in vTiger 7 algorithmically, you can simply obey all above mentioned steps. With the help of the <a href=\"https:\/\/www.infinitivehost.com\/managed-vtiger-solutions\"><mark style=\"background-color:#8ed1fc\" class=\"has-inline-color has-black-color\"><strong>best Vtiger hosting solutions<\/strong><\/mark><\/a> you can fix custom entity module display issues in vTiger 7.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>1,271 Views To troubleshoot and resolve the issue of a custom entity module not displaying data in vTiger 7 programmatically, you can follow these steps: 1. Check Module Configuration Ensure that your custom module is configured correctly within vTiger. This includes defining fields, layouts, and ensuring proper relationships are established. 2. Verify Database Integrity Make [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"inline_featured_image":false,"footnotes":""},"categories":[204],"tags":[],"class_list":["post-8712","post","type-post","status-publish","format-standard","hentry","category-vtiger-solutions"],"_links":{"self":[{"href":"https:\/\/www.infinitivehost.com\/knowledge-base\/wp-json\/wp\/v2\/posts\/8712","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.infinitivehost.com\/knowledge-base\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.infinitivehost.com\/knowledge-base\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.infinitivehost.com\/knowledge-base\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.infinitivehost.com\/knowledge-base\/wp-json\/wp\/v2\/comments?post=8712"}],"version-history":[{"count":2,"href":"https:\/\/www.infinitivehost.com\/knowledge-base\/wp-json\/wp\/v2\/posts\/8712\/revisions"}],"predecessor-version":[{"id":8913,"href":"https:\/\/www.infinitivehost.com\/knowledge-base\/wp-json\/wp\/v2\/posts\/8712\/revisions\/8913"}],"wp:attachment":[{"href":"https:\/\/www.infinitivehost.com\/knowledge-base\/wp-json\/wp\/v2\/media?parent=8712"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.infinitivehost.com\/knowledge-base\/wp-json\/wp\/v2\/categories?post=8712"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.infinitivehost.com\/knowledge-base\/wp-json\/wp\/v2\/tags?post=8712"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}