[Vtigercrm-developers] BUG -> in vtiger 6.1 SVN 14176 (hardcoded callback in listview search and sort_by)

Holbok István holbok at gmail.com
Mon Aug 4 16:38:53 GMT 2014


Dear vtiger Team,

As per Rishab's suggestion of 07/22 I have created a custom UIType 
(special multiselect picklist) for my custom module.

I have created:
*.../layouts/vlayout/modules/CustomModule/uitypes/MyMultiSelectFieldSearchView.tpl* 
and
*.../layouts/vlayout/modules/CustomModule/uitypes/MyMultiPicklist.tpl* 
and did the necessary modification for my purposes.

I have also created the necessary service files:
*.../modules/***CustomModule*/uitypes/MyMultipicklist.php* and
*.../modules/****CustomModule**/models/Field.php* to serve the template 
with data.

The class *CustomModule**_Field_Model* extends *Vtiger_Field_Model* and 
class *CustomModule**_MyMultipicklist_UIType* extends *Vtiger_Base_UIType* .

With rewriting the display related methods in the above mentioned 2 
classes the custom UIType field started work in my custom module.
The listview, the detailvew and the editview also showed the necessary 
field data in the necessary display format.

The listview loaded the template from the file 
".../layouts/vlayout/modules/CustomModule/uitypes/MyMultiSelectFieldSearchView.tpl" 
and the detailview and editview loaded the template from the
".../layouts/vlayout/modules/CustomModule/uitypes/MyMultiPicklist.tpl".

*But clicking* to the header of the listview to get sort by some field 
or search by some field (does not matter what was the search field) I 
have received a template error:

Unable to load template file 
'*modules/Vtiger/uitypes/MyMultiSelectFieldSearchView.tpl*' in 
'*modules/****CustomModule**/ListViewContents.tpl*'

Copying file 
'.../layouts/vlayout/modules/CustomModule/uitypes/MyMultiSelectFieldSearchView.tpl' 
to the directory 
'.../modules/Vtiger/uitypes/MyMultiSelectFieldSearchView.tpl' the 
template error resolved.

It indicates the sort_by and search javascript functions on the listview 
screen use a hardcoded path to the templates and did not use the 
callback to the CustomModule directory.


-- 
üdvözlettel:

*Holbok István*

+3670-342-0900
*e-mail:* holbok at gmail.com
*SkyPe:* holboki

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.vtigercrm.com/pipermail/vtigercrm-developers/attachments/20140804/fa041063/attachment-0001.html>


More information about the vtigercrm-developers mailing list