<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=UTF-8">
</head>
<body smarttemplateinserted="true" text="#000000" bgcolor="#FFFFFF">
Dear Vtiger Team,<br>
<br>
I have found a <b>bug </b>in the vtiger 6.1 SVN 14164.<br>
The bug is related to the issue mentioned my letter of 14, July,
here is below with screenshoots, and easy to handle.<br>
<br>
The ModTracker should not be notify the change in the field of <b>Modified
Time</b>, and the Created Time also should be displayed right in
any Custom module.<br>
<br>
The cause of the issue is a very simply and stupid thing.<br>
<br>
Here is the sample code of the creation entity module, form the
page:<br>
<a class="moz-txt-link-freetext" href="http://community.vtiger.com/help/vtigercrm/developers/extensions/examples/entity-module.html">http://community.vtiger.com/help/vtigercrm/developers/extensions/examples/entity-module.html</a><br>
$mfield3 = new Vtiger_Field();<br>
$mfield3->name = 'ModifiedTime';<br>
$mfield3->label= 'Modified Time';<br>
$mfield3->table = 'vtiger_crmentity';<br>
$mfield3->column = 'modifiedtime';<br>
$mfield3->uitype = 70;<br>
$mfield3->typeofdata = 'T~O';<br>
$mfield3->displaytype= 2;<br>
$block->addField($mfield3);<br>
<br>
The field name 'ModifiedTime' uses <b>uppercase </b>and <b>lowercase
</b>letters also. For the SQL is indifferent because the SQL is case
<b>insensitive </b>relating to the field names or table names.<br>
But the array keys are case sensitive things in PHP.<br>
Ref.: <a class="moz-txt-link-freetext" href="http://php.net/manual/en/function.array-key-exists.php">http://php.net/manual/en/function.array-key-exists.php</a> (look
at the comments) or look at this post<br>
<a class="moz-txt-link-freetext" href="http://stackoverflow.com/questions/1511230/php-array-are-array-indexes-case-sensitive">http://stackoverflow.com/questions/1511230/php-array-are-array-indexes-case-sensitive</a><br>
<br>
So, using the field name 'ModifiedTime' and 'modifiedtime' are two
different things for the handling programs.<br>
<br>
<b>.../modules/ModTracker/ModTrackerHandler.php will fail in the
line 33-34 due to the uppercase / lowercase confusion.</b><br>
foreach($delta as $fieldName => $values) {<br>
if($fieldName != 'modifiedtime') {<br>
<br>
Perhaps many of the Custom modules uses the field name
'ModifiedTime' (as it was suggested in the sample code) and the
tabid=34, PBXManager also uses in the table vtiger_field uppercase /
lowercase name.<br>
<br>
<b>Solution:</b><br>
<b>(1) Using lowercase field names in all vtiger consequently. It is
the most easiest way to repair code.</b><b> It is may suggestion.</b><br>
<br>
<br>
(2) Using lowercase conversion in every place where SQL field names
are appearing as an array key. It is quite difficult to check all
the code and change all appearances.<br>
<br>
Affected standard modules:<br>
PBXManager<br>
<br>
An other question to this issue, with Type of Data:<br>
$mfield3->typeofdata = 'T~O';<br>
<br>
Here is T~O in the sample code.<br>
Looking the table vtiger_field inside, all other fields
'modifiedtime' have typeofdata= DT~O.<br>
<br>
Is it a typo or intentionally was changed the typeofdata in the
sample code?<br>
<br>
The above mentioned issue with both side (field name and
typeofdata) is valid for the other system field '<b>CreatedTime</b>'
/ '<b>createdtime</b>' also <br>
<br>
Kindest regards:<br>
Istvan<br>
<div class="moz-forward-container"><br>
<br>
-------- Eredeti üzenet --------
<table class="moz-email-headers-table" border="0" cellpadding="0"
cellspacing="0">
<tbody>
<tr>
<th nowrap="nowrap" valign="BASELINE" align="RIGHT">Tárgy: </th>
<td>Strange behavior of ModTracker in a Custom module vtiger
6.1</td>
</tr>
<tr>
<th nowrap="nowrap" valign="BASELINE" align="RIGHT">Dátum: </th>
<td>Mon, 14 Jul 2014 15:45:14 +0200</td>
</tr>
</tbody>
</table>
<br>
<br>
<meta http-equiv="content-type" content="text/html; charset=UTF-8">
Dear Vtiger Community,<br>
<br>
There is a strange behavior of ModTracker in a Custom module
vtiger 6.1 module record summary view.<br>
Here is the Modtracker data in Contacts module, with right data:<br>
<img alt="" src="cid:part1.05080004.01020108@gmail.com"
height="541" width="1299"><br>
<br>
And here is the Modtracker data in my Custom module with totally
strange data show:<br>
<img alt="" src="cid:part2.09080708.05040505@gmail.com"
height="692" width="1335"><br>
<br>
Is there any idea what is the cause of it?<br>
<br>
Kindest regards:<br>
István<br>
<br>
<br>
<br>
<div class="moz-signature">-- <br>
üdvözlettel:<br>
<br>
<b>Holbok István</b><br>
<br>
+3670-342-0900<br>
<b>e-mail:</b> <a moz-do-not-send="true"
class="moz-txt-link-abbreviated"
href="mailto:holbok@gmail.com">holbok@gmail.com</a><br>
<b>SkyPe:</b> holboki<br>
<br>
</div>
<br>
</div>
<br>
<br>
</body>
</html>