[horde] Default Addressbook issue

Jamie Allen jamie at jsdckr.nz
Thu Jan 25 02:20:15 UTC 2018


  Quoting Jan Schneider <jan at horde.org>:

> Zitat von Jamie Allen <jamie at jsdckr.nz>:
>
>> Quoting Patrick Boutilier <boutilpj at ednet.ns.ca>:
>>
>>> On 01/23/2018 01:29 PM, Jamie Allen wrote:
>>>>  Quoting Patrick Boutilier <boutilpj at ednet.ns.ca>:
>>>>
>>>>> On 01/23/2018 01:16 PM, Jamie Allen wrote:
>>>>>>  Quoting Patrick Boutilier <boutilpj at ednet.ns.ca>:
>>>>>>
>>>>>>> On 01/23/2018 01:17 AM, Jamie Allen wrote:
>>>>>>>>  Quoting Jamie Allen <jamie at jsdckr.nz>:
>>>>>>>>
>>>>>>>>> Quoting Jan Schneider <jan at horde.org>:
>>>>>>>>>
>>>>>>>>>> Zitat von Jamie Allen <jamie at jsdckr.nz>:
>>>>>>>>>>
>>>>>>>>>>> Quoting Jan Schneider <jan at horde.org>:
>>>>>>>>>>>
>>>>>>>>>>>> Zitat von Jamie Allen <jamie at jsdckr.nz>:
>>>>>>>>>>>>
>>>>>>>>>>>>> Greetings, IMP Gurus
>>>>>>>>>>>>>
>>>>>>>>>>>>> Would appreciate any suggestions you have on this. Horde  
>>>>>>>>>>>>> 5.2.22 - our set-up is that we have two shared  
>>>>>>>>>>>>> addressbooks, and then individual addressbooks where  
>>>>>>>>>>>>> email addresses are automatically added.
>>>>>>>>>>>>>
>>>>>>>>>>>>> The problem is that, although addressbook preferences  
>>>>>>>>>>>>> list my individual addressbook as the default, the mail  
>>>>>>>>>>>>> preference for automatic addressbook saving persistently  
>>>>>>>>>>>>> sets itself to the first of the shared addressbooks.
>>>>>>>>>>>>>
>>>>>>>>>>>>> I set the preference in Preferences - Mail - Address  
>>>>>>>>>>>>> Books -> to the individual addressbook. Log out and log  
>>>>>>>>>>>>> in to Horde, and check the setting - and it has reverted  
>>>>>>>>>>>>> to the first of the Shared Addressbooks.
>>>>>>>>>>>>>
>>>>>>>>>>>>> Very peculiar! Is there any way that I could hard-wire  
>>>>>>>>>>>>> this, please? It means that all of our users are ending  
>>>>>>>>>>>>> up with all my automatically added addresses in the  
>>>>>>>>>>>>> global shared addressbooks, which is causing some  
>>>>>>>>>>>>> confusion...
>>>>>>>>>>>>>
>>>>>>>>>>>>> Yours hopefully
>>>>>>>>>>>>>
>>>>>>>>>>>>> Jamie
>>>>>>>>>>>>
>>>>>>>>>>>> Did you change anything for that pref in config/prefs.local.php?
>>>>>>>>>>>> Is the correct address book actually saved in the database?
>>>>>>>>>>>
>>>>>>>>>>> Greetings
>>>>>>>>>>>
>>>>>>>>>>> Thanks so much for your response :) No - nothing specified  
>>>>>>>>>>> in prefs.local.php
>>>>>>>>>>> - Which field is this preference saved as in the database,  
>>>>>>>>>>> do you know?
>>>>>>>>>>> Thank you again, Jamie
>>>>>>>>>>
>>>>>>>>>> That would be default_dir.
>>>>>>>>>
>>>>>>>>> Thank you :) I have set that value by hand to the personal  
>>>>>>>>> addressbook, and here's the interesting thing :-
>>>>>>>>> 1. Autosave now persistently ends up in the right  
>>>>>>>>> destination (hooray!)
>>>>>>>>> 2. The displayed value in the preferences shows the other  
>>>>>>>>> addressbook where it has been saving it
>>>>>>>>>
>>>>>>>>> Curious....
>>>>>>>>> With thanks, Jamie
>>>>>>>>
>>>>>>>> Greeting again
>>>>>>>> Actually, having checked more thoughly, if I change the  
>>>>>>>> pref_value of pref_name 'default_dir' in horde_prefs to a  
>>>>>>>> different addressbook, it doesn't make any difference  
>>>>>>>> (nothing changes as a result). Am I changing the correct  
>>>>>>>> field in the right place?
>>>>>>>>
>>>>>>>> With thanks again
>>>>>>>
>>>>>>> Does the user you are testing with already have a value in the  
>>>>>>> preferences backend? Or is that what you changed when you said  
>>>>>>> "if I change the pref_value of pref_name 'default_dir' in  
>>>>>>> horde_prefs" ?
>>>>>>>
>>>>>>> Greetings
>>>>>>>
>>>>>>> I've tested it with two users, both of whom already have a  
>>>>>>> value set in horde_prefs; with the same outcome - picking them  
>>>>>>> out with : select * from horde_prefs where  
>>>>>>> pref_name='default_dir';
>>>>>>>
>>>>>>> Jamie :)
>>>>>
>>>>> Right. Pretty sure that prefs in the database will override what  
>>>>> you have in prefs.local.php . Try testing with a user that does  
>>>>> not have a default_dir pref in the database.
>>>>
>>>> Wait - I don't have anything set for this in prefs.local.php -  
>>>> can I specify default addressbook there per user (excuse my  
>>>> ignorance). We don't have any users without that field set... but  
>>>> I could create one, of course...
>>>>
>>>> Thank you again...
>>>
>>> prefs.local.php is where you should put your customizations. This  
>>> near the top of prefs.php explains it better than I can. :-)
>>>
>>> * IMPORTANT: DO NOT EDIT THIS FILE! DO NOT COPY prefs.php TO  
>>> prefs.local.php!
>>> * Local overrides ONLY MUST be placed in prefs.local.php or prefs.d/.
>>> * If the 'vhosts' setting has been enabled in Horde's  
>>> configuration, you can* use prefs-servername.php.
>>
>> Aha! So, looks like (not sure who) has added in some customisations  
>> via imp/config/prefs.d - namely the following :
>>
>> $_prefs['add_source']['hook'] = true;
>> $_prefs['search_sources']['hook'] = true;
>> $_prefs['search_fields']['hook'] = true;
>>
>> ...what would these customisations achieve? Interestingly, if I  
>> remove them, the problem goes away! (Which is delightful to see!  
>> I'm just not sure what knock-on effect this has had!)
>>
>> With thanks again
>> Jamie
>
> Those are set by the Horde Groupware bundle. It's running the hooks  
> code in imp/config/hooks.php. For default installations this is  
> defaulting the address book to the users first resp. default share.
>
> Aha! Thank you so much. So that accounts for the behaviour. Is that  
> all that it does? ....so completely safe to remove it?

  Thank you so much for troubleshooting this for me with such a  
successful outcome:)

  Jamie


More information about the horde mailing list