Hi Robert,<div><br></div><div>Sorry for replying to this after a really long time.</div><div><br></div><div>This issue has been addressed with vtiger CRM 5.4.0. Please give it a try with 5.4.0 RC which is recently released and let us know your observation and feedback.<br>
<br><div class="gmail_quote">On Mon, Feb 7, 2011 at 7:43 PM, Robert Willert <span dir="ltr"><<a href="mailto:robert.willert@conceptpeople.de">robert.willert@conceptpeople.de</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<u></u>
<div bgcolor="#ffffff" text="#000000">
Hi,<br>
<br>
this error comes up on saving a copy.<br>
But only on custom modules based on the vtlib example.<br>
<br>
small backtrace:<br>
[0]=><br>
["file"]=> string(54) "data\CRMEntity.php"<br>
["line"]=> int(104)<br>
["function"]=> string(19) "save_related_module"<br>
["class"]=> string(9) "CRMEntity"<br>
[1]=><br>
["file"]=> string(54) "data\CRMEntity.php"<br>
["line"]=> int(860)<br>
["function"]=> string(10) "saveentity"<br>
["class"]=> string(9) "CRMEntity"<br>
["type"]=> string(2) "->"<br>
["args"]=> [0]=> "CPEmployee" [1]=>""<br>
[2]=><br>
["file"]=> string(63) "modules\CPEmployee\Save.php"<br>
["line"]=> int(29)<br>
["function"]=> string(4) "save"<br>
["class"]=> string(9) "CRMEntity"<br>
["type"]=> string(2) "->"<br>
["args"]=> [0]=> "CPEmployee"<br>
[3]=><br>
["file"]=> string(45) "index.php"<br>
["line"]=> int(711)<br>
["args"]=> [0]=>"modules\CPEmployee\Save.php"<br>
<br>
<br>
CRMEntity.php line 94: $for_crmid =
vtlib_purify($_REQUEST['return_id']);<br>
return_id is empty and the error occurs.<br>
But i dont know the return id because its a copy.<br>
Working with globals like $_REQUEST in methods is a bad idea.<br>
<br>
A better place to make the patch is maybe in line 100.<br>
<br>
if($on_focus->IsCustomModule && method_exists($on_focus,
'save_related_module')) {<br>
to<br>
if($on_focus->IsCustomModule && method_exists($on_focus,
'save_related_module') && !empty($for_crmid)) {<br>
<br>
<br>
Maybe it is the "method_exists($on_focus, 'save_related_module')" in
line 100.<br>
My Class has no save_related_module but the CRMEntity has.<br>
With an empty method save_related_module all is fine.<br>
But its only a workaround.<br>
<br>
<br>
Am 04.02.2011 10:59, schrieb maltesh:
<blockquote type="cite"><div><div></div><div class="h5">Robert<br>
<br>
Can you please tell for which operation the SQL error message
comes up.<br>
<br>
<div class="gmail_quote">On Wed, Jan 12, 2011 at 5:14 PM, Robert
Willert <span dir="ltr"><<a href="mailto:robert.willert@conceptpeople.de" target="_blank">robert.willert@conceptpeople.de</a>></span>
wrote:<br>
<blockquote class="gmail_quote" style="margin:0pt 0pt 0pt 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">Now with correct subject.<br>
<br>
This patch will fix an SQL error message on save an CRMEntity
copy.<br>
<br>
Best regards<br>
Robert Willert<br>
<br>
-- <br>
<br>
ConceptPeople consulting gmbh<br>
<br>
Robert Willert<br>
System Administrator<br>
<br>
ConceptPeople consulting gmbh<br>
Kurze Mühren 20<br>
20095 Hamburg<br>
<br>
Tel: 040 - 600 90 75-72<br>
Fax: 040 - 600 90 75-71<br>
<a href="http://www.conceptpeople.de" target="_blank">www.conceptpeople.de</a><br>
<br>
Geschäftsführer:<br>
Bjarne Jansen, Philipp Meißner, Andreas Rother<br>
Steuer-Nr: 74/858/00985<br>
UID-NR: DE219814648<br>
Registergericht:<br>
Hamburg, HRB 82938<br>
<br>
<br>
<br>
<br>
<br>
_______________________________________________<br>
<a href="http://www.vtiger.com/" target="_blank">http://www.vtiger.com/</a><br>
</blockquote>
</div>
<br>
<br clear="all">
<br>
-- <br>
Maltesh<br>
Vtiger Team<br>
</div></div><pre><fieldset></fieldset>
_______________________________________________
<a href="http://www.vtiger.com/" target="_blank">http://www.vtiger.com/</a></pre>
</blockquote>
<br>
</div>
<br>_______________________________________________<br>
<a href="http://www.vtiger.com/" target="_blank">http://www.vtiger.com/</a><br></blockquote></div><br><br clear="all"><div><br></div>-- <br>Regards,<br>Asha<br>vtiger Team<br><br><b>Connect with us on: </b><a href="http://twitter.com/#%21/vtigercrm" target="_blank">Twitter</a> <b>I</b> <a href="http://www.facebook.com/pages/vtiger/226866697333578?sk=wall" target="_blank">Facebook</a> <b>I</b> <a href="http://blog.vtiger.com/" target="_blank">Blog</a><b> I</b> <a href="http://wiki.vtiger.com/index.php/Main_Page" target="_blank">Wiki</a> <b>I </b><a href="http://forums.vtiger.com/" target="_blank">Forums </a><b>I</b> <a href="http://vtiger.com/" target="_blank">Website</a><br>
<br>
</div>