[dev] update prefs from within a hook?

Chuck Hagenbuch chuck at horde.org
Fri Jul 13 03:18:06 UTC 2007


Quoting Michael Rubinsky <mike at theupstairsroom.com>:

> I came across a problem when trying to update user prefs from within  
>  the _horde_hook_share_init() hook while logging in. It seems that  
> the  problem is when  $prefs->setValue() is called, and in turn  
> calls the  Horde::callHook() function, it prevents the horde side  
> bar from  loading, it just hangs and eventually times out.  If that  
> frame is  reloaded, every thing is fine.  The logs show the message  
> about the  _prefs_change_hook__addressbooks not being called (there  
> is no such  hook in this case) and that the prefs are stored (and  
> indeed they  are). Commenting out the Horde::callHook() call  
> prevents the problem  from occuring.  Any thoughts on why this might  
> be happening?  I can't  seem to find any...

I don't see anything obvious in Horde::callHook that would make it die  
if it was called while another call was still in process. The best  
thing to do as far as I can tell would be to a). see if you can  
reproduce it from a command-line script; b). hook up a debugger to it  
and step through until you hit the problem.

-chuck


More information about the dev mailing list