Jump to content


Photo

Using custom module as a field/type in an other custom module


  • Please log in to reply
6 replies to this topic

#1 sanbrar

sanbrar

    Advanced Member

  • Members
  • PipPipPip
  • 72 posts

Posted 17 February 2012 - 03:35 PM

Two custom modules I have are "efffactors" and "sizing". Independently they worked fine but when I added "efffactor_field" of type "efffactors" I get an error when trying to create "sizing".

I am sure what I am missing?

Unknown class passed as parameter

E:\server\SMW\htdocs\z120205\app\protected\modules\zurmo\utils\security\FormLayoutSecurityUtil.php(47)

Attached error file. Thanks

Attached Files



#2 Jason

Jason

    Administrator

  • Administrators
  • 829 posts
  • LocationChicago

Posted 17 February 2012 - 03:45 PM

Did you make an element called HouseefficiencyfactorElement ? Seems that is what you are missing.

Jason Green
Zurmo Team
Need support? Upgrade now


#3 sanbrar

sanbrar

    Advanced Member

  • Members
  • PipPipPip
  • 72 posts

Posted 17 February 2012 - 03:59 PM

Typo error in the HouseefficiencyfactorElement Thanks Jason


Now it works like a charm

#4 Jason

Jason

    Administrator

  • Administrators
  • 829 posts
  • LocationChicago

Posted 17 February 2012 - 04:18 PM

Great

Jason Green
Zurmo Team
Need support? Upgrade now


#5 sanbrar

sanbrar

    Advanced Member

  • Members
  • PipPipPip
  • 72 posts

Posted 18 February 2012 - 12:33 AM

I was trying to mimic Account details view, where contacts show up in tab view (via portlet). but I keep getting "Undefined index: columns"

sizing_calcs (Account equiv not exact)
ductsizes (Contact equiv not exact)

Is it because I don't have Mass Update in the sizing_calcs default controller?

PHP Error
Undefined index: columns
.....\app\protected\extensions\zurmoinc\framework\portlets\Portlet.php(102)
090					'order by id;';
091			 foreach (R::getAll($sql) as $row)
092			 {
093				 $portlet = Portlet::getById(intval($row['id']));
094				 $portletCollection[$row['id']] = $portlet;
095			 }
096			 return $portletCollection;
097		 }
098
099		 public static function makePortletsUsingMetadataSortedByColumnIdAndPosition($layoutId, $metadata, $user, $params)
100		 {
101			 $portletCollection = array();
102			 foreach ($metadata['global']['columns'] as $column => $columns)
103			 {
104				 foreach ($columns['rows'] as $position => $portletMetadata)
105				 {
106					 $portlet = new Portlet();
107					 $portlet->params	= $params;
108					 $portlet->column	= $column + 1;
109					 $portlet->position  = $position + 1;
110					 $portlet->layoutId  = $layoutId;
111					 $portlet->collapsed = false;
112					 $portlet->viewType  = $portletMetadata['type'];
113					 $portlet->user	  = $user;
114					 $portletCollection[$column + 1][$position + 1] = $portlet;
Stack Trace
.....


#6 Jason

Jason

    Administrator

  • Administrators
  • 829 posts
  • LocationChicago

Posted 18 February 2012 - 12:47 AM

You probably have your metadata malformed. Which module are you trying to do this on?

Jason Green
Zurmo Team
Need support? Upgrade now


#7 sanbrar

sanbrar

    Advanced Member

  • Members
  • PipPipPip
  • 72 posts

Posted 18 February 2012 - 01:40 AM

Solved the issue - Thanks Jason

As of 0.6.0 <<module>>DetailsAndRelationsView need all three view's defined

'leftTopView' => array( ...
'leftBottomView' => array( ....
'rightTopView' => ...

See "AccountDetailsAndRelationsView" for example.




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users