Jump to content


Member Since 31 Jan 2013
Offline Last Active Mar 26 2019 11:20 PM

#14560 Export/Import from Test Site?

Posted by windsor on 31 July 2014 - 05:24 PM

can you give more detail on the errors and your environment?

what version(s) of Zurmo? were both Zurmi the same version?

#13509 Installation problems - please don't refer to developer sessions

Posted by windsor on 07 April 2014 - 01:56 PM

@wmike1503 or it could suggest PBKAC don't you think?

#13389 eXTRA tabs in Contacts details

Posted by windsor on 24 March 2014 - 08:46 PM

+1 good idea

#13377 Which is better pass object or id as parameter to PHP function?

Posted by windsor on 22 March 2014 - 04:06 PM


What are the pro's and con's of passing a object vs the object->id into a function ? 


For example this: 

public static function doSomething($myObjectId)
   $myObject = MyObject::getById($myObjectId);
   return $myObject->myAttribute;

vs this:

public static function doSomethingElse($myObject)
   return $myObject->myAttribute;

At first I thought maybe pass id was more efficient, but since PHP passes all parameters by reference, it's only passing a pointer - is that even a correct statement?,

therefore if you want to use the object you need to call Object::getById() - which must incur some performance penalty - right?


Does it make a difference if the function is declared static?


Does it matter if the function returns a value or calls  a function?


Does it make a difference whether the object has nested relations?


Under what conditions is it preferable to pass the $id rather than the $object itself?

( I can think of maybe one, when the $id by itself is going to be passed to an api).


Anyhow, any PHP experts out there please weigh-in with your knowledge and opinions!



#13147 Change portlet size

Posted by windsor on 27 February 2014 - 01:05 PM




1.   Go to $INSTANCE_ROOT/protected/modules/tasks/views/related


2. Edit the file TasksMyListView.php


3. Add this function to the bottom (change the number '10', to the number of rows you want to display on the page)


         * Windsor's CUSTOM CODE
         * Overides ...ListView::..
         * @param type $searchAttributeData
         * @return RedBeanModelDataProvider 
        protected function makeDataProviderBySearchAttributeData($searchAttributeData)

            $dataProvider = parent::makeDataProviderBySearchAttributeData($searchAttributeData);
            $dataProvider->setPagination(array('pageSize' => 10));
            return $dataProvider;


4. Repeat the same procedure for any other modules like leads, etc...



HTH - W,

#13021 Email requirements for community edition extension

Posted by windsor on 17 February 2014 - 04:49 PM

It should not cost much. By "Finance guy"  I meant we need someone to keep track of the contributions and collect and distribute the bounty..

#13016 Email requirements for community edition extension

Posted by windsor on 17 February 2014 - 04:03 PM



Is there any interest from the developer community in working together to create a dead-simple email extension for the community edition?


1. What are the requirements?

2. Who wants to help and how ? ( coding, documentation, etc)

3. Is anyone willing to finance/contribute a bounty, if so how much?


If you are a seasoned PHP developer and want to get some experience developing custom mods (with guidance) here is a chance to help out and contribute while gaining some training and  expert skills on the platform.


you can also help if you have other skills, e.g.:

  • end-user
  • design
  • analysis
  • documentation
  • testing
  • mercurial/bitbucket admin
  • training
  • system administration
  • project administration
  • general support
  • email expertise (Postscript, Thunderbird, Gmail, etc)


Just indicate your skill and interest in this thread.


Proposal: (Scope)


I.  Outbound email enhancement from within Zurmo to external recipient

    A. replace "System User" with actual email address of the sender

    B. ability to optionally save sent emails to:

         1. User

         2. Contact

         3. Account

         4. Opportunity

    C. ability to display sent emails in:

         1. User inbox

         2. Latest Activities portal

             a. Contact

             b. Account

             c. Opportunity

    C. ability to forward and reply to saved emails


II. Inbound email

    A. ability for external sender to directly email zurmo user

    B. ability to save email from external sender to zurmo user inbox

    C. ability to attach received emails from external sender to


    D. ability to display received emails from external sender for


III. Thunderbird email client

    A. facility to tag and resend emails in Thunderbird client and send to Zurmo for saving against any of:


If there is enough interest and this approach works-out,  maybe we can get some traction on some other badly needed enhancements for the community edition....


