modules/Migration/schema/730_to_740.php doesn't seem to be executed in migration from vt 7.3
Since the row userlabel in table vtiger_users is not created, you get the following query error:
Error filling in user array: Query Failed:SELECT id, user_name,first_name,last_name,userlabel from vtiger_users WHERE status=? and (user_name != 'admin' OR is_owner=1) order by user_name ASC::ADODB error Error filling in user array: Query Failed:SELECT id, user_name,first_name,last_name,userlabel from vtiger_users WHERE status=? and (user_name != 'admin' OR is_owner=1) order by user_name ASC::->Unknown column 'userlabel' in 'field list'
Furthermore, the update query generated here has an error:
$sql="UPDATE vtiger_users SET $fieldName = TRIM(CONCAT(".implode(' ',$entityFieldNames)."))";
the first argument in the implode function should be this: ', ' and not this ' '
It seems this script was not even tested once, this would have popped out immediately.
Designs
Child items
...
Show closed items
Linked items
0
Link issues together to show that they're related.
Learn more.
This flaw is due to the values of current_version is vtiger_version table of 7.3.0 instance, which is set to 7.3 instead of 7.3.0. Which is failing to read the migration script for DB changes.
@uma.s The MySql function CONCAT needs that its arguments are separated by comma. Yesterday I saw the query error and fixed it as I suggested above.
The upgrade process continues as if there were no errors but I really don't see how that could work correctly. Its a syntax error. Turn on the logs and you'll see what I mean.
@ruben.estrada Thanks Ruben. I've implemented both your above changes and redone the migration. When I run vtiger it still produces the same error. I also just noticed the following errors before the migration terminates:-
[Wed Jul 21 19:25:54.534096 2021] [php7:warn] [pid 2355] [client 192.168.1.208:49492] PHP Warning: Declaration of EmailTemplates_Module_Model::saveRecord(EmailTemplates_Record_Model $recordModel) should be compatible with Vtiger_Module_Model::saveRecord(Vtiger_Record_Model $recordModel) in /var/www/html/vtigercrm/modules/EmailTemplates/models/Module.php on line 35, referer: http://192.168.1.213/vtigercrm/index.php
[Wed Jul 21 19:25:54.534388 2021] [php7:warn] [pid 2355] [client 192.168.1.208:49492] PHP Warning: Declaration of EmailTemplates_Module_Model::deleteRecord(EmailTemplates_Record_Model $recordModel) should be compatible with Vtiger_Module_Model::deleteRecord(Vtiger_Record_Model $recordModel) in /var/www/html/vtigercrm/modules/EmailTemplates/models/Module.php on line 68, referer: http://192.168.1.213/vtigercrm/index.php
These errors are also present in the vtiger_error.log. Not sure if it's related or something else.
I've done my third migration from 73 to 74. This time I set $db->setDebug(true) and here's the query error I mention:
Query: UPDATE vtiger_users SET userlabel = TRIM(CONCAT(first_name last_name)) failed. Incorrect parameters in the call to native function 'concat'1583: Incorrect parameters in the call to native function 'concat' ADOConnection._Execute(UPDATE vtiger_users SET userlabel = TRIM(CONCAT(first_name last_name)), false) % line 1229, file: adodb.inc.phpADOConnection.Execute(UPDATE vtiger_users SET userlabel = TRIM(CONCAT(first_name last_name))) % line 357, file: PearDatabase.phpPearDatabase.pquery(UPDATE vtiger_users SET userlabel = TRIM(CONCAT(first_name last_name)), Array[0]) % line 54, file: 730_to_740.php
Notice how there is no coma between first_name and last_name
What happens is that the userlabel column in the vtiger_users table ends up with only nulls.
For some reason the error didn't make it into the logs (I don't know why).
about this:
include_once dirname(__FILE__)."730_to_740.php";
now I'm 100% it's wrong. dirname() does not return a trailing slash. It says so in the documentation and I've also tested it.