[Vtigercrm-developers] getDefaultUrl in Vtiger_Module_Model (Vtiger 6.0)

Stencel, Maciej m.stencel at opensaas.pl
Wed Feb 26 07:26:19 GMT 2014


Hi,

If You say so it must be truth, but when i insert this code into vtigers
main index file (for example purposes only). I get two diffrent default
urls, one ok the other one incorrect:

$model = Vtiger_Module_Model::getCleanInstance('RecycleBin');
echo $model->getDefaultUrl().'<br>'; // index.php?*module*
=&view=List&sourceModule=Accounts

$model = Vtiger_Module_Model::getInstance('RecycleBin');
echo $model->getDefaultUrl().'<br>';  // index.php?*module*=*RecycleBin*
&view=List&sourceModule=Accounts
exit;

I have checked it again in the newest vt ver 14032. In attachment is
index.php that i used for testing it, just switch them for moment.

*Z poważaniem / Best regards*

*Maciej Stencel*
*Tel: +48 884-997-123*

*m.stencel at opensaas.pl <m.stencel at opensaas.pl>www.OpenSaaS.pl
<http://www.opensaas.pl/>*


2014-02-25 12:14 GMT+01:00 Uma S <uma.s at vtiger.com>:

> Hi,
>
> Name paramater cant be empty, Because getComponentClassName api wich
> generates module class name, Based on ModuleName passed as default value
> for module as Vtiger.
>
>
> On Mon, Feb 24, 2014 at 9:36 PM, Stencel, Maciej <m.stencel at opensaas.pl>wrote:
>
>> Hi VT team!
>>
>> I have a question why when I create Vtiger_Module_Model object using
>> ::getCleanInstance('modulename');
>>
>> getDefaultUrl() will return corrupted default url link. Name parameter is
>> always empty and hence module parameter in url is empty too, making the url
>> corrupted.
>>
>> If I create the object using getInstance('modulename') everything works
>> as should.
>>
>> I think there is a bug in earlier function, or is there some kind of
>> wicked philosophy why name parameter there is always empty? ;)
>>
>> *Z poważaniem / Best regards*
>>
>> *Maciej Stencel*
>> *Tel: +48 884-997-123*
>>
>> *m.stencel at opensaas.pl <m.stencel at opensaas.pl>www.OpenSaaS.pl
>> <http://www.opensaas.pl/>*
>>
>> _______________________________________________
>> http://www.vtiger.com/
>>
>
>
>
> --
> With
> Best Regards
> Uma.S
> Vtiger Team
>
> _______________________________________________
> http://www.vtiger.com/
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.vtigercrm.com/pipermail/vtigercrm-developers/attachments/20140226/54e083c3/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: index.php
Type: application/x-httpd-php
Size: 1073 bytes
Desc: not available
URL: <http://lists.vtigercrm.com/pipermail/vtigercrm-developers/attachments/20140226/54e083c3/attachment.php>


More information about the vtigercrm-developers mailing list