Please share your thoughts....



#11609 Upgrading Zurmo From WebHost

Posted by windsor on 19 October 2013 - 05:24 PM

You need terminal (ssh) access to run the console commands that are located in zurmo/app/protected/commands. A lot of shared hosting providers disable ssh terminal access by default.


Some developer friendly shared hosting providers like  Arvixe , is one I know of, will grant you  shell access on request, all you need to is contact tech support and let them know you need it.


Even if you do get shell access , the  Softaculous autoinstall scripts, might not have been set up to  grant execute permission to the zurmoc shell script which is also located in the commands directory.


If you are the owner on one of these shared hosting accounts you may just need to make the command line bootstrap file executable.

#change to your web-root e.g. www, htdocs, etc.
cd /www

#change to Zurmo commands directory
cd zurmo/app/protected/commands

#make zurmoc file writeable by owner
chmod 744 zurmoc


Note: Even though the upgrade script is located in .../zurmo/app/protected/runtime/upgrades  you should be running the script from .../zurmo/app/protected/commands using zurmoc.




#7887 [Resolved] FailedAssertionException: self::isRelation($relationName, get...

Posted by windsor on 08 August 2013 - 11:00 PM

This error can occur if you have a MANY-MANY relationship and did not use plural name in one or both of  ...RelatedListView::getRelationAttributeName()


Stack trace starts with something like this:



#7885 Fatal error: Class 'SecurableModule' not found

Posted by windsor on 08 August 2013 - 10:08 PM

Sometimes Memcached fails when using the Designer. It's a known issue and it's on the list of bug fixes.

So this can cause some strange results, if the cache is out of sync.


If you want to be absolutely sure to work in a uncorrupted  instance you can try this procedure:


1. logout of zurmo application

2. go into your database and delete all the records in the portlet and audit_event tables

3, shut down your datbase

4. shut down your webserver

5. clear the assets foldler, just go in and delete everything under app/assets

6. clear the runtime cache in app/protected/runtime/HTML

7. clear the minify cache in app/protected/runtime, just delete the folder

8. optional - you can shut down your browser, IDE, and restart your workstation at this point

9. stop and restart your memcached deamon (unix) or service (windows)

10. start your database

11. start a browser, then clear the browser history

12. start your webserver

13. run the unit tests on the account module (which will exercise the designer functionality)

14. login to zurmo through the browser and verify, or use selenium to run functional testing.


If you have made any changes to your models,after step 12 you will want to either run the updateSchema command, or set the install flag to false in the app/protected/config/perInstance.php (which will rebuild your database)




P.S. - I would also stay away from demoing email attachments, and prb email in general if you are new to zurmo, there is a known issue with large email attachments getting cached, which can cause similar type of error

#7862 SQL query to retrieve contact info and custom field data

Posted by windsor on 07 August 2013 - 01:47 PM

Think the Title, like "Mr." , "Mrs." , etc is in customfielddata table in the serializeddata column. It's kind of a modified json format. which you will need to parse.

dont see that you are joining to that table your query.


Does it have to be sql? Zurmo has a serialize() function in RedBeanModel  you might try to create the contact object, then serialize, then parse the json string.

Of course this doesn't help much if you need sql for other reasons, but since the custom fields are serialized data and you need to parse anyway...


Yet another option using the built in reporting feature of zurmo, you can create a report and have it generate the sql that you need.

#7847 Can not set decimal default value in model rules

Posted by windsor on 07 August 2013 - 03:12 AM

Hi, Don't know if this is known behavior but  was not able to set a default floating point value other than 0.0 in a model that was derived from an observer.  Not sure if I am using bad syntax or if  this affects all models...


This code works:


$metadata[__CLASS__] = array(
'rules' => array(
                    array('value',          'type',    'type' => 'float'),
                    array('value',          'default',   'value' => 0.0), 

This code also works:

$metadata[__CLASS__] = array(
'rules' => array(
                    array('value',          'type',    'type' => 'float'),
                    array('value',          'default',   'value' => 0), 

This code also works:


$metadata[__CLASS__] = array(
'rules' => array(
                    array('value',          'type',    'type' => 'float'),
                    array('value',          'default',   'value' => 1), 


This code  always  throws an exception while testing:


$metadata[__CLASS__] = array(
'rules' => array(
                    array('value',          'type',    'type' => 'float'),
                    array('value',          'default',   'value' => 1.0), 

Here is a stack trace:( Line no's approximate, since I had to use echo statements to debug)


There was 1 error:

1) MyObserverDerivedsSuperUserWalkthroughTest::testSuperUserAllDefaultControllerActions
FailedAssertionException: empty($this->model->{$this->attribute}) || is_string($this->model->{$this->attribute}) ||


Tests: 1, Assertions: 1, Errors: 1.

In DetailsView::renderFormLayout($form=null)


It looks like when a decimal number, formatted as a float in the model, is passed to :


$metadataWithRenderedElements = $this->resolveMetadataWithRenderedElements($metadata, $maxCellsPerRow, $form);


 It incorrectly resolves the DecimalElement to a TextElement if there is any mantissa (fractional remainder).


Zurmo 2.02 on Win7 xampp

#7517 new function Module::getModuleRoute($language)

Posted by windsor on 25 July 2013 - 01:09 AM

Currently, there seems to be a convention/assumption that the Module::getPluralModuleLabel($language) function will always return the name of the module. 


This is not the case if you create a custom module.  Especially if you want to want to keep it type-safe in zurmo, you can add a prefix to the module name.


for example: if you want to add a custom module that processes invoices, you don't necessarily want to name the module directory 'invoices', instead you can name it 'customInvoices' or 'abcInvoices' or  prepend some other prefix so that you can avoid a future name collision if the zurmo dev team decides later on down the road to enhace zurmo with invoice functionality.





module directory name = '.../app/protected/modules/abcInvoices'


module  =  '.../app/protected/modules/AbcInvoicesModule.php'


module name = 'AbcInvoicesModule'


singular module label = 'Invoice'


plural module label = 'Invoices'


default url route = '.../zurmo/index.php/abcInvoices/default'



So currently in each module, you can find code that looks like this:


protected static function getSingularModuleLabel($language)
            return Zurmo::t('AbcInvoicesModule', 'Invoice', array(), null, $language);

protected static function getPluralModuleLabel($language)
            return Zurmo::t('AbcInvoicesModule', 'Invoices', array(), null, $language);

So this is currently existing functionality and it will allow you to specify a "label" for the module, which will show up in the views.  Which is Great!


However; - One should *not*  attempt  to construct a url route ( i.e. module/controller/action) from the getPluralModuleLabel() , b/c if you are using a prefix on your custom module name and/or you have camel case in the module directory name, then the route will be invalid.


So... It would be helpful to have a method in the core that always returns a "safe" and correct string that represents the actual  route of the module. Then everyone would not have to do something like this:.. ZurmoWalkthroughBaseTest::checkCopyActionResponseAttributeValues(..), which also won't work for a camel cased module directory name.


in the above example it should just return 'abcInvoices', which should correspond with the directory name of the module under app/protected/

#7206 Blank startup

Posted by windsor on 14 July 2013 - 04:12 PM



If everything is setup according to the install instructions on the wiki, you just need to run ...cnrgp.com/zurmo/app


(you can leave off test.php from the url)

#7123 Suggestion - Dev Session on Mercurial and contribution process

Posted by windsor on 10 July 2013 - 01:57 PM



Not having a lot of experience with Mercurial and esp the zurmo team development process, think it would be helpful to have a dedicated session for beginners on how to use the source code control tools and processes. kind of a best practice guide. At one point there seemed to be some wiki articles, but have not been able to locate anything for beginners to get up to speed quickly on the code contribution process.


for example have made a lot of changes that would be good for the core, but don't really have time to research on my own and re-learn a new scc system and new conventions. Thus, a lot of my good stuff is not getting into the releases.  It would be great if we could have one of the zurmo devs lead us through how to best setup the dev environments, how to fork the code, basics of making updates and how to, merge  commit and then request a pull.  I think many more potential contributors would be interested in this kind of a training if it were made available.  


I know this is kind of basic for a lot of the seasoned devs who work with open source projcects on a regular basis, but for us old grey-hairs who came up in a different era it would definitely be helpful to get some pointers from the young turks.


Would like to hear from some of the rest of the community if this sounds like a good idea and if there is interest set up dedicated dev session or two to help get everyone up to speed on the contribution process.