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">&lt;<a href="mailto:robert.willert@conceptpeople.de">robert.willert@conceptpeople.de</a>&gt;</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]=&gt;<br>
        [&quot;file&quot;]=&gt;      string(54) &quot;data\CRMEntity.php&quot;<br>
        [&quot;line&quot;]=&gt;      int(104)<br>
        [&quot;function&quot;]=&gt;  string(19) &quot;save_related_module&quot;<br>
        [&quot;class&quot;]=&gt;     string(9) &quot;CRMEntity&quot;<br>
    [1]=&gt;<br>
        [&quot;file&quot;]=&gt;      string(54) &quot;data\CRMEntity.php&quot;<br>
        [&quot;line&quot;]=&gt;      int(860)<br>
        [&quot;function&quot;]=&gt;  string(10) &quot;saveentity&quot;<br>
        [&quot;class&quot;]=&gt;     string(9) &quot;CRMEntity&quot;<br>
        [&quot;type&quot;]=&gt;      string(2) &quot;-&gt;&quot;<br>
        [&quot;args&quot;]=&gt;      [0]=&gt; &quot;CPEmployee&quot; [1]=&gt;&quot;&quot;<br>
    [2]=&gt;<br>
        [&quot;file&quot;]=&gt;      string(63) &quot;modules\CPEmployee\Save.php&quot;<br>
        [&quot;line&quot;]=&gt;      int(29)<br>
        [&quot;function&quot;]=&gt;  string(4) &quot;save&quot;<br>
        [&quot;class&quot;]=&gt;     string(9) &quot;CRMEntity&quot;<br>
        [&quot;type&quot;]=&gt;      string(2) &quot;-&gt;&quot;<br>
        [&quot;args&quot;]=&gt;      [0]=&gt; &quot;CPEmployee&quot;<br>
    [3]=&gt;<br>
        [&quot;file&quot;]=&gt;      string(45) &quot;index.php&quot;<br>
        [&quot;line&quot;]=&gt;      int(711)<br>
        [&quot;args&quot;]=&gt;      [0]=&gt;&quot;modules\CPEmployee\Save.php&quot;<br>
    <br>
    <br>
    CRMEntity.php line 94: $for_crmid  =
    vtlib_purify($_REQUEST[&#39;return_id&#39;]);<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-&gt;IsCustomModule &amp;&amp; method_exists($on_focus,
    &#39;save_related_module&#39;)) {<br>
    to<br>
    if($on_focus-&gt;IsCustomModule &amp;&amp; method_exists($on_focus,
    &#39;save_related_module&#39;) &amp;&amp; !empty($for_crmid)) {<br>
    <br>
    <br>
    Maybe it is the &quot;method_exists($on_focus, &#39;save_related_module&#39;)&quot; 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">&lt;<a href="mailto:robert.willert@conceptpeople.de" target="_blank">robert.willert@conceptpeople.de</a>&gt;</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>