Results 1 to 5 of 5

Thread: Restarted SQL, Lost All User Settings! Help!

  1. #1
    umayxa3 is offline Member
    Join Date
    Jan 2007
    Posts
    9

    Default Restarted SQL, Lost All User Settings! Help!

    I was doing routine maintenance and restarted the MS SQL server service "SQL Server (MSSQLSERVER)" and now all users are reporting their SugarCRM configurations are lost - Home Page dashlets, timezones, etc. This is the second time this happened, the last time was when we had a routine server reboot.

    How do I prevent this from happening?
    I need to be able to reboot the server or restart the database services, as needed.

    We are running:
    • Windows Server 2003 Enterprise Edition Service Pack 2
    • SQL Server 2008
    • IIS 6
    • PHP 5.2.6


    Thanks for any feedback.

    -Allen

  2. #2
    salesagility's Avatar
    salesagility is offline Sugar Community Member
    Join Date
    Aug 2006
    Location
    UK
    Posts
    2,379

    Default Re: Restarted SQL, Lost All User Settings! Help!

    I suggest you try Repair Database in Admin -> Repair.

    Hopefully that should resolve the issue.

  3. #3
    eggsurplus's Avatar
    eggsurplus is offline Sugar Community Member
    Join Date
    Dec 2005
    Location
    Minnesota
    Posts
    2,343

    Default Re: Restarted SQL, Lost All User Settings! Help!

    Allen,

    We had the same issue. Here's a thread with what we did to solve it: http://www.sugarcrm.com/forums/showthread.php?t=26146

    Along with the wiki article: http://www.sugarcrm.com/wiki/index.p...lets_Disappear

  4. #4
    umayxa3 is offline Member
    Join Date
    Jan 2007
    Posts
    9

    Default Re: Restarted SQL, Lost All User Settings! Help!

    Well, I applied the change and thought I had a victory.. but it wasn't

    Last week I made the change to the config.php file, as prescribed in the SugarWIKI page above, and tested with a power-user that helps me with testing (she was one of the individuals that experienced the loss of custom dashlets).
    I had her make some changes and save.. then I restarted SQL Server services (MSSQLSERVER). She signed out and then back in.. no problems.

    I was doing work yesterday on another project and I needed to restart the SQL Server service (MSSQLSERVER). About an hour later I got a phone call from a company Director saying she lost her Home Page custom dashlet configurations.

    The Director wants to know why this happened.. I'm now in the hot-seat.

    The SugarWIKI article talks about the variable 'disable_persistent_connections' but shouldn't these custom Home Page dashlet configurations be saved in the database?

    Anyone have more insight why user's customized dashlets are reverting to the default after a SQL Server service restart?

    Thanks for any help.

    -Allen

  5. #5
    eggsurplus's Avatar
    eggsurplus is offline Sugar Community Member
    Join Date
    Dec 2005
    Location
    Minnesota
    Posts
    2,343

    Default Re: Restarted SQL, Lost All User Settings! Help!

    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

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. relationship lost in new User
    By j.lagos in forum General Discussion
    Replies: 0
    Last Post: 2008-09-19, 03:35 PM
  2. Problems getting MBSTRING to work??? (yes I restarted)
    By investorloft in forum Installation and Upgrade Help
    Replies: 3
    Last Post: 2008-06-04, 06:45 PM
  3. Replies: 3
    Last Post: 2006-12-01, 11:13 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •