Allen,
Yes, it is saving it to the database. But I'm not so sure it's doing so correctly. What's happening is that when it loads the dashlets in this code in modules/Home/index.php:
PHP Code:
$columns = $current_user->getPreference('columns', 'home');
$dashlets = $current_user->getPreference('dashlets', 'home');
// fill in with default dashlet selection
if(!isset($columns) || !isset($dashlets)) {
it's saying that neither the columns nor dashlets have ever been defined even though they have. So once it gets to that if block it resets the user's dashlets. My guess is that the module is being saved as camel case in the user's preference so if you changed the "home" to "Home" it would work. However, sometimes it will save correctly as "home". So to solve the issue we really need it to save in lowercase.
To do this open modules\UserPreferences\UserPreference.php and add the following code to to top of each function (inside the function):
PHP Code:
$category = strtolower($category);
This will ensure that the module name will save as lowercase ("home" instead of "Home"). Now
The solution is described fully in this post: http://www.sugarcrm.com/forums/showp...6&postcount=19
We still use this customization in our code. What is the cause to this and why does it happen only for some folks like ourselves I'm not so sure on. The only thing I can think of is that we're on a Windows server running MSSQL on the XAMPP stack. If there is any similarities here please let me know.
Best of luck!
Jason
Bookmarks