web statisticsweb stats

Business Phone Systems

Products from our Sponsors
Previous Thread
Next Thread
Print Thread
Rate Thread
#645475 09/27/23 12:07 PM
Joined: Aug 2004
Posts: 1,722
Likes: 44
Admin
*****
Admin
*****
Joined: Aug 2004
Posts: 1,722
Likes: 44
Here's another tidbit I'm posting simply so it can be found later! We were struggling to remove a couple custom modules from vTiger that we presumed were preventing an upgrade. They were called 'Vtiger Premium' and 'Duplicate Extension Check' which are referred to internally in vTiger as 'VTEStore' and 'DuplicateCheckMerge' respectively. After merging info from a couple other posts we came up with the following:

Create a php file in the vTiger home directory named RemoveModule.php, insert the following (change VTEStore to DuplicateCheckMerge or whatever other module you want to delete and run again):
Code
<?php

include_once 'vtlib/Vtiger/Module.php';

$Vtiger_Utils_Log = true;

$module = vtiger_module::getInstance('VTEStore');
if ($module) $module->delete();
?>

Now browse to vtiger.IP.address/vtigercrm/RemoveModule.php and you should see the following info scroll across an otherwise blank screen:
Code
deleting sharing access ... done
deleting tools ... done
deleting fields of the module ... done
deleting blocks for module ... done

In our case we also had to modify the SQL database and remove references to the 2 modules in table vtiger_settings_field.


[Linked Image from web.atcomsystems.ca]
Looking for a VoIP Phone Canada provider? Put Atcom's valuable VoIP expertise to work for your business today!
Atcom VoIP Phones
VoIP Demo

Best VoIP Phones Canada


Visit Atcom to get started with your new business VoIP phone system ASAP
Turn up is quick, painless, and can often be done same day.
Let us show you how to do VoIP right, resulting in crystal clear call quality and easy-to-use features that make everyone happy!
Proudly serving Canada from coast to coast.

Joined: Aug 2004
Posts: 1,722
Likes: 44
Admin
*****
Admin
*****
Joined: Aug 2004
Posts: 1,722
Likes: 44
Here's another vTiger finding that cost me a couple days of productivity! After upgrading Vtiger a few times (probably started in version 6 a number of years ago) I was able to get up to version 7.1RC and apply the first 2 hotfixes. However, as soon as I applied the 3rd hotfix named "vtigercrm7.1.0-hotfix3.zip" we suddenly could no longer view any customer records. The data was still there because certainly summaries still showed the correct numbers, and all the Vtiger user logins still worked.

After much trial & error I finally tracked the bug down to this failed SQL request:
SELECT vtiger_account.accountname, vtiger_accountbillads.bill_city, vtiger_account.website, vtiger_account.phone, vtiger_crmentity.smownerid, vtiger_account.accountid, vtiger_accounts_user_field.starred FROM vtiger_account INNER JOIN vtiger_crmentity ON vtiger_account.accountid = vtiger_crmentity.crmid INNER JOIN vtiger_accountbillads ON vtiger_account.accountid = vtiger_accountbillads.accountaddressid LEFT JOIN vtiger_users ON vtiger_crmentity.smownerid = vtiger_users.id LEFT JOIN vtiger_groups ON vtiger_crmentity.smownerid = vtiger_groups.groupid INNER JOIN vtiger_accounts_user_field ON vtiger_account.accountid = vtiger_accounts_user_field. WHERE vtiger_crmentity.deleted=0 AND vtiger_account.accountid > 0 ORDER BY vtiger_crmentity.modifiedtime DESC LIMIT 0,21

This issue was that vtiger_accounts_user_field. should have been vtiger_accounts_user_field.recordid

Turns out the offending code was in /var/www/html/vtigercrm/vtlib/Vtiger/Functions.php where:
Code
	public static function getUserSpecificTableName($moduleName) {
		return 'vtiger_crmentity_user_field';
	}
needed to be turned into
Code
        public static function getUserSpecificTableName($moduleName) {
                $moduleName = strtolower($moduleName);
                if ($moduleName == "events") {
                        $moduleName = "calendar";
                         }
                return "vtiger_".$moduleName.'_user_field';
        }

Viola! All good now...



Also, for MariaDB debugging:

Database Debugging


Nano the file include/database/PearDatabase.php
Look for the line $adb->connect(); (it's right near the end of the file)

You have 2 options:

1 - add this line:
$adb->setDebug(true);
This line will output EVERY Query sent to the database.

2 - add this line:
$adb->setDieOnError(true);
This line will only output a detailed error report if an SQL query generates an error.

Take the line out when you're done debugging - it could cause unexpected behavior.

Last edited by Toner; 09/29/23 05:05 PM.

[Linked Image from web.atcomsystems.ca]
Looking for a VoIP Phone Canada provider? Put Atcom's valuable VoIP expertise to work for your business today!

Moderated by  MooreTel 

Link Copied to Clipboard
Newest Topics
NEC Aspire Analog Extensions
by teldata1 - 12/18/24 07:08 AM
Crack pwd on NS700?
by Toner - 12/17/24 01:45 PM
ds2000 issue
by jsaad - 12/17/24 10:11 AM
Forum Statistics
Forums84
Topics94,456
Posts639,629
Members49,824
Most Online5,661
May 23rd, 2018
Newest Members
Abdul Munna, Sandrino, micro, nurelion, FooF
49,824 Registered Users
Top Posters(30 Days)
Toner 11
jsaad 6
dans 3
BrianS 3
Who's Online Now
1 members (JBean3329), 459 guests, and 21 robots.
Key: Admin, Global Mod, Mod
Contact Us | Sponsored by Atcom: One of the best VoIP Phone Canada Suppliers for your business telephone system!| Terms of Service

Sundance Communications is not affiliated with any of the above manufacturers. Sundance Phone System Forums - VOIP & Cloud Phone Help
©Copyright Sundance Communications 1998 - 2024
Powered by UBB.threads™ PHP Forum Software 8.0.0