[Vtigercrm-developers] Quite Annoying.

Alan Lord (News) alanslists at gmail.com
Mon Nov 12 08:32:43 PST 2012


I was tracing a bug where a couple of vtlib custom modules were not 
working in ModTracker.

They had rows in modtracker_tabs and the visible flag was set.

Doing some debugging via the log file I noticed that when the event 
triggers the ModTrackerHandler.php code, the function

$moduleName = $data->getModuleName();

returned my custom modulename in all *lowercase*.

If I looked at a standard module it returned the modulename in the 
correct case, e.g. Contacts.

So, I wanted to take a look at this function "getNoduleName" to see if 
something was causing the problem in there... (My module, in this 
instance, was called JobSeekers - and searching the database I didn't 
find *any* lower case examples of this name)

grep -rn "function getModuleName" *

include/Webservices/VtigerCRMObject.php:30:	public function getModuleName(){
include/events/VTEntityData.inc:105:		function getModuleName(){
include/events/VTEntityType.inc:28:	        function getModuleName(){
include/events/VTWSEntityType.inc:56:	    function getModuleName(){
modules/ModTracker/core/ModTracker_Detail.php:30:	function getModuleName() {
modules/com_vtiger_workflow/VTEntityCache.inc:48:	function getModuleName(){
vtlib/Vtiger/PackageImport.php:232:	        function getModuleName() {
vtlib/Vtiger/FieldBasic.php:222:	        function getModuleName() {

HOW MANY TIMES???

Al

PS - I really just wanted to make a point.

PPS - I found out what the problem was. The class name in my vtlib 
Module.php was defined in lowercase:

class jobseekers extends CRMEntity {...

Am amazed nothing else broke really.


-- 
Libertus Solutions
http://www.libertus.co.uk



More information about the vtigercrm-developers mailing list