Results 1 to 8 of 8

Thread: 4.2 upgrade causes all history items to display for all bugs & all projects

  1. #1
    teresa is offline Junior Member
    Join Date
    Apr 2006
    Posts
    3

    Angry 4.2 upgrade causes all history items to display for all bugs & all projects

    Last Thursday we upgraded our Sugar Open Source from SugarSuite 4.0.1c to SugarSuite 4.2.0 using the upgrade wizard in the Admin part of sugar. No errors were reported. Now, pulling up any bug or any project shows items "(1 - 10 of 6049)" in the history for that bug or project. So it appears that all history items are appended to all the bugs and all the projects.

    Below are the details from our system
    OS: Red Hat Enterprise Linux ES release 3 (Taroon Update 7)
    Database: MySQL 4.1.14-0.rhel3
    Web Server: apache 2.0.54
    PHP: PHP 4.4.0
    sugar config dump: attached.

    Anyone have any insight??
    - Teresa
    Attached Files Attached Files

  2. #2
    jowizzle is offline Junior Member
    Join Date
    Jan 2006
    Posts
    2

    Default Re: 4.2 upgrade causes all history items to display for all bugs & all projects

    Perhaps your is slightly different, but I'm experiencing the display of all email item in each project. It seems there is an missing or incorrent Relationships entry. Essentially, a large UNION query is generated to retrieve the data for the History display. One component of the UNION is a query against the emails table. Rather than joining back against projects_emails we get /SELECT ... FROM emails/ with no criteria.

    I tried briefly to fix it, but now I've broken it sufficiently to generate syntactically incorrect SQL. I'll probably revert to my backups and work a little more diligently going forward. I'll post back with any results. Please do the same...

  3. #3
    sugarchris's Avatar
    sugarchris is offline Sugar Community Member
    Join Date
    Sep 2005
    Location
    San Francisco, CA
    Posts
    861

    Default Re: 4.2 upgrade causes all history items to display for all bugs & all projects

    Hi Theresa,

    We tested upgrades in a very similar use-case to yours (especially since we use Sugar as our bug-tracker internally).

    Could you try rebuilding relationships in the admin panel?

    Also, since we don't have the upgrade log and can't tell what exactly happened, try the "Rebuild Tables" section and "Show SQL" - does anything crazy come up like "CREATE TABLE...." ? This would imply that something was missed or messed up on upgrade.

  4. #4
    Adeo is offline Junior Member
    Join Date
    Dec 2005
    Posts
    4

    Exclamation Re: 4.2 upgrade causes all history items to display for all bugs & all projects

    I also work with Teresa. aressidi is incorrect. We did REBUILD RELATIONSHIPS, and the process seemed to freeze. I have copied the output below. The view shource shows it ending on a "<br>," so I presume it is getting stuck. It may be becuase we have 6+K history items? Please help us...

    Processing relationship meta for relationships...done
    Processing relationship meta for acl_roles...done
    Processing relationship meta for acl_actions...done
    Processing relationship meta for leads...done
    Processing relationship meta for contacts...done
    Processing relationship meta for accounts...done
    Processing relationship meta for opportunities...done
    Processing relationship meta for cases...done
    Processing relationship meta for notes...done
    Processing relationship meta for email_templates...done
    Processing relationship meta for emailman...done
    Processing relationship meta for calls...done
    Processing relationship meta for emails...done
    Processing relationship meta for meetings...done
    Processing relationship meta for iframes...done
    Processing relationship meta for tasks...done
    Processing relationship meta for users...done
    Processing relationship meta for users...done
    Processing relationship meta for currencies...done
    Processing relationship meta for tracker...done
    Processing relationship meta for import_maps...done
    Processing relationship meta for files...done
    Processing relationship meta for users_last_import...done
    Processing relationship meta for config...done
    Processing relationship meta for upgrade_history...done
    Processing relationship meta for vcals...done
    Processing relationship meta for bugs...done
    Processing relationship meta for versions...done
    Processing relationship meta for releases...done
    Processing relationship meta for feeds...done
    Processing relationship meta for project...done
    Processing relationship meta for project_task...done
    Processing relationship meta for roles...done
    Processing relationship meta for email_marketing...done
    Processing relationship meta for campaigns...done
    Processing relationship meta for prospect_lists...done
    Processing relationship meta for prospects...done
    Processing relationship meta for documents...done
    Processing relationship meta for document_revisions...done
    Processing relationship meta for fields_meta_data...done
    Processing relationship meta for schedulers...done
    Processing relationship meta for schedulers_times...done
    Processing relationship meta for inbound_email...done
    Processing relationship meta for users...done
    Processing relationship meta for campaign_log...done
    Processing relationship meta for dashboards...done
    Processing relationship meta for campaign_trkrs...done
    Processing custom relationship meta for relationships...done
    Processing custom relationship meta for acl_roles...done
    Processing custom relationship meta for acl_actions...done
    Processing custom relationship meta for leads...done
    Processing custom relationship meta for contacts...done
    Processing custom relationship meta for accounts...done
    Processing custom relationship meta for opportunities...done
    Processing custom relationship meta for cases...done
    Processing custom relationship meta for notes...done
    Processing custom relationship meta for email_templates...done
    Processing custom relationship meta for emailman...done
    Processing custom relationship meta for calls...done
    Processing custom relationship meta for emails...done
    Processing custom relationship meta for meetings...done
    Processing custom relationship meta for iframes...done
    Processing custom relationship meta for tasks...done
    Processing custom relationship meta for users...done
    Processing custom relationship meta for users...done
    Processing custom relationship meta for currencies...done
    Processing custom relationship meta for tracker...done
    Processing custom relationship meta for import_maps...done
    Processing custom relationship meta for files...done
    Processing custom relationship meta for users_last_import...done
    Processing custom relationship meta for config...done
    Processing custom relationship meta for upgrade_history...done
    Processing custom relationship meta for vcals...done
    Processing custom relationship meta for bugs...done
    Processing custom relationship meta for versions...done
    Processing custom relationship meta for releases...done
    Processing custom relationship meta for feeds...done
    Processing custom relationship meta for project...done
    Processing custom relationship meta for project_task...done
    Processing custom relationship meta for roles...done
    Processing custom relationship meta for email_marketing...done
    Processing custom relationship meta for campaigns...done
    Processing custom relationship meta for prospect_lists...done
    Processing custom relationship meta for prospects...done
    Processing custom relationship meta for documents...done
    Processing custom relationship meta for document_revisions...done
    Processing custom relationship meta for fields_meta_data...done
    Processing custom relationship meta for schedulers...done
    Processing custom relationship meta for schedulers_times...done
    Processing custom relationship meta for inbound_email...done
    Processing custom relationship meta for users...done
    Processing custom relationship meta for campaign_log...done
    Processing custom relationship meta for dashboards...done
    Processing custom relationship meta for campaign_trkrs...done
    Last edited by Adeo; 2006-05-04 at 01:38 PM.

  5. #5
    Adeo is offline Junior Member
    Join Date
    Dec 2005
    Posts
    4

    Angry Re: 4.2 upgrade causes all history items to display for all bugs & all projects

    Hello? Can anyone help us to get this resolved? I just do not want this thread to die, as the problem still exists....

  6. #6
    sugarchris's Avatar
    sugarchris is offline Sugar Community Member
    Join Date
    Sep 2005
    Location
    San Francisco, CA
    Posts
    861

    Default Re: 4.2 upgrade causes all history items to display for all bugs & all projects

    From the output, it actually looks like the rebuild completed successfully.

    However, when you say it ended on a "<BR>" - does that mean the last tag on the page was the break and not something like "</HTML>"? That would imply the rebuild died.

    However, it got through the Sugar-standard relationships, and was in the process of going through custom relationships - have you done any/heavy customizations to your Sugar instance?

  7. #7
    kgomez is offline Member
    Join Date
    Sep 2005
    Posts
    6

    Default Re: 4.2 upgrade causes all history items to display for all bugs & all projects

    I had the same problem. I have two environments and with the first environment after I upgraded the rebuild would not complete and there was a message. I looked up the message on this forum and someone had the same problem and suggested changing the RebuildRelationships.php file in the Administration folder. I don't quite remember the changes, but it worked. When I upgraded the 2nd environment I noticed the histories in the bugs module and that the rebuild stopped where yours did. I changed the same file to match the other one and it worked to fix the problem. Here is a copy of the my whole rebuildrelationships.php file. Hope this helps. The changes are in the foreach parts.

    Kelly Gomez


    <?
    include('include/modules.php');
    require_once('data/SugarBean.php');

    global $beanFiles;
    global $db;

    $log =& $GLOBALS['log'];

    $query="DELETE from relationships";
    $db->query($query);




    foreach( $beanFiles as $bean => $file ){
    if(strlen($file) > 0 && file_exists($file)) {
    if (!class_exists($bean)) {
    require($file);
    }
    $focus = new $bean();
    $table_name = $focus->table_name;
    $empty='';
    echo "Processing relationship meta for ". $focus->table_name."...";
    SugarBean::createRelationshipMeta($focus->getObjectName(),$db,$table_name,$empty,$focus->module_dir);
    echo 'done<br>';
    }
    }

    //foreach( $beanFiles as $bean => $file ){
    // if (!class_exists($bean)) {
    // require($file);
    // }
    // $focus = new $bean();
    // $table_name = $focus->table_name;
    // $empty='';
    // echo "Processing custom relationship meta for ". $focus->table_name."...";
    // SugarBean::createRelationshipMeta($focus->getObjectName(),$db,$table_name,$empty,$focus->module_dir,true);
    // echo 'done<br>';
    //}

    $dictionary = array();
    require_once('modules/TableDictionary.php');
    $rel_dictionary = $dictionary;
    foreach( $rel_dictionary as $rel_name => $rel_data ){
    $table = $rel_data['table'];

    echo "Processing relationship meta for ". $rel_name."...";
    SugarBean::createRelationshipMeta($rel_name,$db,$t able,$rel_dictionary,'');
    echo 'done<br>';
    }

    //clean relationship cache..will be rebuilt upon first access.
    echo "Deleting relationship cache file...<BR>";
    Relationship::delete_cache();

    //////////////////////////////////////////////////////////////////////////////
    // Remove the "Rebuild Relationships" red text message on admin logins

    echo "Updating the admin warning message...<BR>";

    // clear the database row if it exists (just to be sure)
    $query = "DELETE FROM versions WHERE name='Rebuild Relationships'";
    $log->info($query);
    $db->query($query);

    // insert a new database row to show the rebuild relationships is done
    $id = create_guid();
    $gmdate = gmdate('Y-m-d H:i:s');
    $date_entered = db_convert("'$gmdate'", 'datetime');
    $query = 'INSERT INTO versions (id, deleted, date_entered, date_modified, modified_user_id, created_by, name, file_version, db_version) '
    . "VALUES ('$id', '0', $date_entered, $date_entered, '1', '1', 'Rebuild Relationships', '4.0.0', '4.0.0')";
    $log->info($query);
    $db->query($query);

    // unset the session variable so it is not picked up in DisplayWarnings.php
    if(isset($_SESSION['rebuild_relationships'])) {
    unset($_SESSION['rebuild_relationships']);
    }

    echo 'done';
    ?>

  8. #8
    teresa is offline Junior Member
    Join Date
    Apr 2006
    Posts
    3

    Talking Re: 4.2 upgrade causes all history items to display for all bugs & all projects

    Hello,

    I wanted to post back and let everyone know that today we put the suggestion from kgomez into place, and it appears to have fixed the problem! We use sugar for bugs and like to attach screenshots to the problem, which obviously was made difficult until this was put into place.

    Thanks so much!!

    Teresa

Thread Information

Users Browsing this Thread

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

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
  •