From: <tr...@eg...> - 2011-03-31 14:45:50
|
Ticket modified by Birgit Becker at 2011/03/31 08:42 Tracking System: Bugs Category: Addressbook Version: Trunk Status: Open Resolution: None Completed: 10% Priority: 5 - medium Created By: Bjorn Padding Created on: 2011/01/22 04:03 Assigned to: Nathan Gray Summary: #2810 - javascript error for in addressbook editor when LDAP enabled When in the Addressbook, with LDAP enabled, the Country (normally selectbox) changes into the plaintext "select one" and a Javascript error occurs. Firebug: selectbox is null [Break On This Error] custom_field_name = selectbox.name.replace("countrycode", "countryname"); index....ui.edit (line 173) menuaction "addressbook.addressbook_ui.edit": 165 } 166 selbox.value = ""; 167 } 168 169 } 170 171 function show_custom_country(selectbox) 172 { 173 custom_field_name = selectbox.name.replace("countrycode", "countryname"); 174 custom_field = document.getElementById(custom_field_name); 175 if(custom_field && selectbox.value == "-custom-") { 176 custom_field.style.display = "inline"; 177 } 178 else if (custom_field) 179 { 180 if(selectbox.value == "" || selectbox.value == null) 181 { Can be reproducted on latest trunk. Comment by Birgit Becker at 2011/03/31 08:42: Hi Laurent, where do you store your contacts in LDAP or SQL (accounts are in LDAP i already get) As we are using Accounts in LDAP but contacts in SQL and we did NOT get the error Birgit Comment by Laurent Rougé at 2011/03/28 10:47: The results of my research shown that it come from the fact that "adr_one_countrycode" and "adr_two_countrycode" are "unsupported" (cf. "unsupported field" in "get_fields" function of class.addressbook_so.inc.php) when LDAP is used. In "addressbook.edit.general" template, the "select-country" (selectbox) or "countrySelect" use "countrycode". But, because it was "unsupported", they don't generate the box and only show "Select one". And, because of this error, there is no "*countrycode" Element ID in HTML code which generate the javascript error. In HTML code, we can see the proper country in the next field ("custom_country") because it use "*countryname". So as a conclusion, this bug it's because of confusion in the code between "*countrycode" and "*countryname". There are many solution to solve this bug... so the EGW team is best placed to solve the problem. My configuration is with an LDAP server with "mozillaabpersonalpha" and "evolutionperson" schema. Comment by Laurent Rougé at 2011/03/27 10:03: Dear all, I confirm the bug since new update from trunk. The "country" selection disappear and i have the same javascript error. Regards, Laurent. Comment by Birgit Becker at 2011/01/31 06:52: Hi Bjorn, understand that for sure, any further comment is welcome. If we find something - we'll fix it Birgit Comment by Bjorn Padding at 2011/01/28 16:34: Hi Birgit, I haven't figured this one out yet, so I would need to take a closer look. I am sorry, but buying support hours for this is not appropriate for me now. I am test~using this for my own small environment and going to try to get people interested (together with Perp). If that works, then we can all gain something out of this. At this stage, it is not my interest (in all honesty). Thanks for the offer. Besides that, I believe you now have somebody "working" for free on your Q&A (and possibly bug fixing). So, as I said, I will look deeper into the issue (when/if I've got the time for it) and update this bug report if I find anything. Any help or pointers would be appreciated. Meantime I seem to have fixed or worked-around the issues I had. Comment by Birgit Becker at 2011/01/24 07:07: Hi Bjorn, i have tested that issue in our environment and it works. There is an option custom, which will be used for empty country-codes and for not matching ones. As you already opened many related tickets (all with Account store LDAP and Contact-store SQL) i suggest that maybe there is something wrong with your LDAP-schema??? As we can NOT reproduce the errors we can NOT fix anything. The only thing i can offer to you is buy some support in our shop. We will look together we you on your machine to find out whats going there wrong. I recommend to buy at least 2 hours support (better would be 4 hours). Whats not used for theses issues can be used for other support issues. Regards Birgit Comment by Bjorn Padding at 2011/01/24 03:49: Hi again, Nathan (small world ;o])... If I change class.addressbook_ldap.inc.php; mozillapersonalpha -> adr_one_countryname to adr_one_countrycode, I do get the selectbox again, but still get the javascript error stated in the description here and it won't store the value either when saved. The issue seems to be somewhere in class.addressbook_ui.inc.php. Obviously I am not doing something right, but I suppose that should help you track the issue. Comment by Klaus Leithoff at 2011/01/24 01:41: Nathan did the countrycode thing. @ng-> could you check? Comment by Bjorn Padding at 2011/01/22 04:05: Selectbox is not visible and a country cannot be select. In place there only is a simple text that states "select one", instead. linked entries: http://www.egroupware.org/egroupware/index.php?menuaction=tracker.tracker_ui.edit&tr_id=2810&no_popup=1 |