Results 1 to 3 of 3

Thread: Over the limit

  1. #1
    cff_moiseszaragoza is offline Sugar Community Member
    Join Date
    Jan 2011
    Posts
    109

    Default Over the limit

    I have one of my users say that they cant change there theme because they are over some limit.

    01/28/11 13:47:22 [2924][GUID][FATAL] USERPREFERENCE::isPreferenceSizeTooLarge - User preference for user: 'User_name' and category 'global' did not pass size check as it is 6637020 characters long which is too big to save.


    01/28/11 13:47:22 [2924][GUID][FATAL] USERPREFERENCE ERROR 00:: User preference for user: 'User_name' and category 'global' is 16 characters long which is too big to save
    Last edited by cff_moiseszaragoza; 2011-01-28 at 06:27 PM.

  2. #2
    cff_moiseszaragoza is offline Sugar Community Member
    Join Date
    Jan 2011
    Posts
    109

    Default Re: Over the limit

    This is the code that is creating the error for this user


    modules/UserPreferences/UserPreference.php
    PHP Code:

    function isPreferenceSizeTooLarge($category 'global',$returnCount=false){
            
    $user $this->_userFocus;
            
            
    //retrieve the user preferences for this category, then serialize and encode the way the string would be stored in db
            
    if(!isset($_SESSION[$user->user_name '_PREFERENCES'][$category])){
                
    $contents='';  
            }else{
                
    $contents base64_encode(serialize($_SESSION[$user->user_name '_PREFERENCES'][$category]));
            }

            
    //log error if string is too large
            
    if (strlen($contents)>65535){
                
    $GLOBALS['log']->fatal("USERPREFERENCE::isPreferenceSizeTooLarge - User preference  for user: '$user->user_name' and category '$category' did not pass size check as it is ".strlen($contents)." characters long which is too big to save.");
            }
                
            
    //check returnCount flag to see whether we return true/false or actual count of content size
            
    if($returnCount){
                return 
    strlen($contents);
            }elseif (
    strlen($contents)>65535){
                return 
    true;
            }
            return 
    false;

        } 

    What can i do to make the data be less than 65535 characters?

    I mean what data is it looking at?

  3. #3
    cff_moiseszaragoza is offline Sugar Community Member
    Join Date
    Jan 2011
    Posts
    109

    Default Re: Over the limit

    Solution

    reset user preferences

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Limit Resuts
    By rlfreeman in forum Developer Help
    Replies: 1
    Last Post: 2010-04-13, 06:35 AM
  2. PHP Memory Limit
    By thehubba in forum Deutsche
    Replies: 3
    Last Post: 2010-02-21, 10:12 PM
  3. Employee limit
    By rus in forum Help
    Replies: 2
    Last Post: 2009-07-22, 11:45 AM
  4. I somehow got a SOAP limit of 20
    By MateoLeFou in forum Developer Help
    Replies: 2
    Last Post: 2009-04-23, 02:07 PM
  5. Replies: 2
    Last Post: 2004-10-16, 06:12 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
  •