[Vtigercrm-developers] sql error message patch

Asha asha at vtiger.com
Mon Apr 2 12:35:45 PDT 2012


Hi Robert,

Sorry for replying to this after a really long time.

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.

On Mon, Feb 7, 2011 at 7:43 PM, Robert Willert <
robert.willert at conceptpeople.de> wrote:

> **
> Hi,
>
> this error comes up on saving a copy.
> But only on custom modules based on the vtlib example.
>
> small backtrace:
> [0]=>
>     ["file"]=>      string(54) "data\CRMEntity.php"
>     ["line"]=>      int(104)
>     ["function"]=>  string(19) "save_related_module"
>     ["class"]=>     string(9) "CRMEntity"
> [1]=>
>     ["file"]=>      string(54) "data\CRMEntity.php"
>     ["line"]=>      int(860)
>     ["function"]=>  string(10) "saveentity"
>     ["class"]=>     string(9) "CRMEntity"
>     ["type"]=>      string(2) "->"
>     ["args"]=>      [0]=> "CPEmployee" [1]=>""
> [2]=>
>     ["file"]=>      string(63) "modules\CPEmployee\Save.php"
>     ["line"]=>      int(29)
>     ["function"]=>  string(4) "save"
>     ["class"]=>     string(9) "CRMEntity"
>     ["type"]=>      string(2) "->"
>     ["args"]=>      [0]=> "CPEmployee"
> [3]=>
>     ["file"]=>      string(45) "index.php"
>     ["line"]=>      int(711)
>     ["args"]=>      [0]=>"modules\CPEmployee\Save.php"
>
>
> CRMEntity.php line 94: $for_crmid  = vtlib_purify($_REQUEST['return_id']);
> return_id is empty and the error occurs.
> But i dont know the return id because its a copy.
> Working with globals like $_REQUEST in methods is a bad idea.
>
> A better place to make the patch is maybe in line 100.
>
> if($on_focus->IsCustomModule && method_exists($on_focus,
> 'save_related_module')) {
> to
> if($on_focus->IsCustomModule && method_exists($on_focus,
> 'save_related_module') && !empty($for_crmid)) {
>
>
> Maybe it is the "method_exists($on_focus, 'save_related_module')" in line
> 100.
> My Class has no save_related_module but the CRMEntity has.
> With an empty method save_related_module all is fine.
> But its only a workaround.
>
>
> Am 04.02.2011 10:59, schrieb maltesh:
>
> Robert
>
> Can you please tell  for which operation the SQL error message comes up.
>
> On Wed, Jan 12, 2011 at 5:14 PM, Robert Willert <
> robert.willert at conceptpeople.de> wrote:
>
>> Now with correct subject.
>>
>> This patch will fix an SQL error message on save an CRMEntity copy.
>>
>> Best regards
>> Robert Willert
>>
>> --
>>
>> ConceptPeople consulting gmbh
>>
>> Robert Willert
>> System Administrator
>>
>> ConceptPeople consulting gmbh
>> Kurze Mühren 20
>> 20095 Hamburg
>>
>> Tel: 040 - 600 90 75-72
>> Fax: 040 - 600 90 75-71
>> www.conceptpeople.de
>>
>> Geschäftsführer:
>> Bjarne Jansen, Philipp Meißner, Andreas Rother
>> Steuer-Nr: 74/858/00985
>> UID-NR: DE219814648
>> Registergericht:
>> Hamburg, HRB 82938
>>
>>
>>
>>
>>
>> _______________________________________________
>> http://www.vtiger.com/
>>
>
>
>
> --
> Maltesh
> Vtiger Team
>
>
> _______________________________________________http://www.vtiger.com/
>
>
>
> _______________________________________________
> http://www.vtiger.com/
>



-- 
Regards,
Asha
vtiger Team

*Connect with us on: *Twitter <http://twitter.com/#%21/vtigercrm> *I*
Facebook <http://www.facebook.com/pages/vtiger/226866697333578?sk=wall> *I*
Blog <http://blog.vtiger.com/>* I*
Wiki<http://wiki.vtiger.com/index.php/Main_Page>
 *I *Forums  <http://forums.vtiger.com/>*I* Website <http://vtiger.com/>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.vtigercrm.com/pipermail/vtigercrm-developers/attachments/20120403/7b5b9f23/attachment-0002.html 


More information about the vtigercrm-developers mailing